summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Haining Chen <hainingc@google.com> 2023-08-25 18:14:31 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-08-25 18:14:31 +0000
commit11bf41dad59bd277755fab31a1e406c2b525c6c2 (patch)
treee71da64ee484006f7b7b91363231d429850fc300
parent8d77298ccda7b76fe7286fa6226fd1a26105b038 (diff)
parenta3e155e8060b3652baac209e4e48fa988e255206 (diff)
RESTRICT AUTOMERGE Unset StrongAuthFlags when unlocking a user profile am: a3e155e806
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24270326 Change-Id: I422a45dd54538606c5c1d8d822e78af8e24e280f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/locksettings/LockSettingsService.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 78cffa6f4f79..62ae4aae2b4d 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -2992,9 +2992,19 @@ public class LockSettingsService extends ILockSettings.Stub {
}
activateEscrowTokens(authToken, userId);
- if (isProfileWithSeparatedLock(userId)) {
- setDeviceUnlockedForUser(userId);
+ if (isCredentialSharableWithParent(userId)) {
+ if (getSeparateProfileChallengeEnabledInternal(userId)) {
+ setDeviceUnlockedForUser(userId);
+ } else {
+ // Here only clear StrongAuthFlags for a profile that has a unified challenge.
+ // StrongAuth for a profile with a separate challenge is handled differently and
+ // is cleared after the user successfully confirms the separate challenge to enter
+ // the profile. StrongAuth for the full user (e.g. userId 0) is also handled
+ // separately by Keyguard.
+ mStrongAuth.reportUnlock(userId);
+ }
}
+
mStrongAuth.reportSuccessfulStrongAuthUnlock(userId);
onAuthTokenKnownForUser(userId, authToken);