From 00dc98c9e4bb4ea03a16940b7e8ad7d8d6ccea3e Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Mon, 4 Mar 2024 17:09:53 -0800 Subject: [PATCH] On disabled app pairs, set color tint instead of changing alpha This CL changes the way disabled app pair icons are drawn: instead of setting alpha, it sets a color filter to indicate disabled status. This brings it in line with other apps icons and V's design specs. Fixes: 326665140 Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD Test: Manual Change-Id: Ifc8ac694f321a6b28996ba9a42860dfc419d5901 Merged-In: Ifc8ac694f321a6b28996ba9a42860dfc419d5901 (cherry picked from commit 09fe96b95a3d5c5be4a9413dcf8d1294062a0c62) --- src/com/android/launcher3/apppairs/AppPairIcon.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/com/android/launcher3/apppairs/AppPairIcon.java b/src/com/android/launcher3/apppairs/AppPairIcon.java index a7ceae85ea..bbeb34199f 100644 --- a/src/com/android/launcher3/apppairs/AppPairIcon.java +++ b/src/com/android/launcher3/apppairs/AppPairIcon.java @@ -19,7 +19,6 @@ package com.android.launcher3.apppairs; import static com.android.launcher3.BubbleTextView.DISPLAY_FOLDER; import android.content.Context; -import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.util.AttributeSet; @@ -192,16 +191,11 @@ public class AppPairIcon extends FrameLayout implements DraggableView, Reorderab } /** - * Checks if the app pair is launchable in the current device configuration. - * + * Updates the "disabled" state of the app pair in the current device configuration. * App pairs can be "disabled" in two ways: * 1) One of the member WorkspaceItemInfos is disabled (i.e. the app software itself is paused - * by the user or can't be launched). + * by the user or can't be launched for some other reason). * 2) This specific instance of an app pair can't be launched due to screen size requirements. - * - * This method checks and updates #2. Both #1 and #2 are checked when app pairs are drawn - * {@link AppPairIconGraphic#dispatchDraw(Canvas)} or clicked on - * {@link com.android.launcher3.touch.ItemClickHandler#onClickAppPairIcon(View)} */ public void checkDisabledState() { DeviceProfile dp = ActivityContext.lookupContext(getContext()).getDeviceProfile();