summaryrefslogtreecommitdiff
path: root/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
diff options
context:
space:
mode:
authorAnthony Hugh <ahugh@google.com>2019-10-24 14:49:52 -0700
committerAnthony Hugh <ahugh@google.com>2019-10-28 16:27:40 -0700
commit6acda5ef07af78c4e2c8c6386292c3005c7b5b0c (patch)
treec624e86c3c3f655de438cd4662423d8c90cecc3a /tests/Codegen/src/com/android/codegentest/SampleDataClass.java
parent5a52d7c3e84ea60559bee4d5ecf3cb41afee48b8 (diff)
Update getUserSwitchability() to handle different user ids and Auto
User switcher is in SystemUI which runs in User 0. UserManager.getUserSwitchability() currently checks for the DISALLOW_USER_SWITCH only on the process's user id rather than the foreground user's id. This is causing a bug where we're using the wrong user to check for user restrictions. This CL updates getUserSwitchability to handle different user ids and updates UserSwitcherController to use the new API. This also introduces Headless System User support which only runs a subset of the logic. Fixes: 143298605 Test: [1] Enable multi-user [2] Create a new secondary user [3] Switch to new secondary user (assume to be user 10) [4] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 1 [5] Can't user switch [6] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 0 [7] Can user switch Change-Id: Id039e2afd01a53116700c08177eb4e599a871946
Diffstat (limited to 'tests/Codegen/src/com/android/codegentest/SampleDataClass.java')
0 files changed, 0 insertions, 0 deletions