diff options
author | 2025-03-11 16:03:52 +0000 | |
---|---|---|
committer | 2025-03-11 16:03:52 +0000 | |
commit | ea388ef77be7d7d1f1fc604544b2c05464e8c80c (patch) | |
tree | af9fc649483e9b5b18cf325ab6df4683b83b90a5 | |
parent | 5a118cb57dc9c43445442c51bcf74f13ddbc6daf (diff) |
Update creationFlag state only on non PSApp
Essentially reverting original change with the current test passing now.
bug: 401529887
Test: atest BubbleTextView
Flag: EXEMPT bug fix
Change-Id: Id12672cbdf66960915c4dcf75329f0c5df21ce4c
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher3/allapps/AlphabeticalAppsList.java | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index c2a126b0d6..b3a4309af1 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -22,6 +22,7 @@ import static android.text.Layout.Alignment.ALIGN_NORMAL; import static com.android.launcher3.Flags.enableContrastTiles; import static com.android.launcher3.Flags.enableCursorHoverStates; +import static com.android.launcher3.allapps.AlphabeticalAppsList.PRIVATE_SPACE_PACKAGE; import static com.android.launcher3.graphics.PreloadIconDrawable.newPendingIcon; import static com.android.launcher3.icons.BitmapInfo.FLAG_NO_BADGE; import static com.android.launcher3.icons.BitmapInfo.FLAG_SKIP_USER_BADGE; @@ -99,6 +100,7 @@ import com.android.launcher3.views.FloatingIconViewCompanion; import java.text.NumberFormat; import java.util.HashMap; import java.util.Locale; +import java.util.Objects; /** * TextView that draws a bubble behind the text. We cannot use a LineBackgroundSpan @@ -483,7 +485,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, } private void setNonPendingIcon(ItemInfoWithIcon info) { - int flags = shouldUseTheme() ? FLAG_THEMED : info.bitmap.creationFlags; + // Set nonPendingIcon acts as a restart which should refresh the flag state when applicable. + int flags = Objects.equals(info.getTargetPackage(), PRIVATE_SPACE_PACKAGE) + ? info.bitmap.creationFlags : shouldUseTheme() ? FLAG_THEMED : 0; // Remove badge on icons smaller than 48dp. if (mHideBadge || mDisplay == DISPLAY_SEARCH_RESULT_SMALL) { flags |= FLAG_NO_BADGE; diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 5f632fe25d..870c891f47 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -64,7 +64,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement AllAppsStore.OnUpdateListener { public static final String TAG = "AlphabeticalAppsList"; - private static final String PRIVATE_SPACE_PACKAGE = "com.android.privatespace"; + public static final String PRIVATE_SPACE_PACKAGE = "com.android.privatespace"; private final WorkProfileManager mWorkProviderManager; |