Disallow the following actions which result in switch user when DISALLOW_USER_SWITCH is set
- Creating guest
- Showing user setup dialog for newly created user
- Clicking uninitialized user preference
Bug: 71694430
Test: CTSVerifier DeviceOwnerPositiveTest - DISALLOW_USER_SWITCH
Test: m -j ROBOTEST_FILTER=UserCapabilitiesTest RunSettingsRoboTests
Test: m -j ROBOTEST_FILTER=AddUserWhenLockedPreferenceController RunSettingsRoboTests
Test: m -j ROBOTEST_FILTER=UserSettingsTest RunSettingsRoboTests
Change-Id: Ia4c7e7b4947bfaf2ebeef4d32a473bdac542d6a6
- Hide add user button when it's not functional
- Display "No accounts added" under accounts setting when there is no account.
Change-Id: Iefede9939d206eb3064fa22bdcfbcb1e826f29ab
Fixes: 72643060
Test: robotest
Test: 72713118
- Rename UserAndAccountDashboard* to AccountDashboard*
- Move emergency info from account to device info page
- Move auto sync data toggles (4 of them) from Account page to user page
- Move the controllers too. UserSettings is a not a DashboardFragment
so I had to manually call each controller method.
TODO: refactor UserSettings to a DashboardFragment
- Move legal information/regulatory info above advance button within device info page.
Fixes: 72523158
Bug: 71871075
Test: robotests
Change-Id: I1b8af8af61e49d17926f984978a09a974b6c62e1
getDefaultUserIcon now takes resources as parameter for the sake of
resource overlaying.
BUG=69355037
Test: Factory reset and go to settings -> User, observe the new color.
Change-Id: I504acf00c4616c342d2b8e99b061e4043b34c378
- DimmableIconPreference is not a support pattern.
- Also updated a few icon tint colors to match with the rest of screen.
Bug: 68426851
Test: visual
Change-Id: Ia18d9f74458237403b94d3474cf09050d2039428
Settings app crashes when tapping Home key while adding new user because
UserSettings#showDialog() is called after onSaveInstanceState().
To fix this issue, a dialog should not be shown after onPause().
Fixes: 68485787
Test: manual - tap Home key while adding new user
Change-Id: I2ddd119b6558927798a52c7977e6fd8137734c93
This is needed since the user switch will be hidden by default in
QS and will show up once multi-user has been activated in some way.
Test: click on guest
Bug: 37152893
Change-Id: I351a5d95e9e8a5e47e388d9f0611924b077754da
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.
Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.
Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
- add back the summary loader for UserSettings
- remove "configure" preference category
- add summary for Auto sync data and update the title
Change-Id: Ia00397f775f86d0e160a54783a8518847fce8de8
Bug: 36540644
Test: builds
In new IA, Emergency Info and Add user when locked has been moved to
Users & accounts page.
Change-Id: I1a1e4bd801936b654d8a4ede7cfc64e2ac285019
Fix: 33703736
Test: make SettingsTests
- Add a method in VisibilityLoggerMixin to log visible event using
LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
to next page.
- In next page's onResume(), extract the previous page's metricsCategory
and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters
Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
- Use static summary for most items
- Move summary for user setting to user&account setting
Bug: 34975053
Test: RunSettingsRoboTests
Change-Id: I9bf87267778dc5933f97f5d3b9ae0f4f0b8da1a8
When user press back button while adding user, app may crash because
of null context. In this cl, I add NPE check for context in method
assignDefaultPhoto and change this method to return boolean value.
If the return value is false, then stop the following steps(e.g.
creating a dialog after pressing button may also cause crash.)
Bug: 33829308
Test: make -j40 RunSettingsRoboTests
Change-Id: I811b92c268fb20f8c43ab3b0a9ceebe76f5d83be
If new IA is enabled, Emergency Info and Add user when locked has been moved to
Users & accounts page, so Users page should not show them.
Also fix the issue that update for the add user when locked switch does
not persist correctly.
Change-Id: I26d9f59d0f4bf3fd36a7d07d13f95127b40a8a3e
Fix: 33703736
Test: make RunSettingsRoboTests
Add auto sync to User & accounts dashboard, and update
UserSettings to use the emergency info and add user when locked
controllers.
Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ibf5a886276a9aa8f53c548036aecfd6c4d759ae3
Add two items to User & accounts dashboard, and refractor
UserCapabilities so that it can be accessed in the new controller.
Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ib446ad6c99d4cc6405a17cf82d2d86e044870b73
- Added a activity-alias pointing to displaySettings as top level
setting item.
- Refactored all preference logic in DisplaySettings into
PreferenceControllers. During fragment onAttach it installs all
controllers, and during onResume it updates preference state. Each
controller listens to its own preference change event.
Bug: 31800242
Test: RunSettingsRoboTests
Change-Id: Ibc9bf200c5acce7c4ae9292340822afee27a3a28
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
The summary of "Add user" item is not displayed.
To show it, useAdminDisabledSummary should be false.
Bug: 30005296
Change-Id: Ia33cab4d671f42bd971acbf5523da1c4d21948e1
Setting selectable=false is required for proper A11y. Otherwise Talkback
will inform the user that the item can be activated.
Bug: 29025567
Change-Id: I2b61c622c2d69fa83640f7822349613f51f849d5
If the user photo was deleted in the Myself contact, the change
was not reflected neither in Settings/Users nor in expanded
status bar. This was because the ProfileUpdateReceiver did not
handle the case where the updated image was null (deleted).
Fixed by assigning default user icon in UserManager if no photo
found in the profile update.
AOSP change: https://android-review.googlesource.com/#/c/153137
Bug: 28031914
Change-Id: I2f452f78dcf777414f50b133b1a9cee334bbd9a8
Also added a utility function for checking provisioning, instead of
repeating code for this check in several places.
bug:26156445
Change-Id: I9f4a280dd0cdf889f892e386dbf6a3fdb2a052ef