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

Commit b989c556 authored by Alan Viverette's avatar Alan Viverette
Browse files

resolve merge conflicts of da9653a2 to master.

Change-Id: I7458452389fb7b048fe5c6daa375fd4dbb9d9766
parents fe7712e7 cbe32de4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12872,7 +12872,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        Interpolator.Result.FREEZE_END) {
                    cache.state = ScrollabilityCache.OFF;
                } else {
                    cache.scrollBar.setAlpha(Math.round(values[0]));
                    cache.scrollBar.mutate().setAlpha(Math.round(values[0]));
                }
                // This will make the scroll bars inval themselves after
@@ -12882,7 +12882,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            } else {
                // We're just on -- but we may have been fading before so
                // reset alpha
                cache.scrollBar.setAlpha(255);
                cache.scrollBar.mutate().setAlpha(255);
            }
+25 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ public class ScrollBarDrawable extends Drawable implements Drawable.Callback {
    private boolean mRangeChanged;
    private boolean mAlwaysDrawHorizontalTrack;
    private boolean mAlwaysDrawVerticalTrack;
    private boolean mMutated;

    private int mAlpha = 255;
    private boolean mHasSetAlpha;
@@ -266,6 +267,10 @@ public class ScrollBarDrawable extends Drawable implements Drawable.Callback {

    private void propagateCurrentState(Drawable d) {
        if (d != null) {
            if (mMutated) {
                d.mutate();
            }

            d.setState(getState());
            d.setCallback(this);

@@ -289,6 +294,26 @@ public class ScrollBarDrawable extends Drawable implements Drawable.Callback {
        }
    }

    @Override
    public ScrollBarDrawable mutate() {
        if (!mMutated && super.mutate() == this) {
            if (mVerticalTrack != null) {
                mVerticalTrack.mutate();
            }
            if (mVerticalThumb != null) {
                mVerticalThumb.mutate();
            }
            if (mHorizontalTrack != null) {
                mHorizontalTrack.mutate();
            }
            if (mHorizontalThumb != null) {
                mHorizontalThumb.mutate();
            }
            mMutated = true;
        }
        return this;
    }

    @Override
    public void setAlpha(int alpha) {
        mAlpha = alpha;