From 40cbada807277e70520fd15b061b81dba8f2118b Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Thu, 16 May 2019 10:56:40 -0400 Subject: [PATCH] Logs biometric authentication error type. Test: manual Bug: 132644177 Change-Id: I99398140eb17aa6f9b1404815908ef56890dfc7e --- .../systemui/statusbar/phone/BiometricUnlockController.java | 3 ++- proto/src/metrics_constants/metrics_constants.proto | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index ce8463e700995..4d4818d51414d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -433,7 +433,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback { public void onBiometricError(int msgId, String errString, BiometricSourceType biometricSourceType) { mMetricsLogger.write(new LogMaker(MetricsEvent.BIOMETRIC_AUTH) - .setType(MetricsEvent.TYPE_ERROR).setSubtype(toSubtype(biometricSourceType))); + .setType(MetricsEvent.TYPE_ERROR).setSubtype(toSubtype(biometricSourceType)) + .addTaggedData(MetricsEvent.FIELD_BIOMETRIC_AUTH_ERROR, msgId)); cleanup(); } diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto index 261646692c635..71d03a86300d4 100644 --- a/proto/src/metrics_constants/metrics_constants.proto +++ b/proto/src/metrics_constants/metrics_constants.proto @@ -7371,6 +7371,11 @@ message MetricsEvent { // Note: Only shows up on first time toggle DIALOG_DARK_UI_INFO = 1740; + // FIELD - Detailed reason in biometric authentication error. + // One of the constant value in BiometricConstants.java file. + // OS: Q + FIELD_BIOMETRIC_AUTH_ERROR = 1741; + // ---- End Q Constants, all Q constants go above this line ---- // Add new aosp constants above this line. // END OF AOSP CONSTANTS