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

Commit c85057c1 authored by Selim Cinek's avatar Selim Cinek
Browse files

Made the DrawableWrapper return the right ColorFilter

Previously it simply returned null

Test: atest cts/tests/tests/graphics/src/android/graphics/drawable/cts/DrawableWrapperTest.java
Change-Id: Ia4694e8dee08449262bbe1cfd719795fd86e1ee0
Fixes: 78252558
parent f2b624c1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -295,6 +295,15 @@ public abstract class DrawableWrapper extends Drawable implements Drawable.Callb
        }
    }

    @Override
    public ColorFilter getColorFilter() {
        final Drawable drawable = getDrawable();
        if (drawable != null) {
            return drawable.getColorFilter();
        }
        return super.getColorFilter();
    }

    @Override
    public void setTintList(@Nullable ColorStateList tint) {
        if (mDrawable != null) {