Merge "Log FP & face enrollment state only if it changes." into udc-dev
This commit is contained in:
@@ -2459,8 +2459,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
Boolean isFaceEnrolled = mFaceManager != null && !mFaceSensorProperties.isEmpty()
|
||||
&& mBiometricEnabledForUser.get(userId)
|
||||
&& mAuthController.isFaceAuthEnrolled(userId);
|
||||
if (mIsFaceEnrolled != isFaceEnrolled) {
|
||||
mLogger.logFaceEnrolledUpdated(mIsFaceEnrolled, isFaceEnrolled);
|
||||
}
|
||||
mIsFaceEnrolled = isFaceEnrolled;
|
||||
mLogger.logFaceEnrolledUpdated(mIsFaceEnrolled, isFaceEnrolled);
|
||||
}
|
||||
|
||||
public boolean isFaceSupported() {
|
||||
@@ -3132,13 +3134,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
@VisibleForTesting
|
||||
boolean isUnlockWithFingerprintPossible(int userId) {
|
||||
// TODO (b/242022358), make this rely on onEnrollmentChanged event and update it only once.
|
||||
boolean fpEnrolled = mFpm != null
|
||||
boolean newFpEnrolled = mFpm != null
|
||||
&& !mFingerprintSensorProperties.isEmpty()
|
||||
&& !isFingerprintDisabled(userId) && mFpm.hasEnrolledTemplates(userId);
|
||||
mLogger.logFpEnrolledUpdated(userId,
|
||||
mIsUnlockWithFingerprintPossible.getOrDefault(userId, false),
|
||||
fpEnrolled);
|
||||
mIsUnlockWithFingerprintPossible.put(userId, fpEnrolled);
|
||||
Boolean oldFpEnrolled = mIsUnlockWithFingerprintPossible.getOrDefault(userId, false);
|
||||
if (oldFpEnrolled != newFpEnrolled) {
|
||||
mLogger.logFpEnrolledUpdated(userId, oldFpEnrolled, newFpEnrolled);
|
||||
}
|
||||
mIsUnlockWithFingerprintPossible.put(userId, newFpEnrolled);
|
||||
return mIsUnlockWithFingerprintPossible.get(userId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user