diff options
-rw-r--r-- | core/java/android/widget/Editor.java | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index 495e46b..5397eb6 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -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 @@ -290,29 +289,12 @@ 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; + final Drawables dr = mTextView.mDrawables; + if (dr != null) { + mTextView.setCompoundDrawables(dr.mDrawableLeft, dr.mDrawableTop, icon, + dr.mDrawableBottom); + } else { + mTextView.setCompoundDrawables(null, null, icon, null); } if (mError == null) { if (mErrorPopup != null) { |