Remove unnecessary getAuthenticatorId

The framework already caches the authenticatorId upon user
switches and new enrollments. So, if the requested user is already
the current user, there should be no need to request the HAL for
the authenticatorId.

Bug: 178018968
Test: manual
Change-Id: I6965605b16a4334324c53ed110ca92c2cec46bad
This commit is contained in:
Kevin Chyn
2021-01-26 19:10:22 -08:00
parent 77bb0b7291
commit 66cbc53de0

View File

@@ -62,13 +62,7 @@ public class FingerprintUpdateActiveUserClient extends HalClientMonitor<IBiometr
super.start(callback);
if (mCurrentUserId == getTargetUserId()) {
Slog.d(TAG, "Already user: " + mCurrentUserId + ", refreshing authenticatorId");
try {
mAuthenticatorIds.put(getTargetUserId(), mHasEnrolledBiometrics
? getFreshDaemon().getAuthenticatorId() : 0L);
} catch (RemoteException e) {
Slog.e(TAG, "Unable to refresh authenticatorId", e);
}
Slog.d(TAG, "Already user: " + mCurrentUserId + ", returning");
callback.onClientFinished(this, true /* success */);
return;
}