Merge "Rename BiometricHalDeathReported to be futute-proof and extendable"
This commit is contained in:
@@ -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;
|
||||
@@ -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 {
|
||||
|
||||
@@ -43,4 +43,16 @@ enum ActionEnum {
|
||||
ACTION_AUTHENTICATE = 2;
|
||||
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;
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user