am 893ac28f: Merge "Blinking runnable is created only if text is editable. DO NOT MERGE." into gingerbread

* commit '893ac28f75561061a8f334cbd4e47833d7fd7843':
  Blinking runnable is created only if text is editable. DO NOT MERGE.
This commit is contained in:
Gilles Debunne
2011-02-04 15:50:15 -08:00
committed by Android Git Automerger

View File

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