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