• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2018 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";
18package android.bluetooth;
19
20option java_outer_classname = "BluetoothProtoEnums";
21option java_multiple_files = true;
22
23// Bluetooth connection states.
24enum ConnectionStateEnum {
25    CONNECTION_STATE_DISCONNECTED = 0;
26    CONNECTION_STATE_CONNECTING = 1;
27    CONNECTION_STATE_CONNECTED = 2;
28    CONNECTION_STATE_DISCONNECTING = 3;
29}
30
31// Bluetooth Adapter Enable and Disable Reasons
32enum EnableDisableReasonEnum {
33    ENABLE_DISABLE_REASON_UNSPECIFIED = 0;
34    ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1;
35    ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2;
36    ENABLE_DISABLE_REASON_DISALLOWED = 3;
37    ENABLE_DISABLE_REASON_RESTARTED = 4;
38    ENABLE_DISABLE_REASON_START_ERROR = 5;
39    ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6;
40    ENABLE_DISABLE_REASON_CRASH = 7;
41    ENABLE_DISABLE_REASON_USER_SWITCH = 8;
42    ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9;
43    ENABLE_DISABLE_REASON_FACTORY_RESET = 10;
44    ENABLE_DISABLE_REASON_INIT_FLAGS_CHANGED = 11;
45    ENABLE_DISABLE_REASON_SATELLITE_MODE = 12;
46}
47
48enum DirectionEnum {
49    DIRECTION_UNKNOWN = 0;
50    DIRECTION_OUTGOING = 1;
51    DIRECTION_INCOMING = 2;
52}
53
54// First item is the default value, other values follow Bluetooth spec definition
55enum LinkTypeEnum {
56    // Link type is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
57    LINK_TYPE_UNKNOWN = 0xFFF;
58    LINK_TYPE_SCO = 0x00;
59    LINK_TYPE_ACL = 0x01;
60    LINK_TYPE_ESCO = 0x02;
61}
62
63enum DeviceInfoSrcEnum {
64    DEVICE_INFO_SRC_UNKNOWN = 0;
65    // Within Android Bluetooth stack
66    DEVICE_INFO_INTERNAL = 1;
67    // Outside Android Bluetooth stack
68    DEVICE_INFO_EXTERNAL = 2;
69}
70
71enum DeviceTypeEnum {
72    DEVICE_TYPE_UNKNOWN = 0;
73    DEVICE_TYPE_CLASSIC = 1;
74    DEVICE_TYPE_LE = 2;
75    DEVICE_TYPE_DUAL = 3;
76}
77
78// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
79enum TransportTypeEnum {
80    TRANSPORT_TYPE_AUTO = 0;
81    TRANSPORT_TYPE_BREDR = 1;
82    TRANSPORT_TYPE_LE = 2;
83}
84
85// Bond state enum
86// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
87enum BondStateEnum {
88    BOND_STATE_UNKNOWN = 0;
89    BOND_STATE_NONE = 10;
90    BOND_STATE_BONDING = 11;
91    BOND_STATE_BONDED = 12;
92}
93
94// Sub states within the bonding general state
95enum BondSubStateEnum {
96    BOND_SUB_STATE_UNKNOWN = 0;
97    BOND_SUB_STATE_LOCAL_OOB_DATA_PROVIDED = 1;
98    BOND_SUB_STATE_LOCAL_PIN_REQUESTED = 2;
99    BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3;
100    BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4;
101    BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5;
102    BOND_SUB_STATE_LOCAL_BOND_STATE_INTENT_SENT = 6;
103    BOND_SUB_STATE_LOCAL_START_PAIRING = 7;
104    BOND_SUB_STATE_LOCAL_START_PAIRING_OOB = 8;
105}
106
107enum UnbondReasonEnum {
108    UNBOND_REASON_UNKNOWN = 0;
109    UNBOND_REASON_AUTH_FAILED = 1;
110    UNBOND_REASON_AUTH_REJECTED = 2;
111    UNBOND_REASON_AUTH_CANCELED = 3;
112    UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;
113    UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;
114    UNBOND_REASON_AUTH_TIMEOUT = 6;
115    UNBOND_REASON_REPEATED_ATTEMPTS = 7;
116    UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
117    UNBOND_REASON_REMOVED = 9;
118}
119
120enum SocketTypeEnum {
121    SOCKET_TYPE_UNKNOWN = 0;
122    SOCKET_TYPE_RFCOMM = 1;
123    SOCKET_TYPE_SCO = 2;
124    SOCKET_TYPE_L2CAP_BREDR = 3;
125    SOCKET_TYPE_L2CAP_LE = 4;
126}
127
128enum SocketConnectionstateEnum {
129    SOCKET_CONNECTION_STATE_UNKNOWN = 0;
130    // Socket acts as a server waiting for connection
131    SOCKET_CONNECTION_STATE_LISTENING = 1;
132    // Socket acts as a client trying to connect
133    SOCKET_CONNECTION_STATE_CONNECTING = 2;
134    // Socket is connected
135    SOCKET_CONNECTION_STATE_CONNECTED = 3;
136    // Socket tries to disconnect from remote
137    SOCKET_CONNECTION_STATE_DISCONNECTING = 4;
138    // This socket is closed
139    SOCKET_CONNECTION_STATE_DISCONNECTED = 5;
140}
141
142enum SocketRoleEnum {
143    SOCKET_ROLE_UNKNOWN = 0;
144    SOCKET_ROLE_LISTEN = 1;
145    SOCKET_ROLE_CONNECTION = 2;
146}
147
148enum L2capCocConnectionResult {
149    RESULT_L2CAP_CONN_UNKNOWN = 0;
150    RESULT_L2CAP_CONN_SUCCESS = 1;
151    RESULT_L2CAP_CONN_ACL_FAILURE = 2;
152    RESULT_L2CAP_CONN_CL_SEC_FAILURE = 3;
153    RESULT_L2CAP_CONN_INSUFFICIENT_AUTHENTICATION = 4;
154    RESULT_L2CAP_CONN_INSUFFICIENT_AUTHORIZATION = 5;
155    RESULT_L2CAP_CONN_INSUFFICIENT_ENCRYP_KEY_SIZE = 6;
156    RESULT_L2CAP_CONN_INSUFFICIENT_ENCRYP = 7;
157    RESULT_L2CAP_CONN_INVALID_SOURCE_CID = 8;
158    RESULT_L2CAP_CONN_SOURCE_CID_ALREADY_ALLOCATED = 9;
159    RESULT_L2CAP_CONN_UNACCEPTABLE_PARAMETERS = 10;
160    RESULT_L2CAP_CONN_INVALID_PARAMETERS = 11;
161    RESULT_L2CAP_CONN_NO_RESOURCES = 12;
162    RESULT_L2CAP_CONN_NO_PSM = 13;
163    RESULT_L2CAP_CONN_TIMEOUT = 14;
164    RESULT_L2CAP_CONN_BLUETOOTH_OFF = 15;
165
166    // Modify the curresponding value of BluetoothSocket.java
167    RESULT_L2CAP_CONN_BLUETOOTH_SOCKET_CONNECTION_FAILED = 1000;
168    RESULT_L2CAP_CONN_BLUETOOTH_SOCKET_CONNECTION_CLOSED = 1001;
169    RESULT_L2CAP_CONN_BLUETOOTH_UNABLE_TO_SEND_RPC = 1002;
170    RESULT_L2CAP_CONN_BLUETOOTH_NULL_BLUETOOTH_DEVICE = 1003;
171    RESULT_L2CAP_CONN_BLUETOOTH_GET_SOCKET_MANAGER_FAILED = 1004;
172    RESULT_L2CAP_CONN_BLUETOOTH_NULL_FILE_DESCRIPTOR = 1005;
173
174    // Modify the curresponding value of BluetoothServerSocket.java
175    RESULT_L2CAP_CONN_SERVER_FAILURE= 2000;
176}
177
178enum CodePathCounterKeyEnum {
179    COUNTER_KEY_UNKNOWN = 0;
180    // Reserver smaller counters for very important bt features
181
182    // [100,000 - 120,000) profile connection related
183
184        // [100,000 - 100,100) L2CAP
185        L2CAP_SUCCESS = 100000;
186        L2CAP_CONNECT_CONFIRM_NEG= 100001;
187        L2CAP_NO_COMPATIBLE_CHANNEL_AT_CSM_CLOSED = 100002;
188        L2CAP_SECURITY_NEG_AT_CSM_CLOSED= 100003;
189        L2CAP_TIMEOUT_AT_CSM_CLOSED = 100004;
190        L2CAP_CREDIT_BASED_CONNECT_RSP_NEG = 100005;
191        L2CAP_CONNECT_RSP_NEG = 100006;
192        L2CAP_INFO_NO_COMPATIBLE_CHANNEL_AT_RSP = 100007;
193        L2CAP_CONFIG_REQ_FAILURE = 100008;
194        L2CAP_CONFIG_RSP_NEG = 100009;
195        L2CAP_NO_COMPATIBLE_CHANNEL_AT_W4_SEC = 100010;
196        L2CAP_SECURITY_NEG_AT_W4_SEC= 100011;
197        L2CAP_TIMEOUT_AT_CONNECT_RSP = 100012;
198        L2CAP_CONN_OTHER_ERROR_AT_CONNECT_RSP = 100013;
199
200        // [100,100 - 100,200) SDP
201        SDP_SUCCESS = 100100;
202        SDP_FAILURE = 100101;
203        SDP_SENDING_DELAYED_UUID = 100102;
204        SDP_NOT_SENDING_DELAYED_UUID = 100103;
205        SDP_SENT_UUID = 100104;
206        SDP_UUIDS_EQUAL_SKIP = 100105;
207        SDP_ADD_UUID_WITH_INTENT = 100106;
208        SDP_ADD_UUID_WITH_NO_INTENT = 100107;
209        SDP_DROP_UUID = 100108;
210        SDP_FETCH_UUID_SKIP_ALREADY_CACHED = 100109;
211        SDP_FETCH_UUID_SKIP_ALREADY_BONDED = 100110;
212        SDP_INVOKE_SDP_CYCLE = 100111;
213        SDP_FETCH_UUID_REQUEST = 100112;
214
215
216        // [101,000 - 102,000) HFP
217
218            // [101,000 - 101,100) RFCOMM
219            RFCOMM_CONNECTION_SUCCESS_IND = 101000;
220            RFCOMM_CONNECTION_SUCCESS_CNF = 101001;
221            RFCOMM_PORT_START_CNF_FAILED = 101002;
222            RFCOMM_PORT_START_CLOSE = 101003;
223            RFCOMM_PORT_START_FAILED = 101004;
224            RFCOMM_PORT_NEG_FAILED = 101005;
225            RFCOMM_PORT_CLOSED = 101006;
226            RFCOMM_PORT_PEER_CONNECTION_FAILED = 101007;
227            RFCOMM_PORT_PEER_TIMEOUT = 101008;
228
229            // [101,100 - 101,200) HFP (btif)
230            HFP_COLLISON_AT_AG_OPEN = 101101;
231            HFP_COLLISON_AT_CONNECTING = 101102;
232            HFP_SELF_INITIATED_AG_FAILED = 101103;
233            HFP_SLC_SETUP_FAILED = 101104;
234
235        // [102,000 - 103,000) A2DP
236        A2DP_CONNECTION_SUCCESS = 102000;
237        A2DP_CONNECTION_ACL_DISCONNECTED = 102001;
238        A2DP_CONNECTION_REJECT_EVT = 102002;
239        A2DP_CONNECTION_FAILURE = 102003;
240        A2DP_CONNECTION_UNKNOWN_EVENT = 102004;
241        A2DP_ALREADY_CONNECTING = 102005;
242        A2DP_OFFLOAD_START_REQ_FAILURE = 102006;
243        A2DP_CONNECTION_CLOSE = 102007;
244        A2DP_CONNECTION_DISCONNECTED = 102008;
245        A2DP_CONNECTION_TIMEOUT = 102009;
246
247        // [103,000 - 103,100) HIDD
248        HID_PLUG_FAILURE = 103001;
249        HIDD_REGISTER_DESCRIPTOR_MALFORMED = 103002;
250
251        HIDD_ERR_NOT_REGISTERED_AT_INITIATE = 103003;
252        HIDD_ERR_NO_RESOURCES = 103004;
253        HIDD_ERR_NO_CONNECTION_AT_SEND_DATA = 103005;
254        HIDD_ERR_NO_CONNECTION_AT_DISCONNECT = 103006;
255        HIDD_ERR_INVALID_PARAM = 103007;
256        HIDD_ERR_CONGESTED_AT_DATA_WRITE = 103008;
257        HIDD_ERR_CONGESTED_AT_FLAG_CHECK = 103009;
258        HIDD_ERR_CONN_IN_PROCESS = 103010;
259        HIDD_ERR_ALREADY_CONN = 103011;
260        HIDD_ERR_DISCONNECTING = 103012;
261        HIDD_ERR_L2CAP_NOT_STARTED_INCOMING = 103013;
262        HIDD_ERR_L2CAP_FAILED_INITIATE = 103014;
263        HIDD_ERR_L2CAP_FAILED_CONTROL = 103015;
264        HIDD_ERR_L2CAP_FAILED_INTERRUPT = 103016;
265        HIDD_ERR_HOST_CALLBACK_NULL = 103017;
266        HIDD_ERR_INVALID_PARAM_SEND_REPORT = 103018;
267        HIDD_ERR_DEVICE_NOT_IN_USE_AT_CONNECT = 103019;
268        HIDD_ERR_DEVICE_NOT_IN_USE_AT_DISCONNECT = 103020;
269        HIDD_ERR_NOT_REGISTERED_AT_CONNECT = 103021;
270        HIDD_ERR_NOT_REGISTERED_AT_DISCONNECT = 103022;
271        HIDD_ERR_NOT_REGISTERED_AT_GET_DEVICE = 103023;
272        HIDD_ERR_NOT_REGISTERED_AT_DEREGISTER = 103024;
273        HIDD_ERR_NOT_REGISTERED_DUE_TO_DESCRIPTOR_LENGTH = 103025;
274        HIDD_ERR_NOT_REGISTERED_DUE_TO_BUFFER_ALLOCATION = 103026;
275        HIDD_ERR_NOT_REGISTERED_AT_SDP = 103027;
276        HIDD_ERR_ALREADY_REGISTERED = 103028;
277
278        // [103,100 - 103,200) HIDH
279        HIDH_ERR_ALREADY_REGISTERED = 103101;
280        HIDH_ERR_NO_RESOURCES_SDP = 103102;
281        HIDH_ERR_NO_RESOURCES_ADD_DEVICE = 103103;
282        HIDH_ERR_NO_CONNECTION_AT_SEND_DATA = 103104;
283        HIDH_ERR_NO_CONNECTION_AT_HOST_WRITE_DEV = 103105;
284        HIDH_ERR_NO_CONNECTION_AT_HOST_CLOSE_DEV = 103106;
285
286        HIDH_ERR_INVALID_PARAM_AT_SEND_DATA = 103107;
287        HIDH_ERR_INVALID_PARAM_AT_HOST_REGISTER = 103108;
288        HIDH_ERR_INVALID_PARAM_AT_HOST_REMOVE_DEV = 103109;
289        HIDH_ERR_INVALID_PARAM_AT_HOST_OPEN_DEV = 103110;
290        HIDH_ERR_INVALID_PARAM_AT_HOST_CLOSE_DEV = 103111;
291        HIDH_ERR_INVALID_PARAM_AT_HOST_WRITE_DEV = 103112;
292
293        HIDH_ERR_CONGESTED_AT_SEND_DATA = 103113;
294        HIDH_ERR_CONGESTED_AT_FLAG_CHECK = 103114;
295        HIDH_ERR_CONN_IN_PROCESS = 103115;
296        HIDH_ERR_ALREADY_CONN = 103116;
297
298        HIDH_ERR_L2CAP_FAILED_AT_INITIATE = 103117;
299        HIDH_ERR_L2CAP_FAILED_AT_REGISTER_CONTROL = 103118;
300        HIDH_ERR_L2CAP_FAILED_AT_REGISTER_INTERRUPT = 103119;
301
302        HIDH_ERR_AUTH_FAILED = 103120;
303        HIDH_ERR_SDP_BUSY = 103121;
304
305        //Native and Java
306        HIDH_COUNT_MAX_ADDED_DEVICE_LIMIT_REACHED = 103122;
307        HIDH_COUNT_VIRTUAL_UNPLUG_REQUESTED_BY_REMOTE_DEVICE = 103123;
308        HIDH_COUNT_CONNECT_REQ_WHEN_MAX_DEVICE_LIMIT_REACHED = 103124;
309        HIDH_COUNT_WRONG_REPORT_TYPE = 103125;
310        HIDH_COUNT_INCOMING_CONNECTION_REJECTED = 103126;
311        HIDH_COUNT_CONNECTION_POLICY_DISABLED = 103127;
312        HIDH_COUNT_SUPPORT_BOTH_HID_AND_HOGP = 103128;
313        HIDH_COUNT_SUPPORT_ONLY_HID_OR_HOGP = 103129;
314
315
316    // [120,000 - 120,500) LE scan related
317        // [120,000 - 120,100) LE scan enable/disable count
318        LE_SCAN_COUNT_TOTAL_ENABLE = 120000;
319        LE_SCAN_COUNT_TOTAL_DISABLE = 120001;
320        LE_SCAN_COUNT_FILTERED_ENABLE = 120002;
321        LE_SCAN_COUNT_FILTERED_DISABLE = 120003;
322        LE_SCAN_COUNT_UNFILTERED_ENABLE = 120004;
323        LE_SCAN_COUNT_UNFILTERED_DISABLE = 120005;
324        LE_SCAN_COUNT_BATCH_ENABLE = 120006;
325        LE_SCAN_COUNT_BATCH_DISABLE = 120007;
326        LE_SCAN_COUNT_AUTO_BATCH_ENABLE = 120008;
327        LE_SCAN_COUNT_AUTO_BATCH_DISABLE =  120009;
328
329        // [120,100 - 120,200) LE scan duration bucket count
330        LE_SCAN_DURATION_COUNT_REGULAR_10S = 120100;
331        LE_SCAN_DURATION_COUNT_REGULAR_1M = 120101;
332        LE_SCAN_DURATION_COUNT_REGULAR_10M = 120102;
333        LE_SCAN_DURATION_COUNT_REGULAR_1H =120103;
334        LE_SCAN_DURATION_COUNT_REGULAR_1HP =120104;
335        LE_SCAN_DURATION_COUNT_BATCH_10S = 120105;
336        LE_SCAN_DURATION_COUNT_BATCH_1M = 120106;
337        LE_SCAN_DURATION_COUNT_BATCH_10M = 120107;
338        LE_SCAN_DURATION_COUNT_BATCH_1H = 120108;
339        LE_SCAN_DURATION_COUNT_BATCH_1HP = 120109;
340
341        // [120,200 - 120,250) LE scan radio active duration
342        LE_SCAN_RADIO_DURATION_ALL = 120200;
343        LE_SCAN_RADIO_DURATION_REGULAR = 120201;
344        LE_SCAN_RADIO_DURATION_BATCH = 120202;
345        LE_SCAN_RADIO_DURATION_REGULAR_SCREEN_ON = 120203;
346        LE_SCAN_RADIO_DURATION_REGULAR_SCREEN_OFF = 120204;
347        LE_SCAN_RADIO_DURATION_BATCH_SCREEN_ON = 120205;
348        LE_SCAN_RADIO_DURATION_BATCH_SCREEN_OFF = 120206;
349
350        // [120,250 - 120,300) LE scan radio scan mode count
351        LE_SCAN_RADIO_SCAN_MODE_OPPORTUNISTIC_COUNT = 120250;
352        LE_SCAN_RADIO_SCAN_MODE_LOW_POWER_COUNT = 120251;
353        LE_SCAN_RADIO_SCAN_MODE_BALANCED_COUNT = 120252;
354        LE_SCAN_RADIO_SCAN_MODE_LOW_LATENCY_COUNT = 120253;
355        LE_SCAN_RADIO_SCAN_MODE_AMBIENT_DISCOVERY_COUNT = 120254;
356        LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_COUNT = 120255;
357        LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_BALANCED_COUNT = 120256;
358        LE_SCAN_RADIO_SCAN_MODE_OPPORTUNISTIC_COUNT_SCREEN_OFF = 120257;
359        LE_SCAN_RADIO_SCAN_MODE_LOW_POWER_COUNT_SCREEN_OFF = 120258;
360        LE_SCAN_RADIO_SCAN_MODE_BALANCED_COUNT_SCREEN_OFF = 120259;
361        LE_SCAN_RADIO_SCAN_MODE_LOW_LATENCY_COUNT_SCREEN_OFF = 120260;
362        LE_SCAN_RADIO_SCAN_MODE_AMBIENT_DISCOVERY_COUNT_SCREEN_OFF = 120261;
363        LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_COUNT_SCREEN_OFF = 120262;
364        LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_BALANCED_COUNT_SCREEN_OFF = 120263;
365
366        // [120,300 - 120,400) LE scan results count
367        LE_SCAN_RESULTS_COUNT_ALL = 120300;
368        LE_SCAN_RESULTS_COUNT_REGULAR = 120301;
369        LE_SCAN_RESULTS_COUNT_BATCH = 120302;
370        LE_SCAN_RESULTS_COUNT_REGULAR_SCREEN_ON = 120303;
371        LE_SCAN_RESULTS_COUNT_REGULAR_SCREEN_OFF =  120304;
372        LE_SCAN_RESULTS_COUNT_BATCH_SCREEN_ON = 120305;
373        LE_SCAN_RESULTS_COUNT_BATCH_SCREEN_OFF = 120306;
374        LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE = 120307;
375        LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE_SCREEN_ON = 120308;
376        LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE_SCREEN_OFF = 120309;
377
378        // [120,400 - 120,500) LE scan abuse count
379        LE_SCAN_ABUSE_COUNT_SCAN_TIMEOUT = 120400;
380        LE_SCAN_ABUSE_COUNT_HW_FILTER_NOT_AVAILABLE = 120401;
381        LE_SCAN_ABUSE_COUNT_TRACKING_HW_FILTER_NOT_AVAILABLE = 120402;
382
383    // [120,500 - 121,000) LE advertise related
384        // [120,500 - 120,600) LE advertise enable/disable count
385        LE_ADV_COUNT_ENABLE = 120500;
386        LE_ADV_COUNT_DISABLE = 120501;
387        LE_ADV_COUNT_CONNECTABLE_ENABLE = 120502;
388        LE_ADV_COUNT_CONNECTABLE_DISABLE = 120503;
389        LE_ADV_COUNT_PERIODIC_ENABLE = 120504;
390        LE_ADV_COUNT_PERIODIC_DISABLE = 120505;
391
392        // [120,600 - 120,700) LE advertise instance bucket count
393        LE_ADV_INSTANCE_COUNT_5 = 120600;
394        LE_ADV_INSTANCE_COUNT_10 = 120601;
395        LE_ADV_INSTANCE_COUNT_15 = 120602;
396        LE_ADV_INSTANCE_COUNT_15P = 120603;
397
398        // [120,700 - 120,800) LE advertise duration bucket count
399        LE_ADV_DURATION_COUNT_TOTAL_1M = 120700;
400        LE_ADV_DURATION_COUNT_TOTAL_30M = 120701;
401        LE_ADV_DURATION_COUNT_TOTAL_1H = 120702;
402        LE_ADV_DURATION_COUNT_TOTAL_3H = 120703;
403        LE_ADV_DURATION_COUNT_TOTAL_3HP = 120704;
404        LE_ADV_DURATION_COUNT_CONNECTABLE_1M = 120705;
405        LE_ADV_DURATION_COUNT_CONNECTABLE_30M = 120706;
406        LE_ADV_DURATION_COUNT_CONNECTABLE_1H = 120707;
407        LE_ADV_DURATION_COUNT_CONNECTABLE_3H = 120708;
408        LE_ADV_DURATION_COUNT_CONNECTABLE_3HP = 120709;
409        LE_ADV_DURATION_COUNT_PERIODIC_1M = 120710;
410        LE_ADV_DURATION_COUNT_PERIODIC_30M = 120711;
411        LE_ADV_DURATION_COUNT_PERIODIC_1H = 120712;
412        LE_ADV_DURATION_COUNT_PERIODIC_3H = 120713;
413        LE_ADV_DURATION_COUNT_PERIODIC_3HP = 120714;
414
415        // [120,800 - 120,900) LE advertise error count
416        LE_ADV_ERROR_ON_START_COUNT = 120800;
417
418   // [120,900 - 121,000) GATT Related Count
419        GATT_CLIENT_CONNECT_IS_DIRECT = 120900;
420        GATT_CLIENT_CONNECT_IS_AUTOCONNECT = 120901;
421        GATT_CLIENT_CONNECT_IS_DIRECT_IN_FOREGROUND = 120902;
422        GATT_CLIENT_CONNECT_IS_DIRECT_NOT_IN_FOREGROUND = 120903;
423        GATT_CLIENT_CONNECT_IS_AUTOCONNECT_IN_FOREGROUND = 120904;
424        GATT_CLIENT_CONNECT_IS_AUTOCONNECT_NOT_IN_FOREGROUND = 120905;
425        GATT_SERVER_CONNECT_IS_DIRECT_IN_FOREGROUND = 120906;
426        GATT_SERVER_CONNECT_IS_DIRECT_NOT_IN_FOREGROUND = 120907;
427        GATT_SERVER_CONNECT_IS_AUTOCONNECT_IN_FOREGROUND = 120908;
428        GATT_SERVER_CONNECT_IS_AUTOCONNECT_NOT_IN_FOREGROUND = 120909;
429
430   // [121,000 - 121,100) System state related
431        // [121,000 - 121,010) Screen on/off count
432        SCREEN_ON_EVENT = 121000;
433        SCREEN_OFF_EVENT = 121001;
434
435    // [121,100 - 122,000) Le Audio related
436        // [121,100 - 121,200) device/group health status count
437        LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_GOOD = 121100;
438        LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD = 121101;
439        LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_DB = 121102;
440        LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_CSIS = 121103;
441        LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_GOOD = 121104;
442        LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD = 121105;
443        LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_DB = 121106;
444        LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_CSIS = 121107;
445        LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_GOOD = 121108;
446        LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_TRENDING_BAD = 121109;
447        LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD = 121110;
448        LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_CIS_FAILED = 121111;
449        LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_SIGNALING_FAILED = 121112;
450        LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_GOOD = 121113;
451        LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_TRENDING_BAD = 121114;
452        LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD = 121115;
453        LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_CIS_FAILED = 121116;
454        LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_SIGNALING_FAILED = 121117;
455}
456
457enum AddressTypeEnum {
458    ADDRESS_TYPE_PUBLIC = 0;
459    ADDRESS_TYPE_RANDOM = 1;
460    ADDRESS_TYPE_UNKNOWN = 0xFFFF;
461}
462
463// Major Class from packages/modules/Bluetooth/framework/java/android/bluetooth/BluetoothClass.java
464enum MajorClassEnum {
465    MAJOR_CLASS_UNCATEGORIZED = 0x1F00;
466    MAJOR_CLASS_MISC = 0x0000;
467    MAJOR_CLASS_COMPUTER = 0x0100;
468    MAJOR_CLASS_PHONE = 0x0200;
469    MAJOR_CLASS_NETWORKING = 0x0300;
470    MAJOR_CLASS_AUDIO_VIDEO = 0x0400;
471    MAJOR_CLASS_PERIPHERAL = 0x0500;
472    MAJOR_CLASS_IMAGING = 0x0600;
473    MAJOR_CLASS_WEARABLE = 0x0700;
474    MAJOR_CLASS_TOY = 0x0800;
475    MAJOR_CLASS_HEALTH = 0x0900;
476}
477
478enum ProfileConnectionResult {
479    RESULT_UNKNOWN = 0;
480    RESULT_SUCCESS = 1;
481    RESULT_FAILURE = 2;
482}
483
484enum ProfileConnectionReason {
485    REASON_UNKNOWN = 0;
486    REASON_SUCCESS = 1;
487    REASON_UNEXPECTED_STATE = 2;
488    REASON_NATIVE_LAYER_REJECTED = 3;
489    REASON_INCOMING_CONN_REJECTED = 4;
490}
491
492// Comment added to those whose enum names do not match the actual file names.
493enum ContentProfileFileName {
494  BLUETOOTH_FILE_NAME_UNKNOWN = 0;
495
496  // [1, 10000] - MAP
497  BLUETOOTH_MAP_ACCOUNT_LOADER = 1;
498  BLUETOOTH_MAP_APP_OBSERVER = 2;
499  BLUETOOTH_MAP_APP_PARAMS = 3;
500  BLUETOOTH_MAP_BMESSAGE = 4;
501  BLUETOOTH_MAP_BMESSAGE_EMAIL = 5;
502  BLUETOOTH_MAP_BMESSAGE_MIME = 6;
503  BLUETOOTH_MAP_CONTENT = 7;
504  BLUETOOTH_MAP_CONTENT_OBSERVER = 8;
505  BLUETOOTH_MAP_CONVO_CONTACT_ELEMENT = 9;
506  BLUETOOTH_MAP_CONVO_LISTING = 10;
507  BLUETOOTH_MAP_CONVO_LISTING_ELEMENT = 11;
508  BLUETOOTH_MAP_FOLDER_ELEMENT = 12;
509  BLUETOOTH_MAP_MAS_INSTANCE = 13;
510  BLUETOOTH_MAP_MESSAGE_LISTING = 14;
511  BLUETOOTH_MAP_OBEX_SERVER = 15;
512  BLUETOOTH_MAP_SERVICE = 16;
513  BLUETOOTH_MAP_SMS_PDU = 17;
514  BLUETOOTH_MAP_UTILS = 18;
515  BLUETOOTH_MNS_OBEX_CLIENT = 19;
516  BLUETOOTH_SMS_MMS_CONTACTS = 20;  // SmsMmsContacts.java
517  BLUETOOTH_MMS_FILE_PROVIDER = 21; // MmsFileProvider.java
518
519  // [10001, 20000] - OPP
520  BLUETOOTH_OPP_MANAGER = 10001;
521  BLUETOOTH_OPP_TRANSFER_HISTORY = 10002;
522  BLUETOOTH_OPP_OBEX_CLIENT_SESSION = 10003;
523  BLUETOOTH_OPP_UTILITY = 10004;
524  BLUETOOTH_OPP_LAUNCHER_ACTIVITY = 10005;
525  BLUETOOTH_OPP_RECEIVER = 10006;
526  BLUETOOTH_OPP_TRANSFER = 10007;
527  BLUETOOTH_OPP_SEND_FILE_INFO = 10008;
528  BLUETOOTH_OPP_INCOMING_FILE_CONFIRM_ACTIVITY = 10009;
529  BLUETOOTH_OPP_OBEX_SERVER_SESSION = 10010;
530  BLUETOOTH_OPP_RECEIVE_FILE_INFO = 10011;
531  BLUETOOTH_OPP_TRANSFER_ACTIVITY = 10012;
532  BLUETOOTH_OPP_PROVIDER = 10013;
533  BLUETOOTH_OPP_SERVICE = 10014;
534  BLUETOOTH_OPP_CONSTANTS = 10015; // Constants.java
535
536  // [20001, 30000] - PBAP
537  BLUETOOTH_PBAP_ACTIVITY = 20001;
538  BLUETOOTH_PBAP_AUTHENTICATOR = 20002;
539  BLUETOOTH_PBAP_CALL_LOG_COMPOSER = 20003;
540  BLUETOOTH_PBAP_CONFIG = 20004;
541  BLUETOOTH_PBAP_OBEX_SERVER = 20005;
542  BLUETOOTH_PBAP_SERVICE = 20006;
543  BLUETOOTH_PBAP_SIM_VCARD_MANAGER = 20007;
544  BLUETOOTH_PBAP_UTILS = 20008;
545  BLUETOOTH_PBAP_VCARD_MANAGER = 20009;
546  BLUETOOTH_PBAP_HANDLER_FOR_STRING_BUFFER = 20010; // HandlerForStringBuffer.java
547  BLUETOOTH_PBAP_STATE_MACHINE = 20011; // PbapStateMachine.java
548
549  // Will be added more if needed in future.
550}
551