Loading core/java/android/widget/TextView.java +4 −8 Original line number Diff line number Diff line Loading @@ -3520,7 +3520,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandle(@DrawableRes int textSelectHandle) { Preconditions.checkArgumentPositive(textSelectHandle, Preconditions.checkArgument(textSelectHandle != 0, "The text select handle should be a valid drawable resource id."); setTextSelectHandle(mContext.getDrawable(textSelectHandle)); } Loading Loading @@ -3577,7 +3577,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandleLeft(@DrawableRes int textSelectHandleLeft) { Preconditions.checkArgumentPositive(textSelectHandleLeft, Preconditions.checkArgument(textSelectHandleLeft != 0, "The text select left handle should be a valid drawable resource id."); setTextSelectHandleLeft(mContext.getDrawable(textSelectHandleLeft)); } Loading Loading @@ -3634,7 +3634,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandleRight(@DrawableRes int textSelectHandleRight) { Preconditions.checkArgumentPositive(textSelectHandleRight, Preconditions.checkArgument(textSelectHandleRight != 0, "The text select right handle should be a valid drawable resource id."); setTextSelectHandleRight(mContext.getDrawable(textSelectHandleRight)); } Loading Loading @@ -3667,9 +3667,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setTextCursorDrawable(int) * @attr ref android.R.styleable#TextView_textCursorDrawable */ public void setTextCursorDrawable(@NonNull Drawable textCursorDrawable) { Preconditions.checkNotNull(textCursorDrawable, "The cursor drawable should not be null."); public void setTextCursorDrawable(@Nullable Drawable textCursorDrawable) { mCursorDrawable = textCursorDrawable; mCursorDrawableRes = 0; if (mEditor != null) { Loading @@ -3687,8 +3685,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_textCursorDrawable */ public void setTextCursorDrawable(@DrawableRes int textCursorDrawable) { Preconditions.checkArgumentPositive(textCursorDrawable, "The cursor drawable should be a valid drawable resource id."); setTextCursorDrawable(mContext.getDrawable(textCursorDrawable)); } Loading Loading
core/java/android/widget/TextView.java +4 −8 Original line number Diff line number Diff line Loading @@ -3520,7 +3520,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandle(@DrawableRes int textSelectHandle) { Preconditions.checkArgumentPositive(textSelectHandle, Preconditions.checkArgument(textSelectHandle != 0, "The text select handle should be a valid drawable resource id."); setTextSelectHandle(mContext.getDrawable(textSelectHandle)); } Loading Loading @@ -3577,7 +3577,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandleLeft(@DrawableRes int textSelectHandleLeft) { Preconditions.checkArgumentPositive(textSelectHandleLeft, Preconditions.checkArgument(textSelectHandleLeft != 0, "The text select left handle should be a valid drawable resource id."); setTextSelectHandleLeft(mContext.getDrawable(textSelectHandleLeft)); } Loading Loading @@ -3634,7 +3634,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @android.view.RemotableViewMethod public void setTextSelectHandleRight(@DrawableRes int textSelectHandleRight) { Preconditions.checkArgumentPositive(textSelectHandleRight, Preconditions.checkArgument(textSelectHandleRight != 0, "The text select right handle should be a valid drawable resource id."); setTextSelectHandleRight(mContext.getDrawable(textSelectHandleRight)); } Loading Loading @@ -3667,9 +3667,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setTextCursorDrawable(int) * @attr ref android.R.styleable#TextView_textCursorDrawable */ public void setTextCursorDrawable(@NonNull Drawable textCursorDrawable) { Preconditions.checkNotNull(textCursorDrawable, "The cursor drawable should not be null."); public void setTextCursorDrawable(@Nullable Drawable textCursorDrawable) { mCursorDrawable = textCursorDrawable; mCursorDrawableRes = 0; if (mEditor != null) { Loading @@ -3687,8 +3685,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_textCursorDrawable */ public void setTextCursorDrawable(@DrawableRes int textCursorDrawable) { Preconditions.checkArgumentPositive(textCursorDrawable, "The cursor drawable should be a valid drawable resource id."); setTextCursorDrawable(mContext.getDrawable(textCursorDrawable)); } Loading