Only let main user (Owner) change state of the toggle
Bug: 336764498
Test: atest MultiUserSwitchBarControllerTest
Change-Id: Ib694d1cb4685764c64633efc090765b470a0a015
Only used in tests, so also migrate the tests.
Bug: 306658346
Test: manual - on bluetooth
Test: m RunSettingsRoboTests
Change-Id: Id2b010c1d9c32abe21dcc8765e9446fc4f7a5b25
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
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
We need to pop dialog when switchbar is disabled by Device Policy
Test: visual, robolectric
Fixes: 124855614
Change-Id: Ief65baa2c4912cb7c85d5eccc2c0f363d2fc898b