Loading system/binder/android/bluetooth/IBluetooth.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -146,4 +146,7 @@ interface IBluetooth void onLeServiceUp(); void onBrEdrDown(); boolean connectAllEnabledProfiles(in BluetoothDevice device); boolean disconnectAllEnabledProfiles(in BluetoothDevice device); } system/bta/av/bta_av_aact.cc +2 −0 Original line number Diff line number Diff line Loading @@ -2102,6 +2102,8 @@ void bta_av_data_path(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { uint8_t m_pt = 0x60; tAVDT_DATA_OPT_MASK opt; if (!p_scb->started) return; if (p_scb->cong) return; if (p_scb->use_rtp_header_marker_bit) { Loading system/btif/src/btif_a2dp_sink.cc +0 −1 Original line number Diff line number Diff line Loading @@ -667,7 +667,6 @@ static void btif_a2dp_sink_set_focus_state_event( LOG_INFO(LOG_TAG, "%s: state=%d", __func__, state); LockGuard lock(g_mutex); if (!btif_av_is_connected()) return; APPL_TRACE_DEBUG("%s: setting focus state to %d", __func__, state); btif_a2dp_sink_cb.rx_focus_state = state; if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_NOT_GRANTED) { Loading system/gd/Android.bp +102 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,24 @@ genrule { ], } genrule { name: "BluetoothGeneratedPackets_python3_cc", tools: [ "bluetooth_packetgen", ], cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/system/gd --out=$(genDir) $(in)", srcs: [ "hci/hci_packets.pdl", "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ], out: [ "hci/hci_packets_python3.cc", "l2cap/l2cap_packets_python3.cc", "security/smp_packets_python3.cc", ], } filegroup { name: "BluetoothFacadeProto", srcs: [ Loading Loading @@ -523,3 +541,87 @@ genrule { "l2cap/classic/cert/api.pb.cc", ], } cc_defaults { name: "bluetooth_py3_native_extension_defaults", include_dirs: [ "external/python/cpython3/Include", ], target: { android: { include_dirs: ["external/python/cpython3/android/bionic/pyconfig"], }, android_arm: { cflags: ["-DSOABI=\"cpython-38android-arm-android-bionic\""], suffix: ".cpython-38android-arm-android-bionic", }, android_arm64: { cflags: ["-DSOABI=\"cpython-38android-arm64-android-bionic\""], suffix: ".cpython-38android-arm64-android-bionic", }, android_x86: { cflags: ["-DSOABI=\"cpython-38android-x86-android-bionic\""], suffix: ".cpython-38android-x86-android-bionic", }, android_x86_64: { cflags: ["-DSOABI=\"cpython-38android-x86_64-android-bionic\""], suffix: ".cpython-38android-x86_64-android-bionic", }, // Regenerate include dirs with android_regen.sh darwin_x86_64: { include_dirs: ["external/python/cpython3/android/darwin_x86_64/pyconfig"], cflags: [ "-Wno-deprecated-declarations", "-Wno-pointer-arith", "-DSOABI=\"cpython-38android-x86_64-darwin\"", ], suffix: ".cpython-38android-x86_64-darwin", }, linux_bionic: { // NB linux_bionic is a 'host' architecture but it uses the bionic libc like 'android' // targets so use the android pyconfig. include_dirs: ["external/python/cpython3/android/bionic/pyconfig"], cflags: ["-DSOABI=\"cpython-38android-x86_64-linux-bionic\""], suffix: ".cpython-38android-x86_64-linux-bionic", }, linux_glibc_x86: { enabled: false, }, linux_glibc_x86_64: { include_dirs: ["external/python/cpython3/android/linux_x86_64/pyconfig"], cflags: ["-DSOABI=\"cpython-38android-x86_64-linux-gnu\""], suffix: ".cpython-38android-x86_64-linux-gnu", }, windows: { enabled: false, }, }, allow_undefined_symbols: true, } cc_library{ name: "bluetooth_packets_python3", defaults: [ "gd_defaults", "bluetooth_py3_native_extension_defaults" ], host_supported: true, srcs: [ "packet/python3_module.cc", "l2cap/fcs.cc", ":BluetoothPacketSources", ], generated_headers: [ "BluetoothGeneratedPackets_h", ], generated_sources: [ "BluetoothGeneratedPackets_python3_cc", ], header_libs: [ "pybind11_headers", ], cflags: [ "-fexceptions", ], rtti: true, } system/gd/hci/hci_packets.pdl +25 −0 Original line number Diff line number Diff line Loading @@ -1562,6 +1562,10 @@ packet WriteVoiceSetting : CommandPacket (op_code = WRITE_VOICE_SETTING) { _payload_, // placeholder (unimplemented) } packet WriteVoiceSettingComplete : CommandComplete (command_op_code = WRITE_VOICE_SETTING) { status : ErrorCode, } packet ReadAutomaticFlushTimeout : ConnectionManagementCommand (op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) { connection_handle : 12, _reserved_ : 4, Loading Loading @@ -2363,6 +2367,9 @@ packet LeCreateConnectionStatus : CommandStatus (command_op_code = LE_CREATE_CON packet LeCreateConnectionCancel : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION_CANCEL) { } packet LeCreateConnectionCancelStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION_CANCEL) { } packet LeCreateConnectionCancelComplete : CommandComplete (command_op_code = LE_CREATE_CONNECTION_CANCEL) { status : ErrorCode, } Loading Loading @@ -2451,6 +2458,9 @@ packet LeStartEncryption : LeSecurityCommand (op_code = LE_START_ENCRYPTION) { ltk: 8[16], } packet LeStartEncryptionStatus : CommandStatus (command_op_code = LE_START_ENCRYPTION) { } packet LeLongTermKeyRequestReply : LeSecurityCommand (op_code = LE_LONG_TERM_KEY_REQUEST_REPLY) { connection_handle: 16, long_term_key: 8[16], Loading Loading @@ -2513,14 +2523,26 @@ packet LeAddDeviceToResolvingList : LeSecurityCommand (op_code = LE_ADD_DEVICE_T _payload_, // placeholder (unimplemented) } packet LeAddDeviceToResolvingListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) { status : ErrorCode, } packet LeRemoveDeviceFromResolvingList : LeSecurityCommand (op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { _payload_, // placeholder (unimplemented) } packet LeRemoveDeviceFromResolvingListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { status : ErrorCode, } packet LeClearResolvingList : LeSecurityCommand (op_code = LE_CLEAR_RESOLVING_LIST) { _payload_, // placeholder (unimplemented) } packet LeClearResolvingListComplete : CommandComplete (command_op_code = LE_CLEAR_RESOLVING_LIST) { status : ErrorCode, } packet LeReadResolvingListSize : LeSecurityCommand (op_code = LE_READ_RESOLVING_LIST_SIZE) { _payload_, // placeholder (unimplemented) } Loading Loading @@ -2710,6 +2732,9 @@ packet LeSetPrivacyMode : LeSecurityCommand (op_code = LE_SET_PRIVACY_MODE) { _payload_, // placeholder (unimplemented) } packet LeSetPrivacyModeComplete : CommandComplete (command_op_code = LE_SET_PRIVACY_MODE) { status : ErrorCode, } // VENDOR_SPECIFIC packet LeGetVendorCapabilities : VendorCommand (op_code = LE_GET_VENDOR_CAPABILITIES) { Loading Loading
system/binder/android/bluetooth/IBluetooth.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -146,4 +146,7 @@ interface IBluetooth void onLeServiceUp(); void onBrEdrDown(); boolean connectAllEnabledProfiles(in BluetoothDevice device); boolean disconnectAllEnabledProfiles(in BluetoothDevice device); }
system/bta/av/bta_av_aact.cc +2 −0 Original line number Diff line number Diff line Loading @@ -2102,6 +2102,8 @@ void bta_av_data_path(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { uint8_t m_pt = 0x60; tAVDT_DATA_OPT_MASK opt; if (!p_scb->started) return; if (p_scb->cong) return; if (p_scb->use_rtp_header_marker_bit) { Loading
system/btif/src/btif_a2dp_sink.cc +0 −1 Original line number Diff line number Diff line Loading @@ -667,7 +667,6 @@ static void btif_a2dp_sink_set_focus_state_event( LOG_INFO(LOG_TAG, "%s: state=%d", __func__, state); LockGuard lock(g_mutex); if (!btif_av_is_connected()) return; APPL_TRACE_DEBUG("%s: setting focus state to %d", __func__, state); btif_a2dp_sink_cb.rx_focus_state = state; if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_NOT_GRANTED) { Loading
system/gd/Android.bp +102 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,24 @@ genrule { ], } genrule { name: "BluetoothGeneratedPackets_python3_cc", tools: [ "bluetooth_packetgen", ], cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/system/gd --out=$(genDir) $(in)", srcs: [ "hci/hci_packets.pdl", "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ], out: [ "hci/hci_packets_python3.cc", "l2cap/l2cap_packets_python3.cc", "security/smp_packets_python3.cc", ], } filegroup { name: "BluetoothFacadeProto", srcs: [ Loading Loading @@ -523,3 +541,87 @@ genrule { "l2cap/classic/cert/api.pb.cc", ], } cc_defaults { name: "bluetooth_py3_native_extension_defaults", include_dirs: [ "external/python/cpython3/Include", ], target: { android: { include_dirs: ["external/python/cpython3/android/bionic/pyconfig"], }, android_arm: { cflags: ["-DSOABI=\"cpython-38android-arm-android-bionic\""], suffix: ".cpython-38android-arm-android-bionic", }, android_arm64: { cflags: ["-DSOABI=\"cpython-38android-arm64-android-bionic\""], suffix: ".cpython-38android-arm64-android-bionic", }, android_x86: { cflags: ["-DSOABI=\"cpython-38android-x86-android-bionic\""], suffix: ".cpython-38android-x86-android-bionic", }, android_x86_64: { cflags: ["-DSOABI=\"cpython-38android-x86_64-android-bionic\""], suffix: ".cpython-38android-x86_64-android-bionic", }, // Regenerate include dirs with android_regen.sh darwin_x86_64: { include_dirs: ["external/python/cpython3/android/darwin_x86_64/pyconfig"], cflags: [ "-Wno-deprecated-declarations", "-Wno-pointer-arith", "-DSOABI=\"cpython-38android-x86_64-darwin\"", ], suffix: ".cpython-38android-x86_64-darwin", }, linux_bionic: { // NB linux_bionic is a 'host' architecture but it uses the bionic libc like 'android' // targets so use the android pyconfig. include_dirs: ["external/python/cpython3/android/bionic/pyconfig"], cflags: ["-DSOABI=\"cpython-38android-x86_64-linux-bionic\""], suffix: ".cpython-38android-x86_64-linux-bionic", }, linux_glibc_x86: { enabled: false, }, linux_glibc_x86_64: { include_dirs: ["external/python/cpython3/android/linux_x86_64/pyconfig"], cflags: ["-DSOABI=\"cpython-38android-x86_64-linux-gnu\""], suffix: ".cpython-38android-x86_64-linux-gnu", }, windows: { enabled: false, }, }, allow_undefined_symbols: true, } cc_library{ name: "bluetooth_packets_python3", defaults: [ "gd_defaults", "bluetooth_py3_native_extension_defaults" ], host_supported: true, srcs: [ "packet/python3_module.cc", "l2cap/fcs.cc", ":BluetoothPacketSources", ], generated_headers: [ "BluetoothGeneratedPackets_h", ], generated_sources: [ "BluetoothGeneratedPackets_python3_cc", ], header_libs: [ "pybind11_headers", ], cflags: [ "-fexceptions", ], rtti: true, }
system/gd/hci/hci_packets.pdl +25 −0 Original line number Diff line number Diff line Loading @@ -1562,6 +1562,10 @@ packet WriteVoiceSetting : CommandPacket (op_code = WRITE_VOICE_SETTING) { _payload_, // placeholder (unimplemented) } packet WriteVoiceSettingComplete : CommandComplete (command_op_code = WRITE_VOICE_SETTING) { status : ErrorCode, } packet ReadAutomaticFlushTimeout : ConnectionManagementCommand (op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) { connection_handle : 12, _reserved_ : 4, Loading Loading @@ -2363,6 +2367,9 @@ packet LeCreateConnectionStatus : CommandStatus (command_op_code = LE_CREATE_CON packet LeCreateConnectionCancel : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION_CANCEL) { } packet LeCreateConnectionCancelStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION_CANCEL) { } packet LeCreateConnectionCancelComplete : CommandComplete (command_op_code = LE_CREATE_CONNECTION_CANCEL) { status : ErrorCode, } Loading Loading @@ -2451,6 +2458,9 @@ packet LeStartEncryption : LeSecurityCommand (op_code = LE_START_ENCRYPTION) { ltk: 8[16], } packet LeStartEncryptionStatus : CommandStatus (command_op_code = LE_START_ENCRYPTION) { } packet LeLongTermKeyRequestReply : LeSecurityCommand (op_code = LE_LONG_TERM_KEY_REQUEST_REPLY) { connection_handle: 16, long_term_key: 8[16], Loading Loading @@ -2513,14 +2523,26 @@ packet LeAddDeviceToResolvingList : LeSecurityCommand (op_code = LE_ADD_DEVICE_T _payload_, // placeholder (unimplemented) } packet LeAddDeviceToResolvingListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) { status : ErrorCode, } packet LeRemoveDeviceFromResolvingList : LeSecurityCommand (op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { _payload_, // placeholder (unimplemented) } packet LeRemoveDeviceFromResolvingListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { status : ErrorCode, } packet LeClearResolvingList : LeSecurityCommand (op_code = LE_CLEAR_RESOLVING_LIST) { _payload_, // placeholder (unimplemented) } packet LeClearResolvingListComplete : CommandComplete (command_op_code = LE_CLEAR_RESOLVING_LIST) { status : ErrorCode, } packet LeReadResolvingListSize : LeSecurityCommand (op_code = LE_READ_RESOLVING_LIST_SIZE) { _payload_, // placeholder (unimplemented) } Loading Loading @@ -2710,6 +2732,9 @@ packet LeSetPrivacyMode : LeSecurityCommand (op_code = LE_SET_PRIVACY_MODE) { _payload_, // placeholder (unimplemented) } packet LeSetPrivacyModeComplete : CommandComplete (command_op_code = LE_SET_PRIVACY_MODE) { status : ErrorCode, } // VENDOR_SPECIFIC packet LeGetVendorCapabilities : VendorCommand (op_code = LE_GET_VENDOR_CAPABILITIES) { Loading