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
This commit is contained in:
josephjang
2020-08-18 13:08:14 +08:00
committed by Jing-yan, Jang
parent fe652ee800
commit ff129bbc63

View File

@@ -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;
}