Commit Graph

13 Commits

Author SHA1 Message Date
Kedar Chitnis
fa49a4f111 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
2022-04-04 05:28:21 +00:00
Anna Bauza
ee23152051 Fix "Remove Guest" option shows "Reset Guest" dialog
If the guest user was not auto created, removing the user from settings message was wrongly worded. Small refactor to reuse the same wording in different modules has been done.

Bug: 225314166
Test: manual
Change-Id: Ia1871efc6aeeb2d3604c2fc4fd98a2a3a500953b
2022-03-30 08:20:04 +00:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Jonathan Scott
269f97d960 Allow overriding of strings referenced in XML files.
Test: manual
Bug: 188414370
Change-Id: Ice45b1808530c14c4efff16795cac7b2cb81516e
2022-02-07 21:00:05 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Peter Kalauskas
8d37a2bb85 Make use of config for auto-created guest users
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
2021-06-24 17:40:12 -07:00
Mill Chen
e31fcb6dda Avoid double-badging application icon in the dialog
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
2021-02-25 09:24:40 +00:00
Andras Kloczl
4e2a0717c9 Change user setup prompt dialog showing logic
- 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
2020-06-09 23:06:00 +00:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
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.
2018-07-20 11:32:13 +08:00
Kenny Guy
7a3555961d Add support messages to device admin pages.
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
2016-01-06 17:21:45 +00:00
Sudheer Shanka
bc95630994 Update warning dialog on work profile deletion.
Bug: 20024761
Change-Id: I23b0eaa7742d9d23a29a2a48ab6e3d92fe310560
2015-04-28 11:32:09 +00:00
Fyodor Kupolov
dbbd4fca44 Show confirmation when turning on "Phone calls/sms"
Added confirmation dialog, when turning on "Phone calls and sms" setting for
secondary users and guests.

Bug:15761405
Change-Id: I39b2181f0b5460db9a964c6883f053a6c6336622
2015-01-08 11:21:26 -08:00