Guest mode UX flow updates to user settings

- Add option in user settings to enable/disable ephemeral
  mode for guest user
- Update user settings to show exit guest and reset guest preferences
- Update user settings to show guest related preferences grouped together

Bug: 214031645, 175795666
Screenshots: go/ephemeral-guest-b-214031645-ux
Test: Manual test on sunfish, atest SystemUITests, atest SettingsRoboTests

Relands ag/16544951 after fixing post submit issues

Revert "Revert "Guest mode UX flow updates to user settings""

This reverts commit ed45e8c56a.

Change-Id: I54583f9021171ae523ff40d4f63835f1cb486e35
This commit is contained in:
Kedar Chitnis
2022-03-25 05:16:33 +00:00
parent 6a43641f59
commit fa49a4f111
13 changed files with 993 additions and 296 deletions

View File

@@ -34,6 +34,7 @@ public class UserCapabilities {
boolean mCanAddRestrictedProfile;
boolean mIsAdmin;
boolean mIsGuest;
boolean mIsEphemeral;
boolean mUserSwitcherEnabled;
boolean mCanAddGuest;
boolean mDisallowAddUser;
@@ -56,6 +57,7 @@ public class UserCapabilities {
final UserInfo myUserInfo = userManager.getUserInfo(UserHandle.myUserId());
caps.mIsGuest = myUserInfo.isGuest();
caps.mIsAdmin = myUserInfo.isAdmin();
caps.mIsEphemeral = myUserInfo.isEphemeral();
DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(
Context.DEVICE_POLICY_SERVICE);