Skip to content

Commit dc32a99

Browse files
author
Gilles Debunne
committed
Blinking runnable is created only if text is editable. DO NOT MERGE.
Change-Id: If85acc73cfa12b6da23d60459a746e1aef51d3aa
1 parent ca36d86 commit dc32a99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/widget/TextView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6523,7 +6523,7 @@ public void onSpanRemoved(Spannable buf, Object what, int s, int e) {
65236523
}
65246524

65256525
private void makeBlink() {
6526-
if (!mCursorVisible) {
6526+
if (!mCursorVisible || !isTextEditable()) {
65276527
if (mBlink != null) {
65286528
mBlink.removeCallbacks(mBlink);
65296529
}
@@ -6912,7 +6912,7 @@ private void prepareCursorControllers() {
69126912
* @return True iff this TextView contains a text that can be edited.
69136913
*/
69146914
private boolean isTextEditable() {
6915-
return mText instanceof Editable && onCheckIsTextEditor();
6915+
return mText instanceof Editable && onCheckIsTextEditor() && isEnabled();
69166916
}
69176917

69186918
/**

0 commit comments

Comments
 (0)