diff options
| author | Felipe Leme <felipeal@google.com> | 2021-11-05 15:59:15 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-11-05 15:59:15 +0000 |
| commit | 3ff483558431dbe9cfe321a84f4f01b659d6a6ef (patch) | |
| tree | 906ae69e46e880de266b2b709f03575b6b640055 /core/java/android | |
| parent | 1bba9291930c2dff379216d1cc3d5c52aacd30b0 (diff) | |
| parent | f1f95597f002305a3f26761df91f1c546edfd3d1 (diff) | |
Merge "Fixed DPM.logoutUser() for headless system user mode." into sc-v2-dev am: f1f95597f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16145450
Change-Id: I8a327d7bb4659b67d2ed3365b3640d88d9aee103
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 5b01a7d2de66..ebe6c4fa0adc 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -9565,7 +9565,14 @@ public class DevicePolicyManager { /** * Called by a profile owner of secondary user that is affiliated with the device to stop the - * calling user and switch back to primary. + * calling user and switch back to primary user. + * + * <p>Notice that on devices running with + * {@link UserManager#isHeadlessSystemUserMode() headless system user mode}, there is no primary + * user, so it switches back to the user that was in the foreground before the first call to + * {@link #switchUser(ComponentName, UserHandle)} (or fails with + * {@link UserManager#USER_OPERATION_ERROR_UNKNOWN} if that method was not called prior to this + * call). * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @return one of the following result codes: |
