| /* |
| * Copyright 2018 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| syntax = "proto2"; |
| package android.bluetooth; |
| |
| option java_outer_classname = "BluetoothProtoEnums"; |
| option java_multiple_files = true; |
| |
| // Bluetooth connection states. |
| enum ConnectionStateEnum { |
| CONNECTION_STATE_DISCONNECTED = 0; |
| CONNECTION_STATE_CONNECTING = 1; |
| CONNECTION_STATE_CONNECTED = 2; |
| CONNECTION_STATE_DISCONNECTING = 3; |
| } |
| |
| // Bluetooth Adapter Enable and Disable Reasons |
| enum EnableDisableReasonEnum { |
| ENABLE_DISABLE_REASON_UNSPECIFIED = 0; |
| ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1; |
| ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2; |
| ENABLE_DISABLE_REASON_DISALLOWED = 3; |
| ENABLE_DISABLE_REASON_RESTARTED = 4; |
| ENABLE_DISABLE_REASON_START_ERROR = 5; |
| ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6; |
| ENABLE_DISABLE_REASON_CRASH = 7; |
| ENABLE_DISABLE_REASON_USER_SWITCH = 8; |
| ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9; |
| ENABLE_DISABLE_REASON_FACTORY_RESET = 10; |
| ENABLE_DISABLE_REASON_INIT_FLAGS_CHANGED = 11; |
| ENABLE_DISABLE_REASON_SATELLITE_MODE = 12; |
| } |
| |
| enum DirectionEnum { |
| DIRECTION_UNKNOWN = 0; |
| DIRECTION_OUTGOING = 1; |
| DIRECTION_INCOMING = 2; |
| } |
| |
| // First item is the default value, other values follow Bluetooth spec definition |
| enum LinkTypeEnum { |
| // Link type is at most 1 byte (0xFF), thus 0xFFF must not be a valid value |
| LINK_TYPE_UNKNOWN = 0xFFF; |
| LINK_TYPE_SCO = 0x00; |
| LINK_TYPE_ACL = 0x01; |
| LINK_TYPE_ESCO = 0x02; |
| } |
| |
| enum DeviceInfoSrcEnum { |
| DEVICE_INFO_SRC_UNKNOWN = 0; |
| // Within Android Bluetooth stack |
| DEVICE_INFO_INTERNAL = 1; |
| // Outside Android Bluetooth stack |
| DEVICE_INFO_EXTERNAL = 2; |
| } |
| |
| enum DeviceTypeEnum { |
| DEVICE_TYPE_UNKNOWN = 0; |
| DEVICE_TYPE_CLASSIC = 1; |
| DEVICE_TYPE_LE = 2; |
| DEVICE_TYPE_DUAL = 3; |
| } |
| |
| // Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| enum TransportTypeEnum { |
| TRANSPORT_TYPE_AUTO = 0; |
| TRANSPORT_TYPE_BREDR = 1; |
| TRANSPORT_TYPE_LE = 2; |
| } |
| |
| // Bond state enum |
| // Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| enum BondStateEnum { |
| BOND_STATE_UNKNOWN = 0; |
| BOND_STATE_NONE = 10; |
| BOND_STATE_BONDING = 11; |
| BOND_STATE_BONDED = 12; |
| } |
| |
| // Sub states within the bonding general state |
| enum BondSubStateEnum { |
| BOND_SUB_STATE_UNKNOWN = 0; |
| BOND_SUB_STATE_LOCAL_OOB_DATA_PROVIDED = 1; |
| BOND_SUB_STATE_LOCAL_PIN_REQUESTED = 2; |
| BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3; |
| BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4; |
| BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5; |
| BOND_SUB_STATE_LOCAL_BOND_STATE_INTENT_SENT = 6; |
| BOND_SUB_STATE_LOCAL_START_PAIRING = 7; |
| BOND_SUB_STATE_LOCAL_START_PAIRING_OOB = 8; |
| } |
| |
| enum UnbondReasonEnum { |
| UNBOND_REASON_UNKNOWN = 0; |
| UNBOND_REASON_AUTH_FAILED = 1; |
| UNBOND_REASON_AUTH_REJECTED = 2; |
| UNBOND_REASON_AUTH_CANCELED = 3; |
| UNBOND_REASON_REMOTE_DEVICE_DOWN = 4; |
| UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5; |
| UNBOND_REASON_AUTH_TIMEOUT = 6; |
| UNBOND_REASON_REPEATED_ATTEMPTS = 7; |
| UNBOND_REASON_REMOTE_AUTH_CANCELED = 8; |
| UNBOND_REASON_REMOVED = 9; |
| } |
| |
| enum SocketTypeEnum { |
| SOCKET_TYPE_UNKNOWN = 0; |
| SOCKET_TYPE_RFCOMM = 1; |
| SOCKET_TYPE_SCO = 2; |
| SOCKET_TYPE_L2CAP_BREDR = 3; |
| SOCKET_TYPE_L2CAP_LE = 4; |
| } |
| |
| enum SocketConnectionstateEnum { |
| SOCKET_CONNECTION_STATE_UNKNOWN = 0; |
| // Socket acts as a server waiting for connection |
| SOCKET_CONNECTION_STATE_LISTENING = 1; |
| // Socket acts as a client trying to connect |
| SOCKET_CONNECTION_STATE_CONNECTING = 2; |
| // Socket is connected |
| SOCKET_CONNECTION_STATE_CONNECTED = 3; |
| // Socket tries to disconnect from remote |
| SOCKET_CONNECTION_STATE_DISCONNECTING = 4; |
| // This socket is closed |
| SOCKET_CONNECTION_STATE_DISCONNECTED = 5; |
| } |
| |
| enum SocketRoleEnum { |
| SOCKET_ROLE_UNKNOWN = 0; |
| SOCKET_ROLE_LISTEN = 1; |
| SOCKET_ROLE_CONNECTION = 2; |
| } |
| |
| enum L2capCocConnectionResult { |
| RESULT_L2CAP_CONN_UNKNOWN = 0; |
| RESULT_L2CAP_CONN_SUCCESS = 1; |
| RESULT_L2CAP_CONN_ACL_FAILURE = 2; |
| RESULT_L2CAP_CONN_CL_SEC_FAILURE = 3; |
| RESULT_L2CAP_CONN_INSUFFICIENT_AUTHENTICATION = 4; |
| RESULT_L2CAP_CONN_INSUFFICIENT_AUTHORIZATION = 5; |
| RESULT_L2CAP_CONN_INSUFFICIENT_ENCRYP_KEY_SIZE = 6; |
| RESULT_L2CAP_CONN_INSUFFICIENT_ENCRYP = 7; |
| RESULT_L2CAP_CONN_INVALID_SOURCE_CID = 8; |
| RESULT_L2CAP_CONN_SOURCE_CID_ALREADY_ALLOCATED = 9; |
| RESULT_L2CAP_CONN_UNACCEPTABLE_PARAMETERS = 10; |
| RESULT_L2CAP_CONN_INVALID_PARAMETERS = 11; |
| RESULT_L2CAP_CONN_NO_RESOURCES = 12; |
| RESULT_L2CAP_CONN_NO_PSM = 13; |
| RESULT_L2CAP_CONN_TIMEOUT = 14; |
| RESULT_L2CAP_CONN_BLUETOOTH_OFF = 15; |
| |
| // Modify the curresponding value of BluetoothSocket.java |
| RESULT_L2CAP_CONN_BLUETOOTH_SOCKET_CONNECTION_FAILED = 1000; |
| RESULT_L2CAP_CONN_BLUETOOTH_SOCKET_CONNECTION_CLOSED = 1001; |
| RESULT_L2CAP_CONN_BLUETOOTH_UNABLE_TO_SEND_RPC = 1002; |
| RESULT_L2CAP_CONN_BLUETOOTH_NULL_BLUETOOTH_DEVICE = 1003; |
| RESULT_L2CAP_CONN_BLUETOOTH_GET_SOCKET_MANAGER_FAILED = 1004; |
| RESULT_L2CAP_CONN_BLUETOOTH_NULL_FILE_DESCRIPTOR = 1005; |
| |
| // Modify the curresponding value of BluetoothServerSocket.java |
| RESULT_L2CAP_CONN_SERVER_FAILURE= 2000; |
| } |
| |
| enum CodePathCounterKeyEnum { |
| KEY_UNKNOWN = 0; |
| // Reserver smaller counters for very important bt features |
| |
| // [100,000 - 120,000) profile connection related |
| |
| // [100,000 - 100,100) L2CAP |
| L2CAP_SUCCESS = 100000; |
| L2CAP_CONNECT_CONFIRM_NEG= 100001; |
| L2CAP_NO_COMPATIBLE_CHANNEL_AT_CSM_CLOSED = 100002; |
| L2CAP_SECURITY_NEG_AT_CSM_CLOSED= 100003; |
| L2CAP_TIMEOUT_AT_CSM_CLOSED = 100004; |
| L2CAP_CREDIT_BASED_CONNECT_RSP_NEG = 100005; |
| L2CAP_CONNECT_RSP_NEG = 100006; |
| L2CAP_INFO_NO_COMPATIBLE_CHANNEL_AT_RSP = 100007; |
| L2CAP_CONFIG_REQ_FAILURE = 100008; |
| L2CAP_CONFIG_RSP_NEG = 100009; |
| L2CAP_NO_COMPATIBLE_CHANNEL_AT_W4_SEC = 100010; |
| L2CAP_SECURITY_NEG_AT_W4_SEC= 100011; |
| L2CAP_TIMEOUT_AT_CONNECT_RSP = 100012; |
| L2CAP_CONN_OTHER_ERROR_AT_CONNECT_RSP = 100013; |
| |
| // [100,100 - 100,200) SDP |
| SDP_SUCCESS = 100100; |
| SDP_FAILURE = 100101; |
| SDP_SENDING_DELAYED_UUID = 100102; |
| SDP_NOT_SENDING_DELAYED_UUID = 100103; |
| SDP_SENT_UUID = 100104; |
| SDP_UUIDS_EQUAL_SKIP = 100105; |
| SDP_ADD_UUID_WITH_INTENT = 100106; |
| SDP_ADD_UUID_WITH_NO_INTENT = 100107; |
| SDP_DROP_UUID = 100108; |
| SDP_FETCH_UUID_SKIP_ALREADY_CACHED = 100109; |
| SDP_FETCH_UUID_SKIP_ALREADY_BONDED = 100110; |
| SDP_INVOKE_SDP_CYCLE = 100111; |
| SDP_FETCH_UUID_REQUEST = 100112; |
| |
| |
| // [101,000 - 102,000) HFP |
| |
| // [101,000 - 101,100) RFCOMM |
| RFCOMM_CONNECTION_SUCCESS_IND = 101000; |
| RFCOMM_CONNECTION_SUCCESS_CNF = 101001; |
| RFCOMM_PORT_START_CNF_FAILED = 101002; |
| RFCOMM_PORT_START_CLOSE = 101003; |
| RFCOMM_PORT_START_FAILED = 101004; |
| RFCOMM_PORT_NEG_FAILED = 101005; |
| RFCOMM_PORT_CLOSED = 101006; |
| RFCOMM_PORT_PEER_CONNECTION_FAILED = 101007; |
| RFCOMM_PORT_PEER_TIMEOUT = 101008; |
| |
| // [101,100 - 101,200) HFP (btif) |
| HFP_COLLISON_AT_AG_OPEN = 101101; |
| HFP_COLLISON_AT_CONNECTING = 101102; |
| HFP_SELF_INITIATED_AG_FAILED = 101103; |
| HFP_SLC_SETUP_FAILED = 101104; |
| |
| // [102,000 - 103,000) A2DP |
| A2DP_CONNECTION_SUCCESS = 102000; |
| A2DP_CONNECTION_ACL_DISCONNECTED = 102001; |
| A2DP_CONNECTION_REJECT_EVT = 102002; |
| A2DP_CONNECTION_FAILURE = 102003; |
| A2DP_CONNECTION_UNKNOWN_EVENT = 102004; |
| A2DP_ALREADY_CONNECTING = 102005; |
| A2DP_OFFLOAD_START_REQ_FAILURE = 102006; |
| A2DP_CONNECTION_CLOSE = 102007; |
| A2DP_CONNECTION_DISCONNECTED = 102008; |
| A2DP_CONNECTION_TIMEOUT = 102009; |
| |
| // [103,000 - 103,100) HIDD |
| HID_PLUG_FAILURE = 103001; |
| HIDD_REGISTER_DESCRIPTOR_MALFORMED = 103002; |
| |
| HIDD_ERR_NOT_REGISTERED_AT_INITIATE = 103003; |
| HIDD_ERR_NO_RESOURCES = 103004; |
| HIDD_ERR_NO_CONNECTION_AT_SEND_DATA = 103005; |
| HIDD_ERR_NO_CONNECTION_AT_DISCONNECT = 103006; |
| HIDD_ERR_INVALID_PARAM = 103007; |
| HIDD_ERR_CONGESTED_AT_DATA_WRITE = 103008; |
| HIDD_ERR_CONGESTED_AT_FLAG_CHECK = 103009; |
| HIDD_ERR_CONN_IN_PROCESS = 103010; |
| HIDD_ERR_ALREADY_CONN = 103011; |
| HIDD_ERR_DISCONNECTING = 103012; |
| HIDD_ERR_L2CAP_NOT_STARTED_INCOMING = 103013; |
| HIDD_ERR_L2CAP_FAILED_INITIATE = 103014; |
| HIDD_ERR_L2CAP_FAILED_CONTROL = 103015; |
| HIDD_ERR_L2CAP_FAILED_INTERRUPT = 103016; |
| HIDD_ERR_HOST_CALLBACK_NULL = 103017; |
| HIDD_ERR_INVALID_PARAM_SEND_REPORT = 103018; |
| HIDD_ERR_DEVICE_NOT_IN_USE_AT_CONNECT = 103019; |
| HIDD_ERR_DEVICE_NOT_IN_USE_AT_DISCONNECT = 103020; |
| HIDD_ERR_NOT_REGISTERED_AT_CONNECT = 103021; |
| HIDD_ERR_NOT_REGISTERED_AT_DISCONNECT = 103022; |
| HIDD_ERR_NOT_REGISTERED_AT_GET_DEVICE = 103023; |
| HIDD_ERR_NOT_REGISTERED_AT_DEREGISTER = 103024; |
| HIDD_ERR_NOT_REGISTERED_DUE_TO_DESCRIPTOR_LENGTH = 103025; |
| HIDD_ERR_NOT_REGISTERED_DUE_TO_BUFFER_ALLOCATION = 103026; |
| HIDD_ERR_NOT_REGISTERED_AT_SDP = 103027; |
| HIDD_ERR_ALREADY_REGISTERED = 103028; |
| |
| // [103,100 - 103,200) HIDH |
| HIDH_ERR_ALREADY_REGISTERED = 103101; |
| HIDH_ERR_NO_RESOURCES_SDP = 103102; |
| HIDH_ERR_NO_RESOURCES_ADD_DEVICE = 103103; |
| HIDH_ERR_NO_CONNECTION_AT_SEND_DATA = 103104; |
| HIDH_ERR_NO_CONNECTION_AT_HOST_WRITE_DEV = 103105; |
| HIDH_ERR_NO_CONNECTION_AT_HOST_CLOSE_DEV = 103106; |
| |
| HIDH_ERR_INVALID_PARAM_AT_SEND_DATA = 103107; |
| HIDH_ERR_INVALID_PARAM_AT_HOST_REGISTER = 103108; |
| HIDH_ERR_INVALID_PARAM_AT_HOST_REMOVE_DEV = 103109; |
| HIDH_ERR_INVALID_PARAM_AT_HOST_OPEN_DEV = 103110; |
| HIDH_ERR_INVALID_PARAM_AT_HOST_CLOSE_DEV = 103111; |
| HIDH_ERR_INVALID_PARAM_AT_HOST_WRITE_DEV = 103112; |
| |
| HIDH_ERR_CONGESTED_AT_SEND_DATA = 103113; |
| HIDH_ERR_CONGESTED_AT_FLAG_CHECK = 103114; |
| HIDH_ERR_CONN_IN_PROCESS = 103115; |
| HIDH_ERR_ALREADY_CONN = 103116; |
| |
| HIDH_ERR_L2CAP_FAILED_AT_INITIATE = 103117; |
| HIDH_ERR_L2CAP_FAILED_AT_REGISTER_CONTROL = 103118; |
| HIDH_ERR_L2CAP_FAILED_AT_REGISTER_INTERRUPT = 103119; |
| |
| HIDH_ERR_AUTH_FAILED = 103120; |
| HIDH_ERR_SDP_BUSY = 103121; |
| |
| // [120,000 - 120,500) LE scan related |
| // [120,000 - 120,100) LE scan enable/disable count |
| LE_SCAN_COUNT_TOTAL_ENABLE = 120000; |
| LE_SCAN_COUNT_TOTAL_DISABLE = 120001; |
| LE_SCAN_COUNT_FILTERED_ENABLE = 120002; |
| LE_SCAN_COUNT_FILTERED_DISABLE = 120003; |
| LE_SCAN_COUNT_UNFILTERED_ENABLE = 120004; |
| LE_SCAN_COUNT_UNFILTERED_DISABLE = 120005; |
| LE_SCAN_COUNT_BATCH_ENABLE = 120006; |
| LE_SCAN_COUNT_BATCH_DISABLE = 120007; |
| LE_SCAN_COUNT_AUTO_BATCH_ENABLE = 120008; |
| LE_SCAN_COUNT_AUTO_BATCH_DISABLE = 120009; |
| |
| // [120,100 - 120,200) LE scan duration bucket count |
| LE_SCAN_DURATION_COUNT_REGULAR_10S = 120100; |
| LE_SCAN_DURATION_COUNT_REGULAR_1M = 120101; |
| LE_SCAN_DURATION_COUNT_REGULAR_10M = 120102; |
| LE_SCAN_DURATION_COUNT_REGULAR_1H =120103; |
| LE_SCAN_DURATION_COUNT_REGULAR_1HP =120104; |
| LE_SCAN_DURATION_COUNT_BATCH_10S = 120105; |
| LE_SCAN_DURATION_COUNT_BATCH_1M = 120106; |
| LE_SCAN_DURATION_COUNT_BATCH_10M = 120107; |
| LE_SCAN_DURATION_COUNT_BATCH_1H = 120108; |
| LE_SCAN_DURATION_COUNT_BATCH_1HP = 120109; |
| |
| // [120,200 - 120,250) LE scan radio active duration |
| LE_SCAN_RADIO_DURATION_ALL = 120200; |
| LE_SCAN_RADIO_DURATION_REGULAR = 120201; |
| LE_SCAN_RADIO_DURATION_BATCH = 120202; |
| LE_SCAN_RADIO_DURATION_REGULAR_SCREEN_ON = 120203; |
| LE_SCAN_RADIO_DURATION_REGULAR_SCREEN_OFF = 120204; |
| LE_SCAN_RADIO_DURATION_BATCH_SCREEN_ON = 120205; |
| LE_SCAN_RADIO_DURATION_BATCH_SCREEN_OFF = 120206; |
| |
| // [120,250 - 120,300) LE scan radio scan mode count |
| LE_SCAN_RADIO_SCAN_MODE_OPPORTUNISTIC_COUNT = 120250; |
| LE_SCAN_RADIO_SCAN_MODE_LOW_POWER_COUNT = 120251; |
| LE_SCAN_RADIO_SCAN_MODE_BALANCED_COUNT = 120252; |
| LE_SCAN_RADIO_SCAN_MODE_LOW_LATENCY_COUNT = 120253; |
| LE_SCAN_RADIO_SCAN_MODE_AMBIENT_DISCOVERY_COUNT = 120254; |
| LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_COUNT = 120255; |
| LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_BALANCED_COUNT = 120256; |
| LE_SCAN_RADIO_SCAN_MODE_OPPORTUNISTIC_COUNT_SCREEN_OFF = 120257; |
| LE_SCAN_RADIO_SCAN_MODE_LOW_POWER_COUNT_SCREEN_OFF = 120258; |
| LE_SCAN_RADIO_SCAN_MODE_BALANCED_COUNT_SCREEN_OFF = 120259; |
| LE_SCAN_RADIO_SCAN_MODE_LOW_LATENCY_COUNT_SCREEN_OFF = 120260; |
| LE_SCAN_RADIO_SCAN_MODE_AMBIENT_DISCOVERY_COUNT_SCREEN_OFF = 120261; |
| LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_COUNT_SCREEN_OFF = 120262; |
| LE_SCAN_RADIO_SCAN_MODE_SCREEN_OFF_BALANCED_COUNT_SCREEN_OFF = 120263; |
| |
| // [120,300 - 120,400) LE scan results count |
| LE_SCAN_RESULTS_COUNT_ALL = 120300; |
| LE_SCAN_RESULTS_COUNT_REGULAR = 120301; |
| LE_SCAN_RESULTS_COUNT_BATCH = 120302; |
| LE_SCAN_RESULTS_COUNT_REGULAR_SCREEN_ON = 120303; |
| LE_SCAN_RESULTS_COUNT_REGULAR_SCREEN_OFF = 120304; |
| LE_SCAN_RESULTS_COUNT_BATCH_SCREEN_ON = 120305; |
| LE_SCAN_RESULTS_COUNT_BATCH_SCREEN_OFF = 120306; |
| LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE = 120307; |
| LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE_SCREEN_ON = 120308; |
| LE_SCAN_RESULTS_COUNT_BATCH_BUNDLE_SCREEN_OFF = 120309; |
| |
| // [120,400 - 120,500) LE scan abuse count |
| LE_SCAN_ABUSE_COUNT_SCAN_TIMEOUT = 120400; |
| LE_SCAN_ABUSE_COUNT_HW_FILTER_NOT_AVAILABLE = 120401; |
| LE_SCAN_ABUSE_COUNT_TRACKING_HW_FILTER_NOT_AVAILABLE = 120402; |
| |
| // [120,500 - 121,000) LE advertise related |
| // [120,500 - 120,600) LE advertise enable/disable count |
| LE_ADV_COUNT_ENABLE = 120500; |
| LE_ADV_COUNT_DISABLE = 120501; |
| LE_ADV_COUNT_CONNECTABLE_ENABLE = 120502; |
| LE_ADV_COUNT_CONNECTABLE_DISABLE = 120503; |
| LE_ADV_COUNT_PERIODIC_ENABLE = 120504; |
| LE_ADV_COUNT_PERIODIC_DISABLE = 120505; |
| |
| // [120,600 - 120,700) LE advertise instance bucket count |
| LE_ADV_INSTANCE_COUNT_5 = 120600; |
| LE_ADV_INSTANCE_COUNT_10 = 120601; |
| LE_ADV_INSTANCE_COUNT_15 = 120602; |
| LE_ADV_INSTANCE_COUNT_15P = 120603; |
| |
| // [120,700 - 120,800) LE advertise duration bucket count |
| LE_ADV_DURATION_COUNT_TOTAL_1M = 120700; |
| LE_ADV_DURATION_COUNT_TOTAL_30M = 120701; |
| LE_ADV_DURATION_COUNT_TOTAL_1H = 120702; |
| LE_ADV_DURATION_COUNT_TOTAL_3H = 120703; |
| LE_ADV_DURATION_COUNT_TOTAL_3HP = 120704; |
| LE_ADV_DURATION_COUNT_CONNECTABLE_1M = 120705; |
| LE_ADV_DURATION_COUNT_CONNECTABLE_30M = 120706; |
| LE_ADV_DURATION_COUNT_CONNECTABLE_1H = 120707; |
| LE_ADV_DURATION_COUNT_CONNECTABLE_3H = 120708; |
| LE_ADV_DURATION_COUNT_CONNECTABLE_3HP = 120709; |
| LE_ADV_DURATION_COUNT_PERIODIC_1M = 120710; |
| LE_ADV_DURATION_COUNT_PERIODIC_30M = 120711; |
| LE_ADV_DURATION_COUNT_PERIODIC_1H = 120712; |
| LE_ADV_DURATION_COUNT_PERIODIC_3H = 120713; |
| LE_ADV_DURATION_COUNT_PERIODIC_3HP = 120714; |
| |
| // [120,800 - 120,900) LE advertise error count |
| LE_ADV_ERROR_ON_START_COUNT = 120800; |
| |
| // [120,900 - 121,000) GATT Related Count |
| GATT_CLIENT_CONNECT_IS_DIRECT = 120900; |
| GATT_CLIENT_CONNECT_IS_AUTOCONNECT = 120901; |
| GATT_CLIENT_CONNECT_IS_DIRECT_IN_FOREGROUND = 120902; |
| GATT_CLIENT_CONNECT_IS_DIRECT_NOT_IN_FOREGROUND = 120903; |
| GATT_CLIENT_CONNECT_IS_AUTOCONNECT_IN_FOREGROUND = 120904; |
| GATT_CLIENT_CONNECT_IS_AUTOCONNECT_NOT_IN_FOREGROUND = 120905; |
| GATT_SERVER_CONNECT_IS_DIRECT_IN_FOREGROUND = 120906; |
| GATT_SERVER_CONNECT_IS_DIRECT_NOT_IN_FOREGROUND = 120907; |
| GATT_SERVER_CONNECT_IS_AUTOCONNECT_IN_FOREGROUND = 120908; |
| GATT_SERVER_CONNECT_IS_AUTOCONNECT_NOT_IN_FOREGROUND = 120909; |
| |
| // [121,000 - 121,100) System state related |
| // [121,000 - 121,010) Screen on/off count |
| SCREEN_ON_EVENT = 121000; |
| SCREEN_OFF_EVENT = 121001; |
| |
| // [121,100 - 122,000) Le Audio related |
| // [121,100 - 121,200) device/group health status count |
| LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_GOOD = 121100; |
| LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD = 121101; |
| LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_DB = 121102; |
| LE_AUDIO_ALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_CSIS = 121103; |
| LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_GOOD = 121104; |
| LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD = 121105; |
| LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_DB = 121106; |
| LE_AUDIO_NONALLOWLIST_DEVICE_HEALTH_STATUS_BAD_INVALID_CSIS = 121107; |
| LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_GOOD = 121108; |
| LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_TRENDING_BAD = 121109; |
| LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD = 121110; |
| LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_CIS_FAILED = 121111; |
| LE_AUDIO_ALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_SIGNALING_FAILED = 121112; |
| LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_GOOD = 121113; |
| LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_TRENDING_BAD = 121114; |
| LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD = 121115; |
| LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_CIS_FAILED = 121116; |
| LE_AUDIO_NONALLOWLIST_GROUP_HEALTH_STATUS_BAD_ONCE_SIGNALING_FAILED = 121117; |
| } |
| |
| enum AddressTypeEnum { |
| ADDRESS_TYPE_PUBLIC = 0; |
| ADDRESS_TYPE_RANDOM = 1; |
| ADDRESS_TYPE_UNKNOWN = 0xFFFF; |
| } |
| |
| // Major Class from packages/modules/Bluetooth/framework/java/android/bluetooth/BluetoothClass.java |
| enum MajorClassEnum { |
| MAJOR_CLASS_UNCATEGORIZED = 0x1F00; |
| MAJOR_CLASS_MISC = 0x0000; |
| MAJOR_CLASS_COMPUTER = 0x0100; |
| MAJOR_CLASS_PHONE = 0x0200; |
| MAJOR_CLASS_NETWORKING = 0x0300; |
| MAJOR_CLASS_AUDIO_VIDEO = 0x0400; |
| MAJOR_CLASS_PERIPHERAL = 0x0500; |
| MAJOR_CLASS_IMAGING = 0x0600; |
| MAJOR_CLASS_WEARABLE = 0x0700; |
| MAJOR_CLASS_TOY = 0x0800; |
| MAJOR_CLASS_HEALTH = 0x0900; |
| } |
| |
| enum ProfileConnectionResult { |
| RESULT_UNKNOWN = 0; |
| RESULT_SUCCESS = 1; |
| RESULT_FAILURE = 2; |
| } |
| |
| enum ProfileConnectionReason { |
| REASON_UNKNOWN = 0; |
| REASON_SUCCESS = 1; |
| REASON_UNEXPECTED_STATE = 2; |
| REASON_NATIVE_LAYER_REJECTED = 3; |
| REASON_INCOMING_CONN_REJECTED = 4; |
| } |
| |
| // Comment added to those whose enum names do not match the actual file names. |
| enum ContentProfileFileName { |
| BLUETOOTH_FILE_NAME_UNKNOWN = 0; |
| |
| // [1, 10000] - MAP |
| BLUETOOTH_MAP_ACCOUNT_LOADER = 1; |
| BLUETOOTH_MAP_APP_OBSERVER = 2; |
| BLUETOOTH_MAP_APP_PARAMS = 3; |
| BLUETOOTH_MAP_BMESSAGE = 4; |
| BLUETOOTH_MAP_BMESSAGE_EMAIL = 5; |
| BLUETOOTH_MAP_BMESSAGE_MIME = 6; |
| BLUETOOTH_MAP_CONTENT = 7; |
| BLUETOOTH_MAP_CONTENT_OBSERVER = 8; |
| BLUETOOTH_MAP_CONVO_CONTACT_ELEMENT = 9; |
| BLUETOOTH_MAP_CONVO_LISTING = 10; |
| BLUETOOTH_MAP_CONVO_LISTING_ELEMENT = 11; |
| BLUETOOTH_MAP_FOLDER_ELEMENT = 12; |
| BLUETOOTH_MAP_MAS_INSTANCE = 13; |
| BLUETOOTH_MAP_MESSAGE_LISTING = 14; |
| BLUETOOTH_MAP_OBEX_SERVER = 15; |
| BLUETOOTH_MAP_SERVICE = 16; |
| BLUETOOTH_MAP_SMS_PDU = 17; |
| BLUETOOTH_MAP_UTILS = 18; |
| BLUETOOTH_MNS_OBEX_CLIENT = 19; |
| BLUETOOTH_SMS_MMS_CONTACTS = 20; // SmsMmsContacts.java |
| BLUETOOTH_MMS_FILE_PROVIDER = 21; // MmsFileProvider.java |
| |
| // [10001, 20000] - OPP |
| BLUETOOTH_OPP_MANAGER = 10001; |
| BLUETOOTH_OPP_TRANSFER_HISTORY = 10002; |
| BLUETOOTH_OPP_OBEX_CLIENT_SESSION = 10003; |
| BLUETOOTH_OPP_UTILITY = 10004; |
| BLUETOOTH_OPP_LAUNCHER_ACTIVITY = 10005; |
| BLUETOOTH_OPP_RECEIVER = 10006; |
| BLUETOOTH_OPP_TRANSFER = 10007; |
| BLUETOOTH_OPP_SEND_FILE_INFO = 10008; |
| BLUETOOTH_OPP_INCOMING_FILE_CONFIRM_ACTIVITY = 10009; |
| BLUETOOTH_OPP_OBEX_SERVER_SESSION = 10010; |
| BLUETOOTH_OPP_RECEIVE_FILE_INFO = 10011; |
| BLUETOOTH_OPP_TRANSFER_ACTIVITY = 10012; |
| BLUETOOTH_OPP_PROVIDER = 10013; |
| BLUETOOTH_OPP_SERVICE = 10014; |
| BLUETOOTH_OPP_CONSTANTS = 10015; // Constants.java |
| |
| // [20001, 30000] - PBAP |
| BLUETOOTH_PBAP_ACTIVITY = 20001; |
| BLUETOOTH_PBAP_AUTHENTICATOR = 20002; |
| BLUETOOTH_PBAP_CALL_LOG_COMPOSER = 20003; |
| BLUETOOTH_PBAP_CONFIG = 20004; |
| BLUETOOTH_PBAP_OBEX_SERVER = 20005; |
| BLUETOOTH_PBAP_SERVICE = 20006; |
| BLUETOOTH_PBAP_SIM_VCARD_MANAGER = 20007; |
| BLUETOOTH_PBAP_UTILS = 20008; |
| BLUETOOTH_PBAP_VCARD_MANAGER = 20009; |
| BLUETOOTH_PBAP_HANDLER_FOR_STRING_BUFFER = 20010; // HandlerForStringBuffer.java |
| BLUETOOTH_PBAP_STATE_MACHINE = 20011; // PbapStateMachine.java |
| |
| // Will be added more if needed in future. |
| } |