summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorfelipeal <felipeal@google.com>2020-06-09 17:39:44 -0700
committerfelipeal <felipeal@google.com>2020-06-15 09:06:55 -0700
commit0a2b53f36acd3ac9da5cb9e5df4dc3eec9315666 (patch)
treea86903a3bbf4596c422c21f3feb9f936ff73786f /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parent8a9a2f80835d505c6e381dec1e53f3d3246b0872 (diff)
Add a guard on UserController to avoid user switches when not ready.
UserController defines some internal variables (such as mUserSwitchUiEnabled) which are set by setInitialConfig(), which in turn is called by ActivityManagerService.systemReady(). Under normal circumstances, UserController.switch() is never called before setInitialConfig(), but it could through adb (for example, when calling 'adb shell am switch-user'). In particular, CtsDevicePolicyManagerTestCases uses switch-user to switch users, and it retries on failure. So, if the system crashes while it retries, the next call might happen before setInitialConfig() is called, which could leave the system in a bad state (for example, if the OEM overrides config_customUserSwitchUi with true, it might end up in a state where mTargetUserId is not reset, so the user could never be switched again). Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest Fixes: 153115123 Change-Id: I9ea2062d32cd2b4f328ca877649a94d670b0b1b1
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions