Commit Graph

12 Commits

Author SHA1 Message Date
Tetiana Meronyk
dc0c58b427 Make Multiuser toggle disabled for all non-main users
Only let main user (Owner) change state of the toggle
Bug: 336764498
Test: atest MultiUserSwitchBarControllerTest

Change-Id: Ib694d1cb4685764c64633efc090765b470a0a015
2024-05-01 17:21:14 +00:00
Tetiana Meronyk
1a81a9e942 Revert "Disable multiuser toggle om COPE device and add explanat..."
Revert submission 25262217-fix_mu_for_cope

Reason for revert: This issue requires a different approach to the solution.

Reverted changes: /q/submissionid:25262217-fix_mu_for_cope

Change-Id: Ic6e8afd76cb0af88612cf5a6cd34a0c7f50759c4
2023-12-14 15:38:03 +00:00
Tetiana Meronyk
80ae4b3c41 Disable multiuser toggle om COPE device and add explanation dialog
Bug: 304359233
Test: set up device in COPE mode and check toggle in Settings -> System -> Multiple Users

Change-Id: I0edd58651f94c9f9a51349025a29e33a1e1a9c14
2023-11-09 14:46:55 +00:00
Tetiana Meronyk
8489ae99dc Revert "Disable multiuser toggle when more than 1 user is created"
Revert submission 24420426-multi_toggle

Reason for revert: This change needs to be done along with some other UI changes to avoid confusion

Reverted changes: /q/submissionid:24420426-multi_toggle

Change-Id: Ife2e03d0090fefcb4c1fa53dd007336759eb1bc7
2023-09-07 15:50:09 +00:00
Tetiana Meronyk
7968047fc5 Disable multiuser toggle when more than 1 user is created
It makes more sense to have the toggle as on permanently as long as there are other users on the device. Otherwise if we toggle off "Allow multiple users", other users get hidden. Also with current behaviour the any admin can switch the toggle and this can block any other user, including main, from being able to use the device.

Bug: 295183792
Test: atest MultiUserSwitchBarControllerTest && UserSettingsTest
Change-Id: I8cb0671d780f45c17a9bb7c9a9d3b108128ead9d
2023-08-15 15:59:14 +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
Adam Bookatz
e7465b0f5f Opening Multiuser doesn't toggle it on
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
2020-05-26 23:01:56 +00:00
Daniel Chapin
77c41c1a5a Revert "Don't write user_switcher_enabled value when enter this Settings"
This reverts commit 898d6b4d73.

Reason for revert: Causing a regression
Bug: 153944718

Change-Id: If96441618d32a65b0bae4c5c26fb3b278556cc8c
2020-04-14 15:47:48 +00:00
Edgar Wang
898d6b4d73 Don't write user_switcher_enabled value when enter this Settings
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
2020-03-26 23:19:29 +08:00
Fabian Kozynski
a52961d803 Creates user_switcher_enabled setting to match setting
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
2019-04-10 15:22:20 -04:00
Raff Tsai
3fd80809cc Use Device Policy dialog in switchbar
We need to pop dialog when switchbar is disabled by Device Policy

Test: visual, robolectric
Fixes: 124855614
Change-Id: Ief65baa2c4912cb7c85d5eccc2c0f363d2fc898b
2019-02-27 09:38:52 +08:00
Fan Zhang
c39238c63f Add a switchbar to turn off multi-user feature entirely
Change-Id: Ibf88bf37899af5065c68aeb2337acd4ee48bc13c
Fixes: 72319180
Test: robotest on new controller. Manual test on UserSettings fragment.
2018-06-11 15:00:08 -07:00