diff options
| author | 2020-09-28 00:47:03 +0000 | |
|---|---|---|
| committer | 2020-09-28 00:47:03 +0000 | |
| commit | e5af1e14000fc677ea0efc8a2630a9eeb67b1732 (patch) | |
| tree | 2ee913926d202749b5b30681cca6667af311f63f | |
| parent | 802503736d11abb54f9a9312ecf721aa97dcbc42 (diff) | |
| parent | 3615be74c1a499c558e09a45dd7409e9f1027be2 (diff) | |
Merge "[DO NOT MERGE] fingerprint: handle PerformanceStats NULL pointers"
| -rw-r--r-- | services/core/java/com/android/server/biometrics/BiometricServiceBase.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java index ff8c628e785b..7cdd3b3a42fe 100644 --- a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java +++ b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java @@ -284,10 +284,12 @@ public abstract class BiometricServiceBase extends SystemService @Override public int handleFailedAttempt() { final int lockoutMode = getLockoutMode(); - if (lockoutMode == AuthenticationClient.LOCKOUT_PERMANENT) { - mPerformanceStats.permanentLockout++; - } else if (lockoutMode == AuthenticationClient.LOCKOUT_TIMED) { - mPerformanceStats.lockout++; + if (mPerformanceStats != null) { + if (lockoutMode == AuthenticationClient.LOCKOUT_PERMANENT) { + mPerformanceStats.permanentLockout++; + } else if (lockoutMode == AuthenticationClient.LOCKOUT_TIMED) { + mPerformanceStats.lockout++; + } } // Failing multiple times will continue to push out the lockout time @@ -730,10 +732,12 @@ public abstract class BiometricServiceBase extends SystemService if (client != null && client.onAuthenticated(identifier, authenticated, token)) { removeClient(client); } - if (authenticated) { - mPerformanceStats.accept++; - } else { - mPerformanceStats.reject++; + if (mPerformanceStats != null) { + if (authenticated) { + mPerformanceStats.accept++; + } else { + mPerformanceStats.reject++; + } } } |