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

Commit 77b2a861 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Fix padding resolution" into klp-dev

parents 83aec80f 7b1a6f76
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -12076,12 +12076,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    public void resolvePadding() {
        final int resolvedLayoutDirection = getLayoutDirection();
        if (!isRtlCompatibilityMode()) {
            // Post Jelly Bean MR1 case: we need to take the resolved layout direction into account.
            // If start / end padding are defined, they will be resolved (hence overriding) to
            // left / right or right / left depending on the resolved layout direction.
            // If start / end padding are not defined, use the left / right ones.
            int resolvedLayoutDirection = getLayoutDirection();
            switch (resolvedLayoutDirection) {
                case LAYOUT_DIRECTION_RTL:
                    if (mUserPaddingStart != UNDEFINED_PADDING) {
@@ -12110,11 +12111,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            }
            mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
            onRtlPropertiesChanged(resolvedLayoutDirection);
        }
        internalSetPadding(mUserPaddingLeft, mPaddingTop, mUserPaddingRight, mUserPaddingBottom);
        onRtlPropertiesChanged(resolvedLayoutDirection);
        mPrivateFlags2 |= PFLAG2_PADDING_RESOLVED;
    }