Commit Graph

48 Commits

Author SHA1 Message Date
Tetiana Meronyk
19fcb87e39 Hide "Add user" button for secondary user
Bug: 258447375
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest" && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.MultiUserSwitchBarControllerTest"

Change-Id: I5f0fd25fb9f710f7311275b2a840663f2bf3eeab
2022-11-09 19:35:32 +00:00
Tetiana Meronyk
3ade4a3ad7 Disable toggle on managed device with "Disallow add user" or "Disallow switch user"
Bug: 244279615
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.MultiUserSwitchBarControllerTest"
Change-Id: I3e89c8fac1828b4c9bb1c7df08687684981bda11
2022-10-24 22:06:57 +00:00
Jackson Michael
898421bd0c Adding the sections "Allow multiple users" and "Delete guest activity" on the search result
Also added new keywords strings for the both items.

Bug: 245261104
Test: Manual test and unit test
Change-Id: I3ddc1204c6dbdcd6a82ffaa55f4ca7f4bcb3783d
2022-10-13 12:31:03 +00:00
Nikhil Kumar
0661a7640f Enable Name and Avatar change without turning on multi-user
Primary user will be displayed in user list even when the
multi-user settings is disabled.
This will allow users to change the name and avatar of
primary user without enabling the multi-user feature.

Test: croot && make RunSettingsRoboTests -j40
ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"

Bug: 246732754
Change-Id: I4eb5aaf97630135960410bea7cdddc52b5848a1e
2022-09-21 14:07:42 +01:00
Anna Bauza
ab64c52f7d Merge "Fix "Turn on phone calls" for guest user" 2022-06-09 08:46:38 +00:00
Avinash Vadlamudi
9cf1d188a2 Fix the Ephemeral guest mode UI bugs
- Update the user-icon size to 40dp to align with add-icon size
- Remove the guestInfo preference and add the infoText as the summary for the guestExit preference and fix UserSettingsTest

Bug: 231592331
Test: Manual test, atest SettingsRoboTests
Change-Id: I2591bc19a7b2381d1842f0b28ab8fa19c15c19b8
2022-06-02 15:38:46 +00:00
Anna Bauza
935b735fb4 Fix "Turn on phone calls" for guest user
Move "Turn on phone calls" from guest detail user screen to user screen.
Optimisation: Applying restrictions to default guest user has been moved
to UserManagerService -> setDefaultGuestRestrictions.

Following UX there is no need for confirmation dialog.

Bug: 191483069
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.GuestTelephonyPreferenceControllerTest"
       make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: Id7391d3f85954ea7f9c94791f24174105ec8073e
2022-05-28 07:18:40 +00:00
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
Kedar Chitnis
993371d476 Merge "Revert "Guest mode UX flow updates to user settings"" 2022-03-24 13:25:21 +00:00
Kedar Chitnis
ed45e8c56a Revert "Guest mode UX flow updates to user settings"
Revert submission 16545010-kedarc-ephemeral-guest

Reason for revert: A conflicting CL got merged after presubmits were triggerred, will rebase and push again
Reverted Changes:
I86a5a1571:Guest mode updates to resolve privacy concerns in ...
I7cf205883:Guest mode UX flow updates to user settings

Change-Id: Ia09ab082bb7088831d81e10fd555cecfc8b239f3
2022-03-24 12:45:25 +00:00
Kedar Chitnis
c33384d653 Merge "Guest mode UX flow updates to user settings" 2022-03-24 11:55:17 +00:00
Matt Pietal
296b904bf1 Update multiple users strings
To match latest guidance

Bug: 219078700
Test: manual
Change-Id: Ieef884e046e1e1798cc98a553bcd902c1374d069
2022-03-23 13:39:42 -04:00
Kedar Chitnis
948dee1b6f 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
Change-Id: I7cf205883f8250178ac24c67c74b9142ceb6c1f5
2022-03-23 03:42:37 +00:00
Yasin Kilicdere
3fc4642ab4 Fix Guest string was not translated in UMS.userWithName()
This CL reverts the changes made in ag/14282598 since the issue is
solved from the source and removes 'String name' parameter from
UM.createGuest() calls.

Bug: 185309160
Test: atest UserDetailsSettingsTest
Change-Id: I92acad938d79e21b45af99cc76ff411022b61f1b
Merged-In: I92acad938d79e21b45af99cc76ff411022b61f1b
(cherry picked from commit ae871ba823)
2022-03-03 18:32:48 +00:00
Yasin Kilicdere
ae871ba823 Fix Guest string was not translated in UMS.userWithName()
This CL reverts the changes made in ag/14282598 since the issue is
solved from the source and removes 'String name' parameter from
UM.createGuest() calls.

Bug: 185309160
Test: atest UserDetailsSettingsTest
Change-Id: I92acad938d79e21b45af99cc76ff411022b61f1b
2022-03-02 00:03:00 +00:00
Oli Lan
43412bcccd Increase default user icon size.
This increases the size of the default user icon to the size specified
by the system (190dp), using the new method added in ag/16847427.

Bug: 218838295
Test: visual inspection
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: I3d88fbd1e148f0f63c796a272cd5771f4447812d
2022-02-16 11:44:50 +00:00
Yasin Kilicdere
d9281c887a Make sure activity for adding a supervised user is opened full screen.
Add supervised user activity only covers the right hand side of the
screen in large screen devices. This CL makes sure it is always
started from Settings with correct flags to be shown full-screen.

Bug: 214401383
Bug: 205101183
Bug: 199868785
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: If81e0cce91a5295eb2b93b12f68b70fd1240c953
2022-01-13 18:46:19 +00:00
Yasin Kilicdere
3a0ebebac4 Add logging for settings entrypoint to add supervised user.
Bug: 213442701
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: Ie6110b0ef5c16c9f83e3d939f78f21f003e55e35
2022-01-06 23:21:59 +00:00
Yasin Kilicdere
2a37149ec5 Add settings entrypoint to add a supervised user
Bug: 205101183
Bug: 199868785
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: Ie69786c81ec938f4c4108d7fc9c0874776331865
2021-12-14 14:47:53 +00:00
Adam Bookatz
8ca17560e5 Use UM.canAddMoreUsers and UM.isUserTypeEnabled
Settings shouldn't allow creating users if the type is diabled, and it
shouldn't allow creating more of a particular user type if no more can
be created (even if more can be created of other user types).
Previously, Settings didn't take into account the user type when
querying whether more users could be created.

Bug: 192577100
Test: com.android.settings.users.UserSettingsTest
Change-Id: I065478fd14779f528be4edce8ae215391a752ef4
2021-11-23 14:55:28 -08:00
Peter Kalauskas
c24234c301 Add tests for guest user events
Also, move ACTION_USER_GUEST_EXIT_CONFIRMED so it is only logged after
safety-check

Test: ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest" m RunSettingsRoboTests
Test: ROBOTEST_FILTER="com.android.settings.users.UserDetailsSettingsTest" m RunSettingsRoboTests
Bug: 184200796
Change-Id: Id18aa914bbb262984d7c7cf4b8a4ffdde278fd23
2021-05-10 20:36:48 -07:00
Peter Kalauskas
d7a8b0eb21 Fix NPE in UserSettingsTest
Also, introduce a check for ACTION_USER_GUEST_ADD being logged correctly

Test: m RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Bug: 183920589
Change-Id: Ie4fdf4b3429a9abec64120a38a13f2d8a3fa121a
2021-03-29 15:54:01 -07:00
Tsung-Mao Fang
00956fb4e1 Apply top intro preference in Settings app (1/n)
Based on content in footer, we need to convert some footers
to top info prefernce.

Test: Run robo test and see the screens
Bug: 173087905
Change-Id: Ie62a503481f9d385f5468896fba8f607cb3437d3
2020-11-16 18:44:40 +08:00
Alexander Dorokhine
46e85a2fad Migrate away from deprecated Truth APIs.
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.

Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
2020-09-24 23:09:41 +00:00
Colin Cross
38fa185a27 Revert "Snap for 6793014 from 3777d883a3857b1a1589181c436d9018d7..."
Revert "Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528460c8b..."

Revert "Snap for 6793014 from a43295d1825da62af038d345a7a861ed7a..."

Revert "Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb386109..."

Revert "Snap for 6793014 from d0e31526c62b2aeb35c293ac96feb180fc..."

Revert "Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376efabd2..."

Revert "Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293b79684..."

Revert "Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57a8e7d5..."

Revert "Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aad87a67..."

Revert "Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24af9964..."

Revert "Snap for 6793014 from 14cb57e107a3abce8b14937b1f92c28d18..."

Revert "Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc03a606..."

Revert "Snap for 6793014 from 8c65adad0bcdfb3acc561063b4048dca24..."

Revert "Snap for 6793014 from b3061942700265e2bf04af9997775dcbbb..."

Revert "Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd0ac3be..."

Revert "Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec70d8da6..."

Revert "Snap for 6793014 from 988d4244914e0c749655e8cb6db18ba44f..."

Revert submission 12465146-release-request-6b259cbc-1f45-4b05-bc7e-c9b893b79d68-for-git_main-busytown-release-6793014

Reason for revert: b/166531456
Reverted Changes:
I5ff7a6c0d:Snap for 6793014 from f2989f9c65556d5155dbd57f82f0...
I77bdff943:Snap for 6793014 from a43295d1825da62af038d345a7a8...
I2ac5c520a:Snap for 6793014 from c3f124cca05579acf0a6cb589ebd...
I023b9702f:Snap for 6793014 from 98756d6d3e2bb0ba28eb125caa7a...
Ibc7893d72:Snap for 6793014 from fd1ad6750ef332d3f50f218f4d5d...
Ic27847bee:Snap for 6793014 from 8c65adad0bcdfb3acc561063b404...
If20bc9352:Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376...
I6542d17e8:Snap for 6793014 from 3777d883a3857b1a1589181c436d...
I66e6bb8a9:Snap for 6793014 from 8b8bf0a07b0521bbe8483fbbab12...
I3cd190b6b:Snap for 6793014 from 424180bdc4aa18249e678daebfd0...
If92db7402:Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc...
Iaced03c87:Snap for 6793014 from d0e31526c62b2aeb35c293ac96fe...
I5d28c6b4b:Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aa...
I30d07bea3:Snap for 6793014 from 7594ec6384c4da320726def34f47...
I473205f48:Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd...
I0656b41af:Snap for 6793014 from 44725f06b7f7d6407b5ee82d989b...
I0f9796067:Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec7...
I9a38cda8f:Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb...
I876a82f51:Snap for 6793014 from 11467102abddb6026aaa164c1361...
I749d7d023:Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293...
I038daea41:Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24...
I47aa3131c:Snap for 6793014 from 14cb57e107a3abce8b14937b1f92...
I32dba8a95:Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528...
I2ebc9f9db:Snap for 6793014 from 988d4244914e0c749655e8cb6db1...
Iae7c3370f:Snap for 6793014 from 9ffb8852294e06e2d387dc1fb868...
I6467a7f1b:Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57...
I8c6375203:Snap for 6793014 from b3061942700265e2bf04af999777...
I843b2e1f3:Snap for 6793014 from 265280bf5cb4bc14e132c3a35ae5...
Ie254f7079:Snap for 6793014 from f22ad3164937a8f2e309965c102b...
I01e0974ed:Snap for 6793014 from bbbccc3c2b7fc7c5780f6c415c42...

Change-Id: Ie8b2b332f7ebaaee7cd39c6f94d280c047426bc9
2020-08-27 04:12:26 +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
Andras Kloczl
4d7d4effa5 Improve multi user settings screen
- 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
2020-05-07 22:01:33 +01:00
Edgar Wang
fff8c56de2 Revert "Improve multi user settings screen"
This reverts commit d19dc306dd.

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
2020-05-07 09:24:47 +00:00
Andras Kloczl
d19dc306dd Improve multi user settings screen
- 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
2020-05-05 13:45:01 +01:00
Raff Tsai
6db277ebb7 Remove summary provider
- 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
2019-10-03 15:04:36 +08:00
Pavel Grafov
19cf0b4580 Don't hide "Add user" when disallowed by admin
Bug: 125226170
Test: atest tests/robotests/src/com/android/settings/users/UserSettingsTest.java
Test: manual, with TestDPC
Change-Id: I347fae04030e04325a5ee5c634f782e554ece263
2019-02-21 13:38:53 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Fan Zhang
67793945f0 Remove custom robotest utils in favor of framework support.
Bug: 111195450
Fixes: 111195167
Test: robotests
Change-Id: I8bea43fd86f9ae5ce40eb16dabf733b0fbe89aae
2018-09-26 17:28:08 -07:00
Jonathan Scott
ba3b68686d Add policy transparency to disallow remove user.
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.
2018-09-19 09:32:35 +01:00
Doris Ling
73d7773eb2 Fix visibility of AddUser when toggling multiuser.
- 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
2018-09-12 12:33:46 -07:00
Doris Ling
e845b40f35 Do not show AddUser if adding user is not allowed.
- 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
2018-09-07 14:08:49 -07: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
f12e6adcdc Settings Fragment Migration (Fix test cases)
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.

Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
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
2018-07-11 18:23:51 -07:00
Yongjiang Wu
5b120e7479 Fix new user setting in a call
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
2018-07-03 14:20:39 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
jeffreyhuang
ba3f71b355 move tests to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I559b2f45b5121eedecad0cdffba68220f7a4d0cb
2017-12-01 15:23:19 -08:00
Fan Zhang
4e540db06d Update app icon for ManageDomainUrls setting
Change-Id: I6c26a055983ea72049d1633336d6da8736a78fa0
Fixes: 69057114
Test: robotests
2017-11-09 11:02:23 -08:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
Doris Ling
8f62b9e70a Add test for UserSetting's summary provider.
Change-Id: I5197c109f65f4049e27e704552a2206b19919df3
Fix: 36540644
Test: make RunSettingsRoboTests
2017-03-23 16:08:39 -07:00
Doris Ling
ed0fc506a3 Removed emergency info and add user when locked from Users settings.
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
2017-02-24 12:38:57 -08:00
Doris Ling
34a4c804f8 Removed emergency info and add user when locked from Users settings.
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
2016-12-27 16:35:22 -08:00