Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 369cf0c1 authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am d9134e7a: Merge "Revert partial RTL\'ization of Editor.setError()" into jb-mr1-dev

* commit 'd9134e7a':
  Revert partial RTL'ization of Editor.setError()
parents 3d96f940 d9134e7a
Loading
Loading
Loading
Loading
+6 −24
Original line number Diff line number Diff line
@@ -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,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()) {