import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
import "frameworks/base/core/proto/android/debug/enums.proto";
+import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
VibratorStateChanged vibrator_state_changed = 84;
DeferredJobStatsReported deferred_job_stats_reported = 85;
ThermalThrottlingStateChanged thermal_throttling = 86;
- FingerprintAcquired fingerprint_acquired = 87;
- FingerprintAuthenticated fingerprint_authenticated = 88;
- FingerprintErrorOccurred fingerprint_error_occurred = 89;
+ BiometricAcquired biometric_acquired = 87;
+ BiometricAuthenticated biometric_authenticated = 88;
+ BiometricErrorOccurred biometric_error_occurred = 89;
Notification notification = 90;
BatteryHealthSnapshot battery_health_snapshot = 91;
SlowIo slow_io = 92;
SpeechDspStatReported speech_dsp_stat_reported = 145;
UsbContaminantReported usb_contaminant_reported = 146;
WatchdogRollbackOccurred watchdog_rollback_occurred = 147;
+ BiometricHalDeathReported biometric_hal_death_reported = 148;
}
// Pulled events will start at field 10000.
CategorySize category_size = 10028;
ProcStats proc_stats = 10029;
BatteryVoltage battery_voltage = 10030;
- NumFingerprints num_fingerprints = 10031;
+ NumBiometricsEnrolled num_fingerprints_enrolled = 10031;
DiskIo disk_io = 10032;
PowerProfile power_profile = 10033;
ProcStatsPkgProc proc_stats_pkg_proc = 10034;
BatteryCycleCount battery_cycle_count = 10045;
DebugElapsedClock debug_elapsed_clock = 10046;
DebugFailingElapsedClock debug_failing_elapsed_clock = 10047;
+ NumBiometricsEnrolled num_faces_enrolled = 10048;
}
// DO NOT USE field numbers above 100,000 in AOSP.
}
/**
- * Logs when a fingerprint acquire event occurs.
+ * Logs when a biometric acquire event occurs.
*
* Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
+ * frameworks/base/services/core/java/com/android/server/biometrics
*/
-message FingerprintAcquired {
- // The associated user. Eg: 0 for owners, 10+ for others.
- // Defined in android/os/UserHandle.java
- optional int32 user = 1;
- // If this acquire is for a crypto fingerprint.
- // e.g. Secure purchases, unlock password storage.
- optional bool is_crypto = 2;
+message BiometricAcquired {
+ // Biometric modality that was acquired.
+ optional android.hardware.biometrics.ModalityEnum modality = 1;
+ // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
+ optional int32 user = 2;
+ // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
+ optional bool is_crypto = 3;
+ // Action that the device is performing. Acquired messages are only expected for enroll and
+ // authenticate. Other actions may indicate an error.
+ optional android.hardware.biometrics.ActionEnum action = 4;
+ // The client that this acquisition was received for.
+ optional android.hardware.biometrics.ClientEnum client = 5;
+ // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
+ optional int32 acquire_info = 6;
+ // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
+ optional int32 acquire_info_vendor = 7;
}
/**
- * Logs when a fingerprint authentication event occurs.
+ * Logs when a biometric authentication event occurs.
*
* Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
- */
-message FingerprintAuthenticated {
- // The associated user. Eg: 0 for owners, 10+ for others.
- // Defined in android/os/UserHandle.java
- optional int32 user = 1;
- // If this authentication is for a crypto fingerprint.
- // e.g. Secure purchases, unlock password storage.
- optional bool is_crypto = 2;
- // Whether or not this authentication was successful.
- optional bool is_authenticated = 3;
+ * frameworks/base/services/core/java/com/android/server/biometrics
+ */
+message BiometricAuthenticated {
+ // Biometric modality that was used.
+ optional android.hardware.biometrics.ModalityEnum modality = 1;
+ // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
+ optional int32 user = 2;
+ // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
+ // storage.
+ optional bool is_crypto = 3;
+ // The client that this acquisition was received for.
+ optional android.hardware.biometrics.ClientEnum client = 4;
+
+ enum State {
+ UNKNOWN = 0;
+ REJECTED = 1;
+ PENDING_CONFIRMATION = 2;
+ CONFIRMED = 3;
+ }
+
+ // State of the current auth attempt.
+ optional State state = 5;
+ // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
+ // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
+ // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
+ // CONFIRMED.
+ optional int32 latency = 6;
}
/**
- * Logs when a fingerprint error occurs.
+ * Logs when a biometric error occurs.
*
* Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
+ * frameworks/base/services/core/java/com/android/server/biometrics
+ */
+message BiometricErrorOccurred {
+ // Biometric modality that was used.
+ optional android.hardware.biometrics.ModalityEnum modality = 1;
+ // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
+ optional int32 user = 2;
+ // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
+ optional bool is_crypto = 3;
+ // Action that the device is performing.
+ optional android.hardware.biometrics.ActionEnum action = 4;
+ // The client that this acquisition was received for.
+ optional android.hardware.biometrics.ClientEnum client = 5;
+ // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
+ // are unique to modality.
+ optional int32 error_info = 6;
+ // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
+ // by the vendor and not specified by the HIDL interface.
+ optional int32 error_info_vendor = 7;
+}
+
+/**
+ * Logs when a biometric HAL has crashed.
+ * Logged from:
+ * frameworks/base/services/core/java/com/android/server/biometrics
*/
-message FingerprintErrorOccurred {
- // The associated user. Eg: 0 for owners, 10+ for others.
- // Defined in android/os/UserHandle.java
- optional int32 user = 1;
- // If this error is for a crypto fingerprint.
- // e.g. Secure purchases, unlock password storage.
- optional bool is_crypto = 2;
-
- enum Error {
- UNKNOWN = 0;
- LOCKOUT = 1;
- PERMANENT_LOCKOUT = 2;
- }
- // The type of error.
- optional Error error = 3;
+message BiometricHalDeathReported {
+ // Biometric modality.
+ optional android.hardware.biometrics.ModalityEnum modality = 1;
}
message Notification {
/**
* Pulls the number of fingerprints for each user.
*
- * Pulled from StatsCompanionService, which queries FingerprintManager.
+ * Pulled from StatsCompanionService, which queries <Biometric>Manager.
*/
-message NumFingerprints {
+message NumBiometricsEnrolled {
// The associated user. Eg: 0 for owners, 10+ for others.
// Defined in android/os/UserHandle.java
optional int32 user = 1;
// Number of fingerprints registered to that user.
- optional int32 num_fingerprints = 2;
+ optional int32 num_enrolled = 2;
}
message AggStats {
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;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.util.DumpUtils;
import com.android.server.SystemServerInitThreadPool;
-import com.android.server.biometrics.AuthenticationClient;
import com.android.server.biometrics.BiometricServiceBase;
import com.android.server.biometrics.BiometricUtils;
import com.android.server.biometrics.ClientMonitor;
public void onAcquired(final long deviceId, final int acquiredInfo, final int vendorCode) {
mHandler.post(() -> {
FingerprintService.super.handleAcquired(deviceId, acquiredInfo, vendorCode);
- if (getLockoutMode() == AuthenticationClient.LOCKOUT_NONE
- && getCurrentClient() instanceof AuthenticationClient) {
- // Ignore enrollment acquisitions or acquisitions when we are locked out.
- StatsLog.write(StatsLog.FINGERPRINT_ACQUIRED, mCurrentUserId, mIsCrypto);
- }
});
}
mHandler.post(() -> {
Fingerprint fp = new Fingerprint("", groupId, fingerId, deviceId);
FingerprintService.super.handleAuthenticated(fp, token);
- // Send authentication to statsd.
- final boolean authenticated = fingerId != 0;
- StatsLog.write(StatsLog.FINGERPRINT_AUTHENTICATED, mCurrentUserId, mIsCrypto,
- authenticated);
- if (!authenticated) {
- // If we failed to authenticate because of a lockout, inform statsd.
- final int lockoutMode = getLockoutMode();
- if (lockoutMode == AuthenticationClient.LOCKOUT_TIMED) {
- StatsLog.write(StatsLog.FINGERPRINT_ERROR_OCCURRED, mCurrentUserId,
- mIsCrypto, StatsLog.FINGERPRINT_ERROR_OCCURRED__ERROR__LOCKOUT);
- } else if (lockoutMode == AuthenticationClient.LOCKOUT_PERMANENT) {
- StatsLog.write(StatsLog.FINGERPRINT_ERROR_OCCURRED, mCurrentUserId,
- mIsCrypto,
- StatsLog.FINGERPRINT_ERROR_OCCURRED__ERROR__PERMANENT_LOCKOUT);
- }
- }
});
}