Fix views being visible after closing private space.

Its possible views are still being binded before the app list is refreshed.
So instead make the views gone in that case (by making sure private profile is disabled).

Fixes:
- install app icon still showing because it is not identified as a private space item
- Divider still containing a decorator when collapsing before app list is refreshed.

bug: 334868779
Test video manualy:
before:https://drive.google.com/file/d/1IWdGsTSq7-xRZKOJso-5p9g-j7RTEkas/view?usp=sharing
after:https://drive.google.com/file/d/1IVNTksryFi5o4uHzZtzNC0Yz7-rxrje3/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation trunkfood

Change-Id: If93e39753352741fb6f0728f717a67b7f9315d0b
This commit is contained in:
Brandon Dayauon committed 2024-04-15 14:40:58 -07:00
1 parent a271511240
commit 14ec21748b
3 files changed
+29 -11

No files matched your search

@@ -159,6 +159,7 @@ public class PrivateProfileManager extends UserProfileManager {
itemInfo.contentDescription = context.getResources().getString(
com.android.launcher3.R.string.ps_add_button_content_description);
itemInfo.runtimeStatusFlags |= FLAG_NOT_PINNABLE;
itemInfo.user = getProfileUser();
BaseAllAppsAdapter.AdapterItem item = new BaseAllAppsAdapter.AdapterItem(VIEW_TYPE_ICON);
item.itemInfo = itemInfo;
@@ -746,6 +747,6 @@ public class PrivateProfileManager extends UserProfileManager {
}
boolean isPrivateSpaceItem(BaseAllAppsAdapter.AdapterItem item) {
return item.decorationInfo != null;
return getItemInfoMatcher().test(item.itemInfo) || item.decorationInfo != null;
}
}