• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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}
61
62enum SessionTypeEnum {
63    SESSION_TYPE_UNKNOWN = 0;
64    SESSION_TYPE_KEYGUARD_ENTRY = 1;
65    SESSION_TYPE_BIOMETRIC_PROMPT = 2;
66}
67
68enum TouchTypeEnum {
69    // No finger entered or left the sensor area.
70    TOUCH_TYPE_UNCHANGED = 0;
71    // A finger entered the sensor area.
72    TOUCH_TYPE_DOWN = 1;
73    // A finger left the sensor area.
74    TOUCH_TYPE_UP = 2;
75    // The touch reporting has stopped. If there was a finger on the sensor, it may or may not
76    // still be on the sensor.
77    TOUCH_TYPE_CANCEL = 3;
78}
79
80enum OrientationEnum {
81    ORIENTATION_UNKNOWN = 0;
82    ORIENTATION_0 = 1;
83    ORIENTATION_90 = 2;
84    ORIENTATION_180 = 3;
85    ORIENTATION_270 = 4;
86}
87
88enum FoldStateEnum {
89    FOLD_UNKNOWN = 0;
90    FOLD_OPEN = 1;
91    FOLD_CLOSED = 2;
92    FOLD_HALF_OPEN = 3;
93}
94
95enum WakeReasonEnum {
96    WAKE_REASON_UNKNOWN = 0;
97    WAKE_REASON_POWER_BUTTON = 1;
98    WAKE_REASON_GESTURE = 2;
99    WAKE_REASON_WAKE_KEY = 3;
100    WAKE_REASON_WAKE_MOTION = 4;
101    WAKE_REASON_LID = 5;
102    WAKE_REASON_DISPLAY_GROUP_ADDED = 6;
103    WAKE_REASON_TAP = 7;
104    WAKE_REASON_LIFT = 8;
105    WAKE_REASON_BIOMETRIC = 9;
106}
107
108enum WakeReasonDetailsEnum {
109    DETAILS_UNKNOWN = 0;
110    DETAILS_FACE_STARTED_WAKING_UP = 1;
111    DETAILS_FACE_PRIMARY_BOUNCER_SHOWN = 2;
112    DETAILS_FACE_ASSISTANT_VISIBLE = 3;
113    DETAILS_FACE_ALTERNATE_BIOMETRIC_BOUNCER_SHOWN = 4;
114    DETAILS_FACE_NOTIFICATION_PANEL_CLICKED = 5;
115    DETAILS_FACE_OCCLUDING_APP_REQUESTED = 6;
116    DETAILS_FACE_PICK_UP_GESTURE_TRIGGERED = 7;
117    DETAILS_FACE_QS_EXPANDED = 8;
118    DETAILS_FACE_SWIPE_UP_ON_BOUNCER = 9;
119    DETAILS_FACE_UDFPS_POINTER_DOWN = 10;
120}
121
122enum StrengthEnum {
123    STRENGTH_UNKNOWN = 0;
124    // A sensor that meets the requirements for Class 1 biometrics as defined in
125    // the CDD. This does not correspond to a public
126    // BiometricManager.Authenticators constant. Sensors of this strength are
127    // not available to applications via the public API surface.
128    STRENGTH_CONVENIENCE = 1;
129    // A sensor that meets the requirements for Class 2 biometrics as defined in
130    // the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_WEAK.
131    STRENGTH_WEAK = 2;
132    // A sensor that meets the requirements for Class 3 biometrics as defined in
133    // the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_STRONG.
134    // Notably, this is the only strength that allows generation of
135    // HardwareAuthToken(s).
136    STRENGTH_STRONG = 3;
137}
138
139enum SensorTypeEnum {
140    SENSOR_UNKNOWN = 0;
141    SENSOR_FP_REAR = 1;
142    SENSOR_FP_UDFPS_ULTRASONIC = 2;
143    SENSOR_FP_UDFPS_OPTICAL = 3;
144    SENSOR_FP_POWER_BUTTON = 4;
145    SENSOR_FP_HOME_BUTTON = 5;
146    SENSOR_FACE_RGB = 6;
147    SENSOR_FACE_IR = 7;
148}
149
150enum EnrollmentSourceEnum {
151   ENROLLMENT_SOURCE_UNKNOWN = 0;
152   ENROLLMENT_SOURCE_SUW = 1;
153   ENROLLMENT_SOURCE_SETTINGS = 2;
154   ENROLLMENT_SOURCE_FRR_NOTIFICATION = 3;
155}
156
157enum FRRNotificationAction {
158  FRR_NOTIFICATION_ACTION_UNKNOWN = 0;
159  FRR_NOTIFICATION_ACTION_SHOWN = 1;
160  FRR_NOTIFICATION_ACTION_CLICKED = 2;
161  FRR_NOTIFICATION_ACTION_DISMISSED = 3;
162}
163