Loading core/java/android/widget/Editor.java +6 −24 Original line number Diff line number Diff line Loading @@ -144,7 +144,6 @@ public class Editor { CharSequence mError; boolean mErrorWasChanged; ErrorPopup mErrorPopup; private int mLastLayoutDirection = -1; /** * This flag is set if the TextView tries to display an error before it Loading Loading @@ -290,30 +289,13 @@ public class Editor { public void setError(CharSequence error, Drawable icon) { mError = TextUtils.stringOrSpannedString(error); mErrorWasChanged = true; final int layoutDirection = mTextView.getLayoutDirection(); if (mLastLayoutDirection != layoutDirection) { final Drawables dr = mTextView.mDrawables; switch (layoutDirection) { default: case View.LAYOUT_DIRECTION_LTR: if (dr != null) { mTextView.setCompoundDrawables(dr.mDrawableLeft, dr.mDrawableTop, icon, dr.mDrawableBottom); } else { mTextView.setCompoundDrawables(null, null, icon, null); } break; case View.LAYOUT_DIRECTION_RTL: if (dr != null) { mTextView.setCompoundDrawables(icon, dr.mDrawableTop, dr.mDrawableRight, dr.mDrawableBottom); } else { mTextView.setCompoundDrawables(icon, null, null, null); } break; } mLastLayoutDirection = layoutDirection; } if (mError == null) { if (mErrorPopup != null) { if (mErrorPopup.isShowing()) { Loading Loading
core/java/android/widget/Editor.java +6 −24 Original line number Diff line number Diff line Loading @@ -144,7 +144,6 @@ public class Editor { CharSequence mError; boolean mErrorWasChanged; ErrorPopup mErrorPopup; private int mLastLayoutDirection = -1; /** * This flag is set if the TextView tries to display an error before it Loading Loading @@ -290,30 +289,13 @@ public class Editor { public void setError(CharSequence error, Drawable icon) { mError = TextUtils.stringOrSpannedString(error); mErrorWasChanged = true; final int layoutDirection = mTextView.getLayoutDirection(); if (mLastLayoutDirection != layoutDirection) { final Drawables dr = mTextView.mDrawables; switch (layoutDirection) { default: case View.LAYOUT_DIRECTION_LTR: if (dr != null) { mTextView.setCompoundDrawables(dr.mDrawableLeft, dr.mDrawableTop, icon, dr.mDrawableBottom); } else { mTextView.setCompoundDrawables(null, null, icon, null); } break; case View.LAYOUT_DIRECTION_RTL: if (dr != null) { mTextView.setCompoundDrawables(icon, dr.mDrawableTop, dr.mDrawableRight, dr.mDrawableBottom); } else { mTextView.setCompoundDrawables(icon, null, null, null); } break; } mLastLayoutDirection = layoutDirection; } if (mError == null) { if (mErrorPopup != null) { if (mErrorPopup.isShowing()) { Loading