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

Commit 6aec113e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Properly store values to pass to constant state" into sc-v2-dev am:...

Merge "Properly store values to pass to constant state" into sc-v2-dev am: 67c9b400 am: 6298e481

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15897188

Change-Id: I1cce6d66aa8879f62352d633fe19bfba7c2c4e07
parents b1e1714d 6298e481
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -109,6 +109,12 @@ public class AlphaTintDrawableWrapper extends InsetDrawable {
        }
    }

    @Override
    public void setTintList(ColorStateList tint) {
        super.setTintList(tint);
        mTint = tint;
    }

    private void applyTint() {
        if (getDrawable() != null && mTint != null) {
            getDrawable().mutate().setTintList(mTint);
+8 −0
Original line number Diff line number Diff line
@@ -69,6 +69,10 @@ class RoundedCornerProgressDrawable @JvmOverloads constructor(
        return super.getChangingConfigurations() or ActivityInfo.CONFIG_DENSITY
    }

    override fun canApplyTheme(): Boolean {
        return (drawable?.canApplyTheme() ?: false) || super.canApplyTheme()
    }

    private class RoundedCornerState(private val wrappedState: ConstantState) : ConstantState() {
        override fun newDrawable(): Drawable {
            return newDrawable(null, null)
@@ -82,5 +86,9 @@ class RoundedCornerProgressDrawable @JvmOverloads constructor(
        override fun getChangingConfigurations(): Int {
            return wrappedState.changingConfigurations
        }

        override fun canApplyTheme(): Boolean {
            return true
        }
    }
}
 No newline at end of file