If frameworks config config_guestUserAutoCreated=true, then Settings
will:
- Create a new guest user any time the current guest user is removed
- Show "Guest" instead of "Add guest"
- Show "Reset guest" instead of "Remove guest"
Bug: 188542158
Test: With config_guestUserAutoCreated=true, delete current guest user
using adb (`adb shell cmd user list -v --all` to find the user
ids, then remove each guest user with `adb shell pm remove-user
<id>`), then as owner, open multi-users settings page. Check that
there is a item for "Guest" instead of "Add guest". Select
"Guest", then confirm there is an item for "Reset guest" (it
should be disabled). Select "Switch to guest", then switch back to
owner. Open the multi-users settings page again. Check that "Reset
guest" is now enabled. Tap "Reset guest", and press confirmation
button, named "Reset". You should be take back to the main
multi-user settings page and still see "Guest". Wait a few
seconds, then use adb to confirm there is a guest user present.
Test: With config_guestUserAutoCreated=true, switch to guest user, open
multi-users settings page, check that there is an option to "Reset
guest". Select "Reset guest", and press confirmation button, named
"Reset". Phone should switch back to last active user, and QS tile
should now show "Guest" instead of "Add guest". Run `adb shell cmd
user list -v --all` to confirm guest has a new user id.
Test: With config_guestUserAutoCreated=false, confirm that "Add guest"
and "Remove guest" features remain unchanged
Change-Id: I7d5b81bd2e5c6b999ae18cd6b1280ae0496db94b
When creating a confirmation dialog for removing work profile, it will
fetch an icon from ApplicationInfo and badge the icon. However, the
cases of double-badging icon are happening in the some devices with
higher density, which means the icon has already had a badge after
getting it from ApplicationInfo. So this change attempts to directly use
the icon.
Bug: 148137991
Test: visual, manual
1. Install Test DPC from Play Store
2. Setup work profile
3. Settings -> Security -> Device admin apps
4. Click Test DPC item which has the badged icon -> Remove work profile
5. Observe the icon of the confirmation dialog
Change-Id: I126bb799e37e168fb5fbc76107c0c897a6be2f9a
- Extract user setup prompt dialog creation logic
- Move user setup prompt dialog showing to UserDetailsSettings
- Rename user click and creation related methods to improve readability
- Set "disabled by admin" for switch pref when switch is disabled
- Cleanup UserSettings and UserDetailsSettings onPreferenceClick
- After a guest is created the details page opens instead of switching
Test: Manual test and robo tests with this command:
make -j64 RunSettingsRoboTests
Demo: http://shortn/_ACYsnbIKO9
Bug: 156867277
Change-Id: Ifa0cdefcd49d5b865e940a7cc332136ed26ecf57
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This CL only changed AlertDialog imports.
So, reviewer can review it easily.
Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
Add support message to device admin settings pages.
Show policy information for device owners
and profile owners.
Allow a user to remove profile from profile owners
admin page.
Bug: 26416662
Change-Id: I95424da50067b7c0ba1618a083a31448d406188f
Added confirmation dialog, when turning on "Phone calls and sms" setting for
secondary users and guests.
Bug:15761405
Change-Id: I39b2181f0b5460db9a964c6883f053a6c6336622