diff options
| author | 2024-02-02 12:13:44 -0800 | |
|---|---|---|
| committer | 2024-02-06 19:15:42 +0000 | |
| commit | 6dfa74f0b274d270f90020662d68f363ea20949b (patch) | |
| tree | a303d839741c394cbe5352df67cea57ebddd407b | |
| parent | e27fe8371be9252633405a62d09710bd13ac1ca0 (diff) | |
Clarify delayed locking documentation
The documentation on delayed locking had some mistakes and points where
it wasn't clear. We update that here.
Test: N/A. Just javadoc
Change-Id: I2ddee0046229fad703a347b91591a505b54efb83
| -rw-r--r-- | services/core/java/com/android/server/am/UserController.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java index 2b81dbcb6fb2..96c6be824561 100644 --- a/services/core/java/com/android/server/am/UserController.java +++ b/services/core/java/com/android/server/am/UserController.java @@ -993,17 +993,20 @@ class UserController implements Handler.Callback { /** * Stops a single User. This can also trigger locking user data out depending on device's * config ({@code mDelayUserDataLocking}) and arguments. - * User will be unlocked when - * - {@code mDelayUserDataLocking} is not set. - * - {@code mDelayUserDataLocking} is set and {@code keyEvictedCallback} is non-null. + * + * In the default configuration for most device and users, users will be locked when stopping. + * User will remain unlocked only if all the following are true + * <li> {@link #canDelayDataLockingForUser(int)} (based on mDelayUserDataLocking) is true + * <li> the parameter {@code allowDelayedLocking} is true + * <li> {@code keyEvictedCallback} is null * - * * @param userId User Id to stop and lock the data. * @param allowDelayedLocking When set, do not lock user after stopping. Locking can happen * later when number of unlocked users reaches * {@code mMaxRunnngUsers}. Note that this is respected only when - * {@code mDelayUserDataLocking} is set and {@keyEvictedCallback} is - * null. Otherwise the user will be locked. + * delayed locking is enabled for this user and {@keyEvictedCallback} + * is null. Otherwise the user nonetheless will be locked. * @param stopUserCallback Callback to notify that user has stopped. * @param keyEvictedCallback Callback to notify that user has been unlocked. */ |