Skip to content

Commit 893ac28

Browse files
Gilles DebunneAndroid (Google) Code Review
authored andcommitted
Merge "Blinking runnable is created only if text is editable. DO NOT MERGE." into gingerbread
2 parents 8a6ba49 + dc32a99 commit 893ac28

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
@@ -6541,7 +6541,7 @@ public void onSpanRemoved(Spannable buf, Object what, int s, int e) {
65416541
}
65426542

65436543
private void makeBlink() {
6544-
if (!mCursorVisible) {
6544+
if (!mCursorVisible || !isTextEditable()) {
65456545
if (mBlink != null) {
65466546
mBlink.removeCallbacks(mBlink);
65476547
}
@@ -6932,7 +6932,7 @@ private void prepareCursorControllers() {
69326932
* @return True iff this TextView contains a text that can be edited.
69336933
*/
69346934
private boolean isTextEditable() {
6935-
return mText instanceof Editable && onCheckIsTextEditor();
6935+
return mText instanceof Editable && onCheckIsTextEditor() && isEnabled();
69366936
}
69376937

69386938
/**

0 commit comments

Comments
 (0)