Blinking runnable is created only if text is editable. DO NOT MERGE.

Change-Id: If85acc73cfa12b6da23d60459a746e1aef51d3aa
This commit is contained in:
Gilles Debunne
2011-01-10 18:45:44 -08:00
parent ca36d863cc
commit dc32a99889

View File

@@ -6523,7 +6523,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
private void makeBlink() {
if (!mCursorVisible) {
if (!mCursorVisible || !isTextEditable()) {
if (mBlink != null) {
mBlink.removeCallbacks(mBlink);
}
@@ -6912,7 +6912,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @return True iff this TextView contains a text that can be edited.
*/
private boolean isTextEditable() {
return mText instanceof Editable && onCheckIsTextEditor();
return mText instanceof Editable && onCheckIsTextEditor() && isEnabled();
}
/**