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
Merged-In: I54583f9021171ae523ff40d4f63835f1cb486e35
This commit is contained in:
Kedar Chitnis
2022-03-25 05:16:33 +00:00
parent de480154c4
commit a1fbad7dd8
12 changed files with 852 additions and 91 deletions

View File

@@ -26,27 +26,64 @@
settings:controller="com.android.settings.users.MultiUserTopIntroPreferenceController"/>
<PreferenceCategory
android:key="user_list"
android:title="@string/user_list_title"
android:order="10"
settings:searchable="false">
</PreferenceCategory>
android:key="guest_category"
android:title="@string/guest_category_title"
android:order="2"
settings:searchable="false"/>
<com.android.settingslib.RestrictedPreference
android:key="guest_add"
android:title="@string/guest_new_guest"
android:order="15"/>
<Preference
android:key="guest_exit"
android:title="@string/guest_exit_button"
android:icon="@drawable/ic_guest_exit"
android:order="3"/>
<Preference
android:key="guest_reset"
android:title="@string/guest_reset_button"
android:icon="@drawable/ic_guest_reset"
android:order="4"/>
<Preference
android:key="guest_info"
android:icon="@drawable/ic_info"
android:order="5"
android:selectable="false"/>
<PreferenceCategory
android:key="user_list"
android:title="@string/user_category_title"
android:order="10"
settings:searchable="false"/>
<com.android.settingslib.RestrictedPreference
android:key="user_add"
android:title="@string/user_add_user_or_profile_menu"
android:icon="@drawable/ic_add_40dp"
android:order="20"/>
<com.android.settingslib.RestrictedPreference
android:key="supervised_user_add"
android:title="@*android:string/supervised_user_creation_label"
android:icon="@drawable/ic_add_40dp"
android:order="25"/>
<PreferenceCategory
android:key="guest_user_category"
android:title="@*android:string/guest_name"
android:order="50"/>
<com.android.settingslib.RestrictedPreference
android:key="guest_add"
android:title="@string/guest_new_guest"
android:icon="@drawable/ic_add_40dp"
android:order="55"/>
<com.android.settingslib.RestrictedSwitchPreference
android:key="remove_guest_on_exit"
android:title="@string/remove_guest_on_exit"
android:summary="@string/remove_guest_on_exit_summary"
android:order="60"/>
<com.android.settingslib.RestrictedSwitchPreference
android:key="user_settings_add_users_when_locked"
android:title="@string/user_add_on_lockscreen_menu"