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

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

Using icon color for dot and halo

Bug: 188839628
Test: Manual
Change-Id: I8a393cc7073d5a249619b4033ec860c55f17167a
parent e9d27f13
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.R;
import com.android.launcher3.graphics.IconPalette;
import com.android.launcher3.icons.GraphicsUtils;
import com.android.launcher3.icons.GraphicsUtils;
import com.android.launcher3.icons.IconNormalizer;
import com.android.launcher3.icons.IconNormalizer;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.icons.LauncherIcons;
@@ -112,8 +111,7 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
    @Override
    @Override
    public void applyFromWorkspaceItem(WorkspaceItemInfo info) {
    public void applyFromWorkspaceItem(WorkspaceItemInfo info) {
        super.applyFromWorkspaceItem(info);
        super.applyFromWorkspaceItem(info);
        int color = IconPalette.getMutedColor(info.bitmap.color, 0.54f);
        mPlateColor = ColorUtils.setAlphaComponent(mDotParams.color, 200);
        mPlateColor = ColorUtils.setAlphaComponent(color, 200);
        if (mIsPinned) {
        if (mIsPinned) {
            setContentDescription(info.contentDescription);
            setContentDescription(info.contentDescription);
        } else {
        } else {
+2 −2
Original line number Original line Diff line number Diff line
@@ -140,7 +140,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
    private DotInfo mDotInfo;
    private DotInfo mDotInfo;
    private DotRenderer mDotRenderer;
    private DotRenderer mDotRenderer;
    @ViewDebug.ExportedProperty(category = "launcher", deepExport = true)
    @ViewDebug.ExportedProperty(category = "launcher", deepExport = true)
    private DotRenderer.DrawParams mDotParams;
    protected DotRenderer.DrawParams mDotParams;
    private Animator mDotScaleAnim;
    private Animator mDotScaleAnim;
    private boolean mForceHideDot;
    private boolean mForceHideDot;


@@ -319,7 +319,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
    protected void applyIconAndLabel(ItemInfoWithIcon info) {
    protected void applyIconAndLabel(ItemInfoWithIcon info) {
        boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER;
        boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER;
        FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme);
        FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme);
        mDotParams.color = IconPalette.getMutedColor(info.bitmap.color, 0.54f);
        mDotParams.color = IconPalette.getMutedColor(iconDrawable.getIconColor(), 0.54f);


        setIcon(iconDrawable);
        setIcon(iconDrawable);
        applyLabel(info);
        applyLabel(info);