xref: /aosp_15_r20/frameworks/proto_logging/stats/enums/hardware/biometrics/enums.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.hardware.biometrics;
20
21option java_outer_classname = "BiometricsProtoEnums";
22option java_multiple_files = true;
23
24// Logging constants for <Biometric>Service and BiometricService
25
26enum ModalityEnum {
27    MODALITY_UNKNOWN = 0;
28    MODALITY_FINGERPRINT = 1;   // 1 << 0
29    MODALITY_IRIS = 2;          // 1 << 1
30    MODALITY_FACE = 4;          // 1 << 2
31}
32
33enum ClientEnum {
34    CLIENT_UNKNOWN = 0;
35    CLIENT_KEYGUARD = 1;
36    CLIENT_BIOMETRIC_PROMPT = 2;
37    CLIENT_FINGERPRINT_MANAGER = 3; // Deprecated API before BiometricPrompt was introduced
38}
39
40enum ActionEnum {
41    ACTION_UNKNOWN = 0;
42    ACTION_ENROLL = 1;
43    ACTION_AUTHENTICATE = 2;
44    ACTION_ENUMERATE = 3;
45    ACTION_REMOVE = 4;
46}
47
48enum IssueEnum {
49    ISSUE_UNKNOWN = 0;
50    // When a biometric HAL has crashed.
51    ISSUE_HAL_DEATH = 1;
52    // When Android Framework has a template that doesn't exist in the HAL. The framework
53    // is expected to remove its template to stay in sync with the HAL.
54    ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK = 2;
55    // When the HAL has a template that doesn't exist in Android Framework. The framework
56    // is expected to notify the HAL to remove this template to stay in sync with the framework.
57    ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL = 3;
58    // When the HAL has not sent ERROR_CANCELED within the specified timeout.
59    ISSUE_CANCEL_TIMED_OUT = 4;
60    // When there is fingerprint loss of enrollment happens.
61    ISSUE_FINGERPRINTS_LOE = 5;
62}
63
64enum SessionTypeEnum {
65    SESSION_TYPE_UNKNOWN = 0;
66    SESSION_TYPE_KEYGUARD_ENTRY = 1;
67    SESSION_TYPE_BIOMETRIC_PROMPT = 2;
68}
69
70enum TouchTypeEnum {
71    // No finger entered or left the sensor area.
72    TOUCH_TYPE_UNCHANGED = 0;
73    // A finger entered the sensor area.
74    TOUCH_TYPE_DOWN = 1;
75    // A finger left the sensor area.
76    TOUCH_TYPE_UP = 2;
77    // The touch reporting has stopped. If there was a finger on the sensor, it may or may not
78    // still be on the sensor.
79    TOUCH_TYPE_CANCEL = 3;
80}
81
82enum OrientationEnum {
83    ORIENTATION_UNKNOWN = 0;
84    ORIENTATION_0 = 1;
85    ORIENTATION_90 = 2;
86    ORIENTATION_180 = 3;
87    ORIENTATION_270 = 4;
88}
89
90enum FoldStateEnum {
91    FOLD_UNKNOWN = 0;
92    FOLD_OPEN = 1;
93    FOLD_CLOSED = 2;
94    FOLD_HALF_OPEN = 3;
95}
96
97enum WakeReasonEnum {
98    WAKE_REASON_UNKNOWN = 0;
99    WAKE_REASON_POWER_BUTTON = 1;
100    WAKE_REASON_GESTURE = 2;
101    WAKE_REASON_WAKE_KEY = 3;
102    WAKE_REASON_WAKE_MOTION = 4;
103    WAKE_REASON_LID = 5;
104    WAKE_REASON_DISPLAY_GROUP_ADDED = 6;
105    WAKE_REASON_TAP = 7;
106    WAKE_REASON_LIFT = 8;
107    WAKE_REASON_BIOMETRIC = 9;
108}
109
110enum WakeReasonDetailsEnum {
111    DETAILS_UNKNOWN = 0;
112    DETAILS_FACE_STARTED_WAKING_UP = 1;
113    DETAILS_FACE_PRIMARY_BOUNCER_SHOWN = 2;
114    DETAILS_FACE_ASSISTANT_VISIBLE = 3;
115    DETAILS_FACE_ALTERNATE_BIOMETRIC_BOUNCER_SHOWN = 4;
116    DETAILS_FACE_NOTIFICATION_PANEL_CLICKED = 5;
117    DETAILS_FACE_OCCLUDING_APP_REQUESTED = 6;
118    DETAILS_FACE_PICK_UP_GESTURE_TRIGGERED = 7;
119    DETAILS_FACE_QS_EXPANDED = 8;
120    DETAILS_FACE_SWIPE_UP_ON_BOUNCER = 9;
121    DETAILS_FACE_UDFPS_POINTER_DOWN = 10;
122}
123
124enum StrengthEnum {
125    STRENGTH_UNKNOWN = 0;
126    // A sensor that meets the requirements for Class 1 biometrics as defined in
127    // the CDD. This does not correspond to a public
128    // BiometricManager.Authenticators constant. Sensors of this strength are
129    // not available to applications via the public API surface.
130    STRENGTH_CONVENIENCE = 1;
131    // A sensor that meets the requirements for Class 2 biometrics as defined in
132    // the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_WEAK.
133    STRENGTH_WEAK = 2;
134    // A sensor that meets the requirements for Class 3 biometrics as defined in
135    // the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_STRONG.
136    // Notably, this is the only strength that allows generation of
137    // HardwareAuthToken(s).
138    STRENGTH_STRONG = 3;
139}
140
141enum SensorTypeEnum {
142    SENSOR_UNKNOWN = 0;
143    SENSOR_FP_REAR = 1;
144    SENSOR_FP_UDFPS_ULTRASONIC = 2;
145    SENSOR_FP_UDFPS_OPTICAL = 3;
146    SENSOR_FP_POWER_BUTTON = 4;
147    SENSOR_FP_HOME_BUTTON = 5;
148    SENSOR_FACE_RGB = 6;
149    SENSOR_FACE_IR = 7;
150}
151
152enum EnrollmentSourceEnum {
153    ENROLLMENT_SOURCE_UNKNOWN = 0;
154    ENROLLMENT_SOURCE_SUW = 1;
155    ENROLLMENT_SOURCE_SETTINGS = 2;
156    ENROLLMENT_SOURCE_FRR_NOTIFICATION = 3;
157}
158
159enum FRRNotificationAction {
160    FRR_NOTIFICATION_ACTION_UNKNOWN = 0;
161    FRR_NOTIFICATION_ACTION_SHOWN = 1;
162    FRR_NOTIFICATION_ACTION_CLICKED = 2;
163    FRR_NOTIFICATION_ACTION_DISMISSED = 3;
164}
165
166enum UnenrollReasonEnum {
167    UNENROLL_REASON_UNKNOWN = 0;
168    UNENROLL_REASON_DANGLING_HAL = 1;
169    UNENROLL_REASON_DANGLING_FRAMEWORK = 2;
170    UNENROLL_REASON_USER_REQUEST = 3;
171}
172
173enum EnumerationResultEnum {
174    ENUMERATION_RESULT_UNKNOWN = 0;
175    ENUMERATION_RESULT_OK = 1;
176    ENUMERATION_RESULT_DANGLING_HAL = 2;
177    ENUMERATION_RESULT_DANGLING_FRAMEWORK = 3;
178    ENUMERATION_RESULT_DANGLING_BOTH = 4;
179    EMUMERATION_RESULT_TIMEOUT = 5;
180}