Lock Private space at the end of PS setup.

This change is to call UserManager requestQuietModeEnabled() API at the
end of PS setup to enable quitemode for private space.

Bug: 313652502
Test: atest PrivateSpaceMaintainerTest
Verify Private space is locked state after private space setup completion.

Change-Id: I1d863f6d51ffa4bb58318696603905d35c3109b6
This commit is contained in:
josephpv
2023-11-29 22:48:52 +00:00
committed by Joseph Vincent
parent 9a0db2d6e5
commit 242ae4fbcc
3 changed files with 84 additions and 0 deletions

View File

@@ -84,6 +84,8 @@ public class SetupSuccessFragment extends InstrumentedFragment {
if (activity != null) {
mMetricsFeatureProvider.action(
getContext(), SettingsEnums.ACTION_PRIVATE_SPACE_SETUP_DONE);
//TODO(b/307729746): Add a test to verify PS is locked after setup completion.
PrivateSpaceMaintainer.getInstance(activity).lockPrivateSpace();
Intent allAppsIntent = new Intent(Intent.ACTION_ALL_APPS);
ResolveInfo resolveInfo =
activity.getPackageManager()