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:
25
res/drawable/ic_account_circle.xml
Normal file
25
res/drawable/ic_account_circle.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Copyright (C) 2022 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48"
|
||||
android:tint="?android:attr/colorAccent">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11.1,35.25Q14.25,33.05 17.35,31.875Q20.45,30.7 24,30.7Q27.55,30.7 30.675,31.875Q33.8,33.05 36.95,35.25Q39.15,32.55 40.075,29.8Q41,27.05 41,24Q41,16.75 36.125,11.875Q31.25,7 24,7Q16.75,7 11.875,11.875Q7,16.75 7,24Q7,27.05 7.95,29.8Q8.9,32.55 11.1,35.25ZM24,25.5Q21.1,25.5 19.125,23.525Q17.15,21.55 17.15,18.65Q17.15,15.75 19.125,13.775Q21.1,11.8 24,11.8Q26.9,11.8 28.875,13.775Q30.85,15.75 30.85,18.65Q30.85,21.55 28.875,23.525Q26.9,25.5 24,25.5ZM24,44Q19.9,44 16.25,42.425Q12.6,40.85 9.875,38.125Q7.15,35.4 5.575,31.75Q4,28.1 4,24Q4,19.85 5.575,16.225Q7.15,12.6 9.875,9.875Q12.6,7.15 16.25,5.575Q19.9,4 24,4Q28.15,4 31.775,5.575Q35.4,7.15 38.125,9.875Q40.85,12.6 42.425,16.225Q44,19.85 44,24Q44,28.1 42.425,31.75Q40.85,35.4 38.125,38.125Q35.4,40.85 31.775,42.425Q28.15,44 24,44ZM24,41Q26.75,41 29.375,40.2Q32,39.4 34.55,37.4Q32,35.6 29.35,34.65Q26.7,33.7 24,33.7Q21.3,33.7 18.65,34.65Q16,35.6 13.45,37.4Q16,39.4 18.625,40.2Q21.25,41 24,41ZM24,22.5Q25.7,22.5 26.775,21.425Q27.85,20.35 27.85,18.65Q27.85,16.95 26.775,15.875Q25.7,14.8 24,14.8Q22.3,14.8 21.225,15.875Q20.15,16.95 20.15,18.65Q20.15,20.35 21.225,21.425Q22.3,22.5 24,22.5ZM24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65Q24,18.65 24,18.65ZM24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Q24,37.35 24,37.35Z"/>
|
||||
</vector>
|
25
res/drawable/ic_guest_exit.xml
Normal file
25
res/drawable/ic_guest_exit.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Copyright (C) 2022 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M3,13v-2h8.65L9.1,8.45 10.5,7l5,5 -5,5 -1.4,-1.45L11.65,13zM5,15v4h14L19,5L5,5v4L3,9L3,5q0,-0.825 0.587,-1.413Q4.175,3 5,3h14q0.825,0 1.413,0.587Q21,4.175 21,5v14q0,0.825 -0.587,1.413Q19.825,21 19,21L5,21q-0.825,0 -1.413,-0.587Q3,19.825 3,19v-4z"/>
|
||||
</vector>
|
25
res/drawable/ic_guest_reset.xml
Normal file
25
res/drawable/ic_guest_reset.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Copyright (C) 2022 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,20.95q-3.025,-0.375 -5.013,-2.637Q4,16.05 4,13q0,-1.65 0.65,-3.163Q5.3,8.325 6.5,7.2l1.425,1.425q-0.95,0.85 -1.438,1.975Q6,11.725 6,13q0,2.2 1.4,3.887 1.4,1.688 3.6,2.063zM13,20.95v-2q2.175,-0.4 3.587,-2.075Q18,15.2 18,13q0,-2.5 -1.75,-4.25T12,7h-0.075l1.1,1.1 -1.4,1.4 -3.5,-3.5 3.5,-3.5 1.4,1.4 -1.1,1.1L12,5q3.35,0 5.675,2.325Q20,9.65 20,13q0,3.025 -1.988,5.288Q16.026,20.55 13,20.95z"/>
|
||||
</vector>
|
@@ -7712,6 +7712,22 @@
|
||||
<string name="user_exit_guest_confirm_message">All apps and data in this session will be deleted.</string>
|
||||
<!-- Label for button in confirmation dialog when exiting guest session [CHAR LIMIT=35] -->
|
||||
<string name="user_exit_guest_dialog_remove">Remove</string>
|
||||
<!-- Title for guest category in guest mode [CHAR LIMIT=35] -->
|
||||
<string name="guest_category_title">Guest (You)</string>
|
||||
<!-- Title for users preference [CHAR LIMIT=35] -->
|
||||
<string name="user_category_title">Users</string>
|
||||
<!-- Title for users preference when in guest mode [CHAR LIMIT=35] -->
|
||||
<string name="other_user_category_title">Other users</string>
|
||||
<!-- Title of preference to remove guest on exit option[CHAR LIMIT=35] -->
|
||||
<string name="remove_guest_on_exit">Delete guest activity</string>
|
||||
<!-- Summary of preference to remove guest on exit option[CHAR LIMIT=NONE] -->
|
||||
<string name="remove_guest_on_exit_summary">Delete all guest apps and data
|
||||
when exiting guest mode</string>
|
||||
<!-- Title of dialog shown when remove_guest_on_exit toggle is ON [CHAR LIMIT=35] -->
|
||||
<string name="remove_guest_on_exit_dialog_title">Delete guest activity?</string>
|
||||
<!-- Message of dialog shown when remove_guest_on_exit toggle is ON [CHAR LIMIT=NONE] -->
|
||||
<string name="remove_guest_on_exit_dialog_message">Apps and data from this guest session will be
|
||||
deleted now, and all future guest activity will be deleted each time you exit guest mode</string>
|
||||
|
||||
<!-- Title of preference to enable calling[CHAR LIMIT=40] -->
|
||||
<string name="user_enable_calling">Turn on phone calls</string>
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user