Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49a8b4a9 authored by Haining Chen's avatar Haining Chen Committed by Automerger Merge Worker
Browse files

Merge "Unset StrongAuthFlags when unlocking a user profile" into udc-dev am:...

Merge "Unset StrongAuthFlags when unlocking a user profile" into udc-dev am: 5be7b203 am: 40153950

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22308727



Change-Id: I71460ac9db0257c4955d24302028cdf033ca76d4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 51d29025 40153950
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -1516,11 +1516,6 @@ public class LockSettingsService extends ILockSettings.Stub {
                && !getSeparateProfileChallengeEnabledInternal(userId);
    }

    private boolean isProfileWithSeparatedLock(int userId) {
        return isCredentialSharableWithParent(userId)
                && getSeparateProfileChallengeEnabledInternal(userId);
    }

    /**
     * Send credentials for user {@code userId} to {@link RecoverableKeyStoreManager} during an
     * unlock operation.
@@ -2773,9 +2768,19 @@ public class LockSettingsService extends ILockSettings.Stub {

        activateEscrowTokens(sp, userId);

        if (isProfileWithSeparatedLock(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);

        onSyntheticPasswordUnlocked(userId, sp);