diff options
| -rw-r--r-- | core/proto/android/hardware/biometrics/enums.proto | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/biometrics/BiometricServiceBase.java | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/proto/android/hardware/biometrics/enums.proto b/core/proto/android/hardware/biometrics/enums.proto index 973e3e65cf1a..f2e06383b5b1 100644 --- a/core/proto/android/hardware/biometrics/enums.proto +++ b/core/proto/android/hardware/biometrics/enums.proto @@ -55,4 +55,6 @@ enum IssueEnum { // When the HAL has a template that doesn't exist in Android Framework. The framework // is expected to notify the HAL to remove this template to stay in sync with the framework. ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL = 3; + // When the HAL has not sent ERROR_CANCELED within the specified timeout. + ISSUE_CANCEL_TIMED_OUT = 4; }
\ No newline at end of file diff --git a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java index 92a8d9359b58..d7877581831f 100644 --- a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java +++ b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java @@ -542,6 +542,9 @@ public abstract class BiometricServiceBase extends SystemService + " failed to respond to cancel, starting client " + (mPendingClient != null ? mPendingClient.getOwnerString() : "null")); + StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, + statsModality(), BiometricsProtoEnums.ISSUE_CANCEL_TIMED_OUT); + mCurrentClient = null; startClient(mPendingClient, false); } @@ -817,6 +820,7 @@ public abstract class BiometricServiceBase extends SystemService mHandler.post(() -> { ClientMonitor client = mCurrentClient; if (client instanceof EnrollClient && client.getToken() == token) { + if (DEBUG) Slog.v(getTag(), "Cancelling enrollment"); client.stop(client.getToken() == token); } }); |