summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/users
Commit message (Collapse)AuthorAgeFilesLines
* Fix multi user crash when Add guest was tapped multiple timesAndras Kloczl2020-07-141-0/+1
| | | | | | | | | | | | | | When "Add guest" got tapped multiple times then the first click starts the guest creation process which blocks the UI thread for around 2-3 seconds, then triggers the open guest details intent, and the second tap event starts another guest creation, but it fails (since there can't be more than 1 guest on the device) and returns null, and in the openUserDetails we get NullPointerException. Test: manual test Video: http://shortn/_i4Dce33yhl Bug: 160267016 Change-Id: I9a4f0a91295e336d246abe5f5470682a14cb510f
* Change user setup prompt dialog showing logicAndras Kloczl2020-06-093-121/+88
| | | | | | | | | | | | | | | - 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
* Improve multi user functionality for restricted usersAndras Kloczl2020-05-297-270/+153
| | | | | | | | | | | | | - Restricted users can change their name - Improved App&Content access screen - Remove "Turn on phone calls" from restricted user detail page Doc: http://shortn/_Prb3SJ3xJ3 Bug: 142798722 Test: Run robo tests with this command: make -j64 RunSettingsRoboTests Change-Id: I2aadf32aef52ba5ad0db7aa0cd83bac9d9941589 (cherry picked from commit f4759e00d53671b273dee3d6c9e62203df6f629b)
* Opening Multiuser doesn't toggle it onAdam Bookatz2020-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | | This does the following: Simply opening Settings > Multiuser no longer globally enables multiuser. The user would have to actively toggle that switch to globally enabled it. (This reverts ag/7002640; a different solution for that cl's bug is in the same topic as this cl.) Bug: 137943217 Bug: 141372193 Bug: 149973281 Bug: 130270878 Test: manual: Settings > Multiuser doesn't turn on the systemui avatar Test: manual: adb shell pm create-user A, does turn on sysui avatar Change-Id: Ibfdd1dee408c7214d0a097c8d814dae87ffa82ac
* Improve multi user settings screenAndras Kloczl2020-05-075-308/+320
| | | | | | | | | | | - Added switch and user delete functionality to details screen. - Added robo tests. Screenshots: http://shortn/_S6fbIMhAYO Bug: 142798722 Test: Run robo tests with this command: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest" Change-Id: Ied67290e8fed87feb0a60a3f2c40eb91cc57988e
* Revert "Improve multi user settings screen"Edgar Wang2020-05-075-320/+308
| | | | | | | | | | | This reverts commit d19dc306ddbb0289063acf860d78a7c194b7a6d6. Reason for revert: this CL made Settings the test cases called shadowUserManager.hasUserRestriction() https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=07150153-ccb7-4215-a9f8-eed31e44c66f&target=RunSettingsRoboTests1-test-output Bug: 142798722 Change-Id: I3937a07ee35a472cadd6db8cd0177e08e63516a4
* Improve multi user settings screenAndras Kloczl2020-05-055-308/+320
| | | | | | | | | | | - Added switch and user delete functionality to details screen. - Added robo tests. Screenshots: http://shortn/_S6fbIMhAYO Bug: 142798722 Test: Run robo tests with this command: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest" Change-Id: Id51c12c5470e30e2dffe93f3bd8c22380d8bdc1f
* Merge "Revert "Don't write user_switcher_enabled value when enter this ↵TreeHugger Robot2020-04-151-0/+2
|\ | | | | | | Settings"" into rvc-dev
| * Revert "Don't write user_switcher_enabled value when enter this Settings"Daniel Chapin2020-04-141-0/+2
| | | | | | | | | | | | | | | | | | This reverts commit 898d6b4d73f40b08a91f69dbdf3b67550f1df198. Reason for revert: Causing a regression Bug: 153944718 Change-Id: If96441618d32a65b0bae4c5c26fb3b278556cc8c
* | Merge "Don't write user_switcher_enabled value when enter this Settings" ↵TreeHugger Robot2020-04-131-2/+0
|\| | | | | | | into rvc-dev
| * Don't write user_switcher_enabled value when enter this SettingsEdgar Wang2020-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | Settings side should not set user_switcher_enabled value when user just visit settings. It will force enable user_switcher_enabled without user confirm. Bug: 141372193 Test: manual & robotest Change-Id: I1bbe166a45837919cbc22a7c42e72251e64cc67f
* | Move strings related to user creation to SettingsLib.Ben Murdoch2020-03-231-20/+30
|/ | | | | | | Test: Build, manually check device. Bug: 147653252 Bug: 152038380 Change-Id: I921d7907eca5c6bd6585f89e5dd5b6b6222bc745
* Update the OWNER filesSunny Shao2020-03-111-6/+0
| | | | | | Bug: 151179432 Test: manual review Change-Id: I2bfd917c2bea2d71303ed9aecf29d850f12eec3d
* Fix NPE in AddUserWhenLockedPreferenceController.Ben Murdoch2020-02-172-8/+2
| | | | | | | | | Set LockPatternUtils in constructor, but allow it to be overridden for tests. Bug: 149511500 Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.AddUserWhenLockedPreferenceControllerTest" Change-Id: I4148fec8eea9c76afebe45cc29c2c87775fd3b1e
* Revert "Revert "Show "Add users from lock screen" dependent on secure lock ↵Ben Murdoch2020-02-112-2/+17
| | | | | | | | | | | | | | screen."" And fix the failing test that caused the revert. Bug: 148015798 Bug: 149209670 Test: make -j64 RunSettingsRoboTests This reverts commit 666dacc32aafd2ee5dea5564367598855825eed8. Change-Id: I34bb82e621e009ec26c28835f309e7a5b996e9b3
* Revert "Show "Add users from lock screen" dependent on secure lock screen."Jon Spivack2020-02-102-11/+3
| | | | | | | | This reverts commit 0149363a394e3a565e6958cdca41b5621c4209d2. Reason for revert: Droidcop: Potential culprit for Bug 149209670- verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Change-Id: Ia1f1ce35ef5d93664cf665bea86a472376b84aab
* Show "Add users from lock screen" dependent on secure lock screen.Ben Murdoch2020-01-242-3/+11
| | | | | | | | | | SysUI only enforces this setting while a secure lock screen is set, so it doesn't make sense to show it configurable while an insecure lock screen is set. Bug: 148015798 Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.AddUserWhenLockedPreferenceControllerTest" Change-Id: I186b2339e9575e20b55e2e5c1dab3de624848fc5
* Refactor Add new user / restricted profile UX flow.Ben Murdoch2020-01-233-99/+200
| | | | | | | | | | Incorporate the choose user name / avatar into the user creation flow so that we don't end up with many "New User"s. Bug: 147653252 Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.EditUserInfoControllerTest" Change-Id: Ie19230791d8b50c8ab04df89909606179364ebab
* Hide search box if it is called in initial setup wizardRaff Tsai2019-10-181-2/+5
| | | | | | | | | | - Search box is hidden if user set intent extra isSetupFlow true Fixes: 135717823 Test: search box is hidden in the following command adb shell am start -a android.settings.SETTINGS --ez isSetupFlow true Change-Id: Ia3d955c9390d6b0eef9391b9b35b6a483eb63d26
* Remove summary providerRaff Tsai2019-10-031-25/+0
| | | | | | | | | | | | - use SummaryProvider to provide the summary of UserSettings - use WifiDisplayPreferenceController to replace the summary loader in WifiDisplaySettings - use ConfigureNotificationPreferernceController to replace the sumary load in ConfigureNotificationSettings Fixes: 141653158 Test: robolectric Change-Id: Id5f5ed645707caa0b25ecae5252174cbf017651c
* Use SettingsLib IndexableRaff Tsai2019-09-251-2/+0
| | | | | | | | | - Use SettingsLib Indexable - Directly use resource id in getPreferenceScreenResId Bug: 135053028 Test: roboletric Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
* Directly use BaseIndexableProviderRaff Tsai2019-09-241-1/+1
| | | | | | | | | | | - Add function getXmlResourceId, Fragments don't need to write xml resource id twice. - Remove getPreferenceControllers from Indexable.java. Because it will move to SettingsLib later for other apps which don't need this function Bug: 135053028 Test: robolectric Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
* Merge similar BaseSearchIndexProvider code togetherRaff Tsai2019-09-121-12/+1
| | | | | | Bug: 135053028 Test: robolectric, check search_index.db contains the same items Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
* Use FooterPreference in xml explicitlySunny Shao2019-08-262-19/+10
| | | | | | | | | Removed the FooterPreferenceMixin from the UserSettings page. Fixes: 140008560 Test: manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.users Change-Id: If6da2bd2f6a72d8e61b8c8bca9e3179cfdee05e6
* Merge "If cannot add restricted profile, don't suggest it" into qt-devBookatz2019-06-171-0/+4
|\ | | | | | | | | | | am: a5018be48a Change-Id: Ic94e5f918a0db96dd21d8f719231bb65f31bd613
| * If cannot add restricted profile, don't suggest itBookatz2019-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, on devices that cannot add a restricted profile (e.g. most phones), the Multiple users menu had an option to "Add user", whereas for devices that can, the option read "Add user or profile". Now it only says the latter, due to ag/6412347. We add back the original wording here. Fixes: 135294519 Test: manual confirmation on a phone that text says "Add user" Test: m -j ROBOTEST_FILTER=UserSettingsTest RunSettingsRoboTests Change-Id: Ia166b6ff9c69c0042e8a781be1146a5622177121
* | Use if instead of switch for resourcesColin Cross2019-05-131-15/+12
|/ | | | | | | | | | | | Converting to Soong will move some code from directly compiled into the app to compiled into an Android library and then shared between the app and the tests. This will cause resource IDs in the library to become non-final, which means they can no longer be used in case statements. Convert affect case statements to if blocks. Test: m RunSettingsRoboTests Change-Id: I25742a374f06d3fa4decbfc0d223a350acc50881
* Merge "Creates user_switcher_enabled setting to match setting" into qt-devTreeHugger Robot2019-04-101-0/+2
|\
| * Creates user_switcher_enabled setting to match settingFabian Kozynski2019-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | When the user enters UserSettings, the switch displays the setting as on, but the setting is not created until the user modifies this for the first time. This change makes sure that the setting is created when the user enters UserSettings for the first time. Fixes: 130270878 Test: manual, switch to second user and observe switcher icons. Change-Id: I30bc5025c178da3668a76c828c34545c1d98b085
* | Add null check in UserPreferenceFan Zhang2019-04-081-11/+15
|/ | | | | | | | The comparator can get null objects according to bug report. Fixes: 130144755 Test: manual Change-Id: Ic8a332d390f411d2eb69c944fb7fd166d9961535
* Remove "Add users from lock screen" from secondary usersRaff Tsai2019-03-072-7/+9
| | | | | | Fixes: 124885010 Test: Robolectric, manual Change-Id: I1c940fda2fa5f3da39c19bd119ac483024f5a83b
* Use Device Policy dialog in switchbarRaff Tsai2019-02-271-4/+18
| | | | | | | | We need to pop dialog when switchbar is disabled by Device Policy Test: visual, robolectric Fixes: 124855614 Change-Id: Ief65baa2c4912cb7c85d5eccc2c0f363d2fc898b
* Don't hide "Add user" when disallowed by adminPavel Grafov2019-02-212-18/+15
| | | | | | | Bug: 125226170 Test: atest tests/robotests/src/com/android/settings/users/UserSettingsTest.java Test: manual, with TestDPC Change-Id: I347fae04030e04325a5ee5c634f782e554ece263
* Migrate all MetricsProto enums to SettingsEnumsFan Zhang2019-01-176-26/+25
| | | | | | Bug: 122855168 Test: rebuild Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
* Move LocationSettings to top level page.tmfang2018-11-051-1/+1
| | | | | | | | | | - Create some location icons for different scenario. - Remove Location in Security page. - Move Location Setting to top level page. Test: robotest, visual Bug: 116628158 Change-Id: I3f57ef49a396877bfbeaefea7dc4f4051e0ccc65
* Add policy transparency to disallow remove user.Jonathan Scott2018-09-191-4/+8
| | | | | | | | On the Settings > System -> Multiple users screen, ensures that the"Delete from this device" menu is always available, but is disabled and includes policy information when DISABLE_REMOVE_USER is set. Change-Id: Ia6c6cfb360f35a6e447bf9d85d2472ac11dde1ac Fix: 113807450 Test: m ROBOTEST_FILTER=UserSettingsTest -j40 RunSettingsRoboTests; CTS Verifier Device Owner Tests/Policy transparency test/Disallow remove user.
* Fix visibility of AddUser when toggling multiuser.Doris Ling2018-09-121-1/+2
| | | | | | | | | - when enabling multi user, also need to update the visibility of the Add user preference, but need to check the add user capability as well. Change-Id: Ia243901c7537bdb39ca3a39aed559b003f803e4d Fixes: 115397726 Test: make RunSettingsRoboTests
* Do not show AddUser if adding user is not allowed.Doris Ling2018-09-071-1/+1
| | | | | | | | | | | - when multi user is enabled, we should keep the current visibility for AddUser preference, since earlier check has been done to update its visibility according to the add user capability. We should only set the visibility to false if multi user is disabled. Change-Id: I246e9242f255dbd57c5309b2d16c95d202607531 Fixes: 114241868 Test: make RunSettingsRoboTests
* RestrictedLockUtils was split into ...InternalPhilip P. Moltmann2018-08-305-10/+13
| | | | | | | | | | | | | | This means that in some cases RestrictedLockUtils has to be used and in some RestrictedLockUtilsInternal. This causes a lot of trivial code changes. I also updated the ordering of the imports in all affected files. Bug: 110953302 Test: Built make -j RunSettingsRoboTests Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
* Sort importsFan Zhang2018-08-2811-38/+38
| | | | | | | | Having consistent import order will reduce chance of merge conflict between internal and external master Test: rebuild Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
* Declare "searchable" attribute for preferences.Fan Zhang2018-08-161-11/+13
| | | | | | | | | Now we can easily mark a preference nonIndexable in xml instead of adding key into searchIndexProvider. Bug: 112608186 Test: robotests Change-Id: I0ff16d44bb7b6ad148d3d35f09ca0da0163f73f4
* Fix profile photo chooserAntony Sargent2018-08-071-6/+12
| | | | | | | | | | | | | The underlying Dialog API changed when it returns true for isShowing() in a way that broke our profile photo chooser, but it turns out it was an intended change and we were depending on it in a way we shouldn't have been. Instead we'll just keep track of whether we were showing the dialog by using an already existing boolean flag that gets set before we start the photo collection activity. Fixes: 110101157 Test: make -j RunSettingsRoboTests Change-Id: I166230e85142c348b6760e436324261f2a41f1e0
* Migrate all AlertDialogs to AndroidX versiontmfang2018-07-205-5/+6
| | | | | | | | | 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.
* Settings Fragment Migration (Build pass app)tmfang2018-07-112-4/+5
| | | | | | | | This patch focused on fixing compile errors and some runtime errors. Test: We can't test it now. But we will have an integration test later. Bug: 110259478 Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
* Settings Fragment Migration (Change imports)tmfang2018-07-116-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit *only* changes imports and optimize imports. We don't do anything else. This patch can't compile pass and run test case. We will update other patches to fix these problem. Change list. 1. import android.app.Fragment; -> import androidx.fragment.app.Fragment; 2. import android.app.DialogFragment; -> import androidx.fragment.app.DialogFragment; 3. import android.app.ListFragment; -> import androidx.fragment.app.ListFragment; 4. import android.app.LoaderManager; -> import androidx.loader.app.LoaderManager; 5. import android.content.AsyncTaskLoader; -> import androidx.loader.content.AsyncTaskLoader; 6. import android.content.Loader; -> import androidx.loader.content.Loader; 7. import android.app.FragmentTransaction; -> import androidx.fragment.app.FragmentTransaction; 8. import android.app.FragmentManager; -> import androidx.fragment.app.FragmentManager; 9. import android.app.LoaderManager.LoaderCallbacks; -> import androidx.loader.app.LoaderManager.LoaderCallbacks; Bug: 110259478 Test: Can't test it. Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
* Fix new user setting in a callYongjiang Wu2018-07-031-6/+15
| | | | | | | | | | | In a call, the flag of UserManager is changed, then "Add user" and "Guest" items in Settings are still enabled. To fix this issue, these items will be disabled according to "UserManager#canSwitchUsers". Bug: 80447394 Test: make RunSettingsRoboTests ROBOTEST_FILTER=UserSettingsTest Change-Id: Ib4c754603418528f5c6f1c78b8aabf33e863c8b9
* Misc tweaks to Indexable usage and tests.Fan Zhang2018-07-021-1/+1
| | | | | | | | | | | | - Make SettingsPreferenceFragment implement Indexable directly - Add existing fragments that are SettingsPrefFragment but not Indexable to grandfather list. - Fix "font size" fragment so it shows up in search properly. - Remove duplicates for "lock screen display", "Screen saver". Bug: 70720645 Test: robotests Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
* Reorder and clean up imports.Fan Zhang2018-06-186-15/+19
| | | | | Test: rebuild Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
* Add a switchbar to turn off multi-user feature entirelyFan Zhang2018-06-115-66/+223
| | | | | | Change-Id: Ibf88bf37899af5065c68aeb2337acd4ee48bc13c Fixes: 72319180 Test: robotest on new controller. Manual test on UserSettings fragment.
* No-op clean up on UserSettings to make it more readableFan Zhang2018-06-051-18/+29
| | | | | | Bug: 72319180 Test: existing tests Change-Id: Ie7a327658d1fe16055aad7e90ecffc1e56eb6657