Merge "Fix TextView#setTextCursorDrawable for resid=0"

This commit is contained in:
Mihai Popa
2019-01-14 14:35:43 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}
/**