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

Commit c0a315a1 authored by Nader Jawad's avatar Nader Jawad
Browse files

Fix AdaptiveIconDrawable#getAlpha

Reverted getAlpha implementation to return the
alpha value of the first non-null child drawable

Bug: 119668265
Test: Added test to AdaptiveIconDrawableTest
Change-Id: Ia3384755e8f9a83b88d586881eae80e4c201097f
parent f66699ae
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback

    @Override
    public int getAlpha() {
        return PixelFormat.TRANSLUCENT;
        return mPaint.getAlpha();
    }

    @Override
@@ -718,10 +718,7 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback

    @Override
    public int getOpacity() {
        if (mLayerState.mOpacityOverride != PixelFormat.UNKNOWN) {
            return mLayerState.mOpacityOverride;
        }
        return mLayerState.getOpacity();
        return PixelFormat.TRANSLUCENT;
    }

    @Override