Change PS app behavior when clicking

It should show the shortcuts upon tap and not animate like if you were to longpress to shortcuts on a regular app.

bug: 406724060
Test: manually video: https://drive.google.com/file/d/1ldodFhr00lTJ5583VxMe7PasZ0jre6wd/view?usp=sharing
Flag: android.multiuser.enable_moving_content_into_private_space
Change-Id: I5762689290b4078f9b1b4fdfd09fb2cef482744a
This commit is contained in:
Brandon Dayauon
2025-03-29 00:37:19 +00:00
parent 29b86863f2
commit 424d5686e4
2 changed files with 19 additions and 1 deletions
@@ -523,8 +523,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
}
private void setNonPendingIcon(ItemInfoWithIcon info) {
boolean isPrivateSpaceIcon = Objects.equals(info.getTargetPackage(), PRIVATE_SPACE_PACKAGE);
// Set nonPendingIcon acts as a restart which should refresh the flag state when applicable.
int flags = Objects.equals(info.getTargetPackage(), PRIVATE_SPACE_PACKAGE)
int flags = isPrivateSpaceIcon
? info.bitmap.creationFlags : shouldUseTheme() ? FLAG_THEMED : 0;
// Remove badge on icons smaller than 48dp.
if (mHideBadge || mDisplay == DISPLAY_SEARCH_RESULT_SMALL) {
@@ -536,6 +537,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
mDotParams.appColor = iconDrawable.getIconColor();
mDotParams.dotColor = Themes.getAttrColor(getContext(), R.attr.notificationDotColor);
if (isPrivateSpaceIcon) {
iconDrawable.setAnimationEnabled(false);
}
setIcon(iconDrawable);
}