Skip to content
Snippets Groups Projects
Commit a0b735c2 authored by Chandru S's avatar Chandru S
Browse files

Log FP & face enrollment state only if it changes.

Bug: 267336592
Test: NA, logging changes
Change-Id: I0e877bfe6869ddebf4f9879143ac4fb1f94920a1
parent a5a807eb
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment