diff options
author | Eric Biggers <ebiggers@google.com> | 2023-12-06 21:00:19 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-06 21:00:19 +0000 |
commit | f84c8e66390b66a5709fc44244398529b2266d26 (patch) | |
tree | 6b78441c30ff5f386139896da08373f8bdaa2c41 | |
parent | 0af66caad8d0b156930efe0682fb32dac57188eb (diff) | |
parent | aea7009e419a00c159862cea05cda6bf80487271 (diff) | |
download | base-f84c8e66390b66a5709fc44244398529b2266d26.tar.gz |
Merge "KeyguardManager: clarify behavior for profile with separate challenge" into main am: aea7009e41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2850163
Change-Id: Iea3c0b37d6da7d39f79ee61549bfcbde088534ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | core/java/android/app/KeyguardManager.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java index 2d554031ab48..c072feb5b46e 100644 --- a/core/java/android/app/KeyguardManager.java +++ b/core/java/android/app/KeyguardManager.java @@ -679,10 +679,11 @@ public class KeyguardManager { * <p> * Specifically, this returns {@code true} if at least one of the following is true: * <ul> - * <li>The {@link Context}'s user has a secure lock screen. A full user has a secure lock - * screen if its lock screen is set to PIN, pattern, or password, as opposed to swipe or none. - * A profile that uses a unified challenge is considered to have a secure lock screen if and - * only if its parent user has a secure lock screen.</li> + * <li>The {@link Context}'s user has a secure lock screen. A full user or a profile that uses + * a separate challenge has a secure lock screen if its lock screen is set to PIN, pattern, or + * password, as opposed to swipe or none. A profile that uses a unified challenge is + * considered to have a secure lock screen if and only if its parent user has a secure lock + * screen.</li> * <li>At least one SIM card is currently locked and requires a PIN.</li> * </ul> * <p> @@ -729,8 +730,15 @@ public class KeyguardManager { * <p> * For a user that is not the current user but can be switched to (usually this means "another * full user"), and that has a PIN, pattern, or password, the device is always considered - * locked. For a profile with a unified challenge, the device is considered locked if and only - * if the device is locked for the parent user. + * locked. + * <p> + * For a profile with a unified challenge, the device locked state is the same as that of the + * parent user. + * <p> + * For a profile with a separate challenge, the device becomes unlocked when the profile's PIN, + * pattern, password, or biometric is verified. It becomes locked when the parent user becomes + * locked, the screen turns off, the device reboots, the device policy controller locks the + * profile, or the timeout set by the device policy controller expires. * * @return {@code true} if the device is currently locked for the user * @see #isKeyguardLocked() @@ -757,9 +765,10 @@ public class KeyguardManager { * Returns whether the user has a secure lock screen. * <p> * This returns {@code true} if the {@link Context}'s user has a secure lock screen. A full user - * has a secure lock screen if its lock screen is set to PIN, pattern, or password, as opposed - * to swipe or none. A profile that uses a unified challenge is considered to have a secure lock - * screen if and only if its parent user has a secure lock screen. + * or a profile that uses a separate challenge has a secure lock screen if its lock screen is + * set to PIN, pattern, or password, as opposed to swipe or none. A profile that uses a unified + * challenge is considered to have a secure lock screen if and only if its parent user has a + * secure lock screen. * <p> * This method does not consider whether the lock screen is currently showing or not. * <p> |