Merge "Update app ring color and alpha" into udc-dev am: 11939898f3 am: 251b33fd87
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23183745 Change-Id: I490c54a4d1ac3f34c9008d1b93bd5a6a8a201ffe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -57,7 +57,6 @@ import com.android.launcher3.icons.IconNormalizer;
|
|||||||
import com.android.launcher3.icons.LauncherIcons;
|
import com.android.launcher3.icons.LauncherIcons;
|
||||||
import com.android.launcher3.model.data.ItemInfoWithIcon;
|
import com.android.launcher3.model.data.ItemInfoWithIcon;
|
||||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||||
import com.android.launcher3.touch.ItemClickHandler;
|
|
||||||
import com.android.launcher3.touch.ItemLongClickListener;
|
import com.android.launcher3.touch.ItemLongClickListener;
|
||||||
import com.android.launcher3.util.SafeCloseable;
|
import com.android.launcher3.util.SafeCloseable;
|
||||||
import com.android.launcher3.views.ActivityContext;
|
import com.android.launcher3.views.ActivityContext;
|
||||||
@@ -183,7 +182,16 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
|
|||||||
: null;
|
: null;
|
||||||
super.applyFromWorkspaceItem(info, animate, staggerIndex);
|
super.applyFromWorkspaceItem(info, animate, staggerIndex);
|
||||||
int oldPlateColor = mPlateColor;
|
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) {
|
if (!animate) {
|
||||||
mPlateColor = newPlateColor;
|
mPlateColor = newPlateColor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user