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

Commit 0e1f2301 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by The Android Automerger
Browse files

Fix bug #11537133 Hideycling looks broken (KOT36), missing left padding

- enforce the Drawable boolean getPadding(Rect) contract for NinePatchDrawable
and DrawableContainer.

- as NinePatchDrawable was not enforcing it, the consequence was that the
mUserPaddingLeftInitial / mUserPaddingRitghInitial were reset to "0" (even
if they got the correct value before the reset).

Change-Id: I1efe7fad5f89c0ca47f90189f6d89940e0e9c6ae
parent 41c2f04e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -88,9 +88,10 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
    @Override
    public boolean getPadding(Rect padding) {
        final Rect r = mDrawableContainerState.getConstantPadding();
        boolean result = true;
        boolean result;
        if (r != null) {
            padding.set(r);
            result = (r.left | r.top | r.bottom | r.right) != 0;
        } else {
            if (mCurrDrawable != null) {
                result = mCurrDrawable.getPadding(padding);
+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ public class NinePatchDrawable extends Drawable {
        } else {
            padding.set(mPadding);
        }
        return true;
        return (padding.left | padding.top | padding.right | padding.bottom) != 0;
    }

    /**