• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 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.os.statsd.autofill;
20
21option java_outer_classname = "AutofillProtoEnums";
22option java_multiple_files = true;
23
24// Logging constants for Autofill system UI events.
25enum UiEventType {
26  TYPE_UNKNOWN = 0;
27  // OPEN: Settings > Apps > Default Apps > Default autofill app
28  DEFAULT_AUTOFILL_PICKER = 1;
29  // ACTION: Update default app from Settings
30  ACTION_SETTINGS_UPDATE_DEFAULT_APP = 2;
31  // Autofill service called API that disables itself
32  AUTOFILL_SERVICE_DISABLED_SELF = 3;
33  // An autofill service asked to disable autofill for a given application.
34  AUTOFILL_SERVICE_DISABLED_APP = 4;
35  // An autofill service asked to disable autofill for a given activity.
36  AUTOFILL_SERVICE_DISABLED_ACTIVITY = 5;
37  // User manually enable autofill from the denylist for a given app.
38  AUTOFILL_ENABLED_FROM_DENYLIST = 6;
39  // An app attempted to forge a different component name in the AssisStructure that would be passed to the autofill service.
40  AUTOFILL_FORGED_COMPONENT_ATTEMPT = 7;
41}
42
43enum FillRequestTriggerReason {
44  TRIGGER_REASON_UNKNOWN = 0;
45  // A user or an app explicitly requests The request.
46  TRIGGER_REASON_EXPLICITLY_REQUESTED = 1;
47  // The request is retriggered by the provider.
48  TRIGGER_REASON_RETRIGGER = 2;
49  // The request is pre triggered.
50  TRIGGER_REASON_PRE_TRIGGER = 3;
51  // The request is normally triggered.
52  TRIGGER_REASON_NORMAL_TRIGGER = 4;
53  // The request is triggered from cached response.
54  TRIGGER_REASON_SERVED_FROM_CACHED_RESPONSE = 5;
55}
56
57enum AutofillDisplayPresentationType {
58  UNKNOWN_AUTOFILL_DISPLAY_PRESENTATION_TYPE = 0;
59  MENU = 1;    // aka drop-down
60  INLINE = 2;  // shown via IME
61  DIALOG = 3;  // aka Bottom-sheet dialog
62}
63
64enum FillResponseStatus {
65  RESPONSE_STATUS_UNKNOWN = 0;
66  RESPONSE_STATUS_FAILURE = 1;
67  RESPONSE_STATUS_SUCCESS = 2;
68  RESPONSE_STATUS_CANCELLED = 3;
69  RESPONSE_STATUS_TIMEOUT = 4;
70  RESPONSE_STATUS_SESSION_DESTROYED = 5;
71}
72
73enum AuthenticationType {
74  AUTHENTICATION_TYPE_UNKNOWN = 0;
75  DATASET_AUTHENTICATION = 1;
76  FULL_AUTHENTICATION = 2;
77}
78
79enum AuthenticationResult {
80  AUTHENTICATION_RESULT_UNKNOWN = 0;
81  AUTHENTICATION_SUCCESS = 1;
82  AUTHENTICATION_FAILURE = 2;
83}
84
85enum SaveUiShownReason {
86  SAVE_UI_SHOWN_REASON_UNKNOWN = 0;
87  SAVE_UI_SHOWN_REASON_REQUIRED_ID_CHANGE = 1;
88  SAVE_UI_SHOWN_REASON_OPTIONAL_ID_CHANGE = 2;
89  SAVE_UI_SHOWN_REASON_TRIGGER_ID_SET = 3;
90}
91
92enum SaveUiNotShownReason {
93  NO_SAVE_REASON_UNKNOWN = 0;
94  NO_SAVE_REASON_NONE = 1;
95  NO_SAVE_REASON_NO_SAVE_INFO = 2;
96  NO_SAVE_REASON_WITH_DELAY_SAVE_FLAG = 3;
97  NO_SAVE_REASON_HAS_EMPTY_REQUIRED = 4;
98  NO_SAVE_REASON_NO_VALUE_CHANGED = 5;
99  NO_SAVE_REASON_FIELD_VALIDATION_FAILED = 6;
100  NO_SAVE_REASON_DATASET_MATCH = 7;
101  NO_SAVE_REASON_WITH_DONT_SAVE_ON_FINISH_FLAG = 8;
102  NO_SAVE_REASON_SESSION_DESTROYED = 9;
103}
104
105// Determines the reason for committing the autofill Session.
106enum AutofillCommitReason {
107  COMMIT_REASON_UNKNOWN = 0;
108  COMMIT_REASON_ACTIVITY_FINISHED = 1;
109  COMMIT_REASON_VIEW_COMMITTED = 2;
110  COMMIT_REASON_VIEW_CLICKED = 3;
111  COMMIT_REASON_VIEW_CHANGED = 4;
112  COMMIT_REASON_SESSION_DESTROYED = 5;
113}
114
115enum DatasetPickedReason {
116  PICK_REASON_UNKNOWN = 0;
117  PICK_REASON_NO_PCC = 1;
118  PICK_REASON_PROVIDER_DETECTION_ONLY = 2;
119  PICK_REASON_PROVIDER_DETECTION_PREFERRED_WITH_PCC = 3;
120  PICK_REASON_PCC_DETECTION_ONLY = 4;
121  PICK_REASON_PCC_DETECTION_PREFERRED_WITH_PROVIDER = 5;
122}
123
124// Enum for specifying which detection provider gets the preference when choosing
125// final datasets.
126enum DetectionPreference {
127  DETECTION_PREFER_UNKONWN = 0;
128  DETECTION_PREFER_AUTOFILL_PROVIDER = 1;
129  DETECTION_PREFER_PCC = 2;
130}
131
132// Enum for specifying which detection provider gets the preference when choosing
133// final datasets.
134enum FieldClassificationRequestStatus {
135  STATUS_UNKNOWN = 0;
136  STATUS_SUCCESS = 1;
137  STATUS_FAIL = 2;
138  STATUS_CANCELLED = 3;
139}
140