Loading cmds/statsd/src/atoms.proto +5 −3 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ message Atom { SpeechDspStatReported speech_dsp_stat_reported = 145; UsbContaminantReported usb_contaminant_reported = 146; WatchdogRollbackOccurred watchdog_rollback_occurred = 147; BiometricHalDeathReported biometric_hal_death_reported = 148; BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; BubbleUIChanged bubble_ui_changed = 149; ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; Loading Loading @@ -3050,13 +3050,15 @@ message BiometricErrorOccurred { } /** * Logs when a biometric HAL has crashed. * Logs when a system health issue is detected. * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricHalDeathReported { message BiometricSystemHealthIssueDetected { // Biometric modality. optional android.hardware.biometrics.ModalityEnum modality = 1; // Type of issue detected. optional android.hardware.biometrics.IssueEnum issue = 2; } message Notification { Loading core/proto/android/hardware/biometrics/enums.proto +12 −0 Original line number Diff line number Diff line Loading @@ -44,3 +44,15 @@ enum ActionEnum { ACTION_ENUMERATE = 3; ACTION_REMOVE = 4; } enum IssueEnum { ISSUE_UNKNOWN = 0; // When a biometric HAL has crashed. ISSUE_HAL_DEATH = 1; // When Android Framework has a template that doesn't exist in the HAL. The framework // is expected to remove its template to stay in sync with the HAL. ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK = 2; // 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; } No newline at end of file services/core/java/com/android/server/biometrics/BiometricServiceBase.java +2 −1 Original line number Diff line number Diff line Loading @@ -624,7 +624,8 @@ public abstract class BiometricServiceBase extends SystemService handleError(getHalDeviceId(), BiometricConstants.BIOMETRIC_ERROR_HW_UNAVAILABLE, 0 /*vendorCode */); StatsLog.write(StatsLog.BIOMETRIC_HAL_DEATH_REPORTED, statsModality()); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, statsModality(), BiometricsProtoEnums.ISSUE_HAL_DEATH); } protected ClientMonitor getCurrentClient() { Loading services/core/java/com/android/server/biometrics/LoggableMonitor.java +3 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.util.StatsLog; public abstract class LoggableMonitor { public static final String TAG = "BiometricStats"; public static final boolean DEBUG = true; public static final boolean DEBUG = false; private long mFirstAcquireTimeMs; Loading Loading @@ -137,6 +137,8 @@ public abstract class LoggableMonitor { + ", RequireConfirmation: " + requireConfirmation + ", State: " + authState + ", Latency: " + latency); } else { Slog.v(TAG, "Authentication latency: " + latency); } StatsLog.write(StatsLog.BIOMETRIC_AUTHENTICATED, Loading services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.os.SELinux; import android.os.UserHandle; import android.os.UserManager; import android.util.Slog; import android.util.StatsLog; import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -554,6 +555,8 @@ public class FingerprintService extends BiometricServiceBase { + " " + f.getDeviceId()); FingerprintUtils.getInstance().removeBiometricForUser(getContext(), getTargetUserId(), f.getBiometricId()); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK); } mEnrolledList.clear(); } Loading Loading @@ -1003,6 +1006,8 @@ public class FingerprintService extends BiometricServiceBase { mHalDeviceId, mToken, new ServiceListenerImpl(null), uf.f.getBiometricId(), uf.f.getGroupId(), uf.userId, restricted, getContext().getOpPackageName()); removeInternal(client); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, statsModality(), BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL); } else { clearEnumerateState(); } Loading Loading
cmds/statsd/src/atoms.proto +5 −3 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ message Atom { SpeechDspStatReported speech_dsp_stat_reported = 145; UsbContaminantReported usb_contaminant_reported = 146; WatchdogRollbackOccurred watchdog_rollback_occurred = 147; BiometricHalDeathReported biometric_hal_death_reported = 148; BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; BubbleUIChanged bubble_ui_changed = 149; ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; Loading Loading @@ -3050,13 +3050,15 @@ message BiometricErrorOccurred { } /** * Logs when a biometric HAL has crashed. * Logs when a system health issue is detected. * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricHalDeathReported { message BiometricSystemHealthIssueDetected { // Biometric modality. optional android.hardware.biometrics.ModalityEnum modality = 1; // Type of issue detected. optional android.hardware.biometrics.IssueEnum issue = 2; } message Notification { Loading
core/proto/android/hardware/biometrics/enums.proto +12 −0 Original line number Diff line number Diff line Loading @@ -44,3 +44,15 @@ enum ActionEnum { ACTION_ENUMERATE = 3; ACTION_REMOVE = 4; } enum IssueEnum { ISSUE_UNKNOWN = 0; // When a biometric HAL has crashed. ISSUE_HAL_DEATH = 1; // When Android Framework has a template that doesn't exist in the HAL. The framework // is expected to remove its template to stay in sync with the HAL. ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK = 2; // 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; } No newline at end of file
services/core/java/com/android/server/biometrics/BiometricServiceBase.java +2 −1 Original line number Diff line number Diff line Loading @@ -624,7 +624,8 @@ public abstract class BiometricServiceBase extends SystemService handleError(getHalDeviceId(), BiometricConstants.BIOMETRIC_ERROR_HW_UNAVAILABLE, 0 /*vendorCode */); StatsLog.write(StatsLog.BIOMETRIC_HAL_DEATH_REPORTED, statsModality()); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, statsModality(), BiometricsProtoEnums.ISSUE_HAL_DEATH); } protected ClientMonitor getCurrentClient() { Loading
services/core/java/com/android/server/biometrics/LoggableMonitor.java +3 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.util.StatsLog; public abstract class LoggableMonitor { public static final String TAG = "BiometricStats"; public static final boolean DEBUG = true; public static final boolean DEBUG = false; private long mFirstAcquireTimeMs; Loading Loading @@ -137,6 +137,8 @@ public abstract class LoggableMonitor { + ", RequireConfirmation: " + requireConfirmation + ", State: " + authState + ", Latency: " + latency); } else { Slog.v(TAG, "Authentication latency: " + latency); } StatsLog.write(StatsLog.BIOMETRIC_AUTHENTICATED, Loading
services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.os.SELinux; import android.os.UserHandle; import android.os.UserManager; import android.util.Slog; import android.util.StatsLog; import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -554,6 +555,8 @@ public class FingerprintService extends BiometricServiceBase { + " " + f.getDeviceId()); FingerprintUtils.getInstance().removeBiometricForUser(getContext(), getTargetUserId(), f.getBiometricId()); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK); } mEnrolledList.clear(); } Loading Loading @@ -1003,6 +1006,8 @@ public class FingerprintService extends BiometricServiceBase { mHalDeviceId, mToken, new ServiceListenerImpl(null), uf.f.getBiometricId(), uf.f.getGroupId(), uf.userId, restricted, getContext().getOpPackageName()); removeInternal(client); StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, statsModality(), BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL); } else { clearEnumerateState(); } Loading