From 55c10be9126dd177d56e4ccf84451e6655d704f9 Mon Sep 17 00:00:00 2001 From: fbaron Date: Thu, 11 May 2023 15:45:52 -0700 Subject: [PATCH] Update app ring color and alpha Bug: 268521231 Test: Verify that app ring colors match the figma attached in the bug Flag: no flag Change-Id: I2270f6e5e3ad2c653aad36feb2232a672bdf2a79 --- .../launcher3/uioverrides/PredictedAppIcon.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java b/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java index 0eef70e270..a8b7698b57 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java +++ b/quickstep/src/com/android/launcher3/uioverrides/PredictedAppIcon.java @@ -57,7 +57,6 @@ import com.android.launcher3.icons.IconNormalizer; import com.android.launcher3.icons.LauncherIcons; import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.model.data.WorkspaceItemInfo; -import com.android.launcher3.touch.ItemClickHandler; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.util.SafeCloseable; import com.android.launcher3.views.ActivityContext; @@ -183,7 +182,16 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView { : null; super.applyFromWorkspaceItem(info, animate, staggerIndex); int oldPlateColor = mPlateColor; - int newPlateColor = ColorUtils.setAlphaComponent(mDotParams.appColor, 200); + + int newPlateColor; + if (getIcon().isThemed()) { + newPlateColor = getResources().getColor(android.R.color.system_accent1_300); + } else { + float[] hctPlateColor = new float[3]; + ColorUtils.colorToM3HCT(mDotParams.appColor, hctPlateColor); + newPlateColor = ColorUtils.M3HCTtoColor(hctPlateColor[0], 36, 85); + } + if (!animate) { mPlateColor = newPlateColor; }