Removed the FooterPreferenceMixin from the UserSettings page.
Fixes: 140008560
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.users
Change-Id: If6da2bd2f6a72d8e61b8c8bca9e3179cfdee05e6
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
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
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.
- 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
- 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
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
Now we can easily mark a preference nonIndexable in xml instead of
adding key into searchIndexProvider.
Bug: 112608186
Test: robotests
Change-Id: I0ff16d44bb7b6ad148d3d35f09ca0da0163f73f4
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.
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
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
- 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
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.
Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
- Suppress one of results from "On lock screen"
- Remove screen title from sub sections in data usage screen.
- On UserSettins, index using resource instead raw. And build
non-indexables using getNonIndexable and pref controlleres.
Change-Id: I947a97af60f1a08b237fda2f3c456cf1105b9231
Fixes: 74120518
Fixes: 74119743
Fixes: 74250251
Fixes: 74119687
Test: reindex
- Moved HighlightableAdapter to its own class
- Replaced ripple with blue background
- Bluebackground only stays for 5 seconds. After that it's replaced by
?attr/selectableBackground
Misc fixes.
- Fix NPE in UserSettings
- Update char limit on a new string
Change-Id: I4687e54e71fd7b9243f520b7630563df58be23d4
Fixes: 71715698
Fixes: 72761974
Test: robotests
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