Merge "Update creationFlag state only on non PSApp" into main
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 783e82c..30e3a2b 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -26,6 +26,7 @@
import static com.android.launcher3.BubbleTextView.RunningAppState.MINIMIZED;
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;
@@ -104,6 +105,7 @@
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
@@ -589,7 +591,9 @@
}
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 5f632fe..870c891 100644
--- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
+++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
@@ -64,7 +64,7 @@
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;