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

Commit ff129bbc authored by josephjang's avatar josephjang Committed by Jing-yan, Jang
Browse files

LockSettingsService: Move down onAuthTokenKnownForUser()

onAuthTokenKnownForUser() will send secret to AuthSecret to install
Citadel FW update password. In order to prevent sending different
secret to Citadle in corner cases, leave onAuthTokenKnownForUser()
behind Synthetic password has been setup complete.

Bug: 150929955
Test: atest com.android.server.locksettings
Change-Id: I80baea9671b050c1d83618076ff7ae2f26dde613
Merged-In: I80baea9671b050c1d83618076ff7ae2f26dde613
parent fe652ee8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2620,7 +2620,6 @@ public class LockSettingsService extends ILockSettings.Stub {
        Slog.i(TAG, "Initialize SyntheticPassword for user: " + userId);
        final AuthenticationToken auth = mSpManager.newSyntheticPasswordAndSid(
                getGateKeeperService(), credentialHash, credential, userId);
        onAuthTokenKnownForUser(userId, auth);
        if (auth == null) {
            Slog.wtf(TAG, "initializeSyntheticPasswordLocked returns null auth token");
            return null;
@@ -2643,6 +2642,7 @@ public class LockSettingsService extends ILockSettings.Stub {
        }
        fixateNewestUserKeyAuth(userId);
        setSyntheticPasswordHandleLocked(handle, userId);
        onAuthTokenKnownForUser(userId, auth);
        return auth;
    }