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

Commit ab267964 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Using theme color as primary icon color

Bug: 188839628
Test: Manual
Change-Id: Ieb64337512ab7664b80e2a452b59799cccc45800
parent 7cd24528
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -297,9 +297,9 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            if (themeData != null) {
                ClockDrawableWrapper wrapper = fromThemeData(context, themeData);
                if (wrapper != null) {
                    ColorFilter bgFilter = new PorterDuffColorFilter(
                            getColors(context)[0], Mode.SRC_ATOP);
                    ClockBitmapInfo bitmapInfo = new ClockBitmapInfo(icon, color, scale,
                    int[] colors = getColors(context);
                    ColorFilter bgFilter = new PorterDuffColorFilter(colors[0], Mode.SRC_ATOP);
                    ClockBitmapInfo bitmapInfo = new ClockBitmapInfo(icon, colors[1], scale,
                            wrapper.mAnimationInfo, mFlattenedBackground, themeData) {

                        @Override
+7 −0
Original line number Diff line number Diff line
@@ -113,6 +113,13 @@ public class FastBitmapDrawable extends Drawable {
        canvas.drawBitmap(mBitmap, null, bounds, mPaint);
    }

    /**
     * Returns the primary icon color
     */
    public int getIconColor() {
        return mIconColor;
    }

    @Override
    public void setColorFilter(ColorFilter cf) {
        mColorFilter = cf;
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public class ThemedIconDrawable extends FastBitmapDrawable {
    private final Rect mBadgeBounds;

    protected ThemedIconDrawable(ThemedConstantState constantState) {
        super(constantState.mBitmap, constantState.mIconColor, constantState.mIsDisabled);
        super(constantState.mBitmap, constantState.colorFg, constantState.mIsDisabled);
        bitmapInfo = constantState.bitmapInfo;
        colorBg = constantState.colorBg;
        colorFg = constantState.colorFg;