diff options
author | 2019-01-14 14:35:43 +0000 | |
---|---|---|
committer | 2019-01-14 14:35:43 +0000 | |
commit | cf334204525b274fd8f12aee5c3bef618c11c69e (patch) | |
tree | fb7ef4d69bbdf4cb93ef2a57860e672be43b0694 | |
parent | 9178eee8b1e6c45a970574602d8ad5bc03c2d7b6 (diff) | |
parent | 0374b62bbeffa880714a5815576ddd2fc416e58d (diff) |
Merge "Fix TextView#setTextCursorDrawable for resid=0"
-rw-r--r-- | core/java/android/widget/TextView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 51b8734fdcc1..0d16998d17ee 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -3685,7 +3685,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_textCursorDrawable */ public void setTextCursorDrawable(@DrawableRes int textCursorDrawable) { - setTextCursorDrawable(mContext.getDrawable(textCursorDrawable)); + setTextCursorDrawable( + textCursorDrawable != 0 ? mContext.getDrawable(textCursorDrawable) : null); } /** |