Merge "Using icon color for dot and halo" into sc-dev am: 47da5d628c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14684870

Change-Id: I4683179ba16afb819a7059ea3fa5f1f2321c72ff
This commit is contained in:
Sunny Goyal
2021-05-25 18:43:35 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 5 deletions
@@ -35,7 +35,6 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.graphics.IconPalette;
import com.android.launcher3.icons.GraphicsUtils;
import com.android.launcher3.icons.IconNormalizer;
import com.android.launcher3.icons.LauncherIcons;
@@ -112,8 +111,7 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
@Override
public void applyFromWorkspaceItem(WorkspaceItemInfo info) {
super.applyFromWorkspaceItem(info);
int color = IconPalette.getMutedColor(info.bitmap.color, 0.54f);
mPlateColor = ColorUtils.setAlphaComponent(color, 200);
mPlateColor = ColorUtils.setAlphaComponent(mDotParams.color, 200);
if (mIsPinned) {
setContentDescription(info.contentDescription);
} else {
@@ -140,7 +140,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
private DotInfo mDotInfo;
private DotRenderer mDotRenderer;
@ViewDebug.ExportedProperty(category = "launcher", deepExport = true)
private DotRenderer.DrawParams mDotParams;
protected DotRenderer.DrawParams mDotParams;
private Animator mDotScaleAnim;
private boolean mForceHideDot;
@@ -319,7 +319,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
protected void applyIconAndLabel(ItemInfoWithIcon info) {
boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER;
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);
applyLabel(info);