Listen to LauncherUserInfo config changes and hide/unhide private space

entrypoint accordingly

Flag: android.multiuser.add_launcher_user_config

Bug: 346553745
Test: Manual - verified on device
Test: atest LauncherAppsTests

Change-Id: I202c4c76af4f96d5b3226daffcfebc2f9b9703b1
This commit is contained in:
Olivier Nshimiye
2024-09-10 19:20:42 +00:00
parent be17fb8a63
commit 39dee43e12
7 changed files with 80 additions and 24 deletions

View File

@@ -188,7 +188,9 @@ public class LauncherAppState implements SafeCloseable {
mOnTerminateCallback.add(() ->
settingsCache.unregister(NOTIFICATION_BADGING_URI, notificationLister));
// Register an observer to notify Launcher about Private Space settings toggle.
registerPrivateSpaceHideWhenLockListener(settingsCache);
if (!android.multiuser.Flags.addLauncherUserConfig()) {
registerPrivateSpaceHideWhenLockListener(settingsCache);
}
}
public LauncherAppState(Context context, @Nullable String iconCacheFileName) {