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

Commit 9f748589 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix Battery Fix slice can not displayed" into qt-dev

parents c824a0cb f34d143d
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.ArrayMap;
import android.view.View;

import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;
@@ -112,9 +113,12 @@ public class BatteryFixSlice implements CustomSliceable {
                continue;
            }
            final Drawable drawable = mContext.getDrawable(batteryTip.getIconId());
            final int iconTintColorId = batteryTip.getIconTintColorId();
            if (iconTintColorId != View.NO_ID) {
                drawable.setColorFilter(new PorterDuffColorFilter(
                    mContext.getResources().getColor(batteryTip.getIconTintColorId()),
                        mContext.getResources().getColor(iconTintColorId),
                        PorterDuff.Mode.SRC_IN));
            }

            final IconCompat icon = Utils.createIconWithDrawable(drawable);
            final SliceAction primaryAction = SliceAction.createDeeplink(getPrimaryAction(),