Loading system/binder/android/bluetooth/IBluetoothLeAudio.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -51,6 +51,9 @@ interface IBluetoothLeAudio { const int GROUP_STATUS_INACTIVE = 0; const int GROUP_STATUS_INACTIVE = 0; const int GROUP_STATUS_ACTIVE = 1; const int GROUP_STATUS_ACTIVE = 1; const int GROUP_NODE_ADDED = 1; const int GROUP_NODE_REMOVED = 2; /** /** * Get device group id. Devices with same group id belong to same group (i.e left and right * Get device group id. Devices with same group id belong to same group (i.e left and right * earbud) * earbud) Loading system/btif/src/btif_le_audio.cc +8 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ using base::Bind; using base::Bind; using base::Unretained; using base::Unretained; using bluetooth::le_audio::ConnectionState; using bluetooth::le_audio::ConnectionState; using bluetooth::le_audio::GroupNodeStatus; using bluetooth::le_audio::GroupStatus; using bluetooth::le_audio::GroupStatus; using bluetooth::le_audio::LeAudioClientCallbacks; using bluetooth::le_audio::LeAudioClientCallbacks; using bluetooth::le_audio::LeAudioClientInterface; using bluetooth::le_audio::LeAudioClientInterface; Loading @@ -53,6 +53,13 @@ class LeAudioClientInterfaceImpl : public LeAudioClientInterface, Unretained(callbacks), group_id, group_status)); Unretained(callbacks), group_id, group_status)); } } void OnGroupNodeStatus(const RawAddress& addr, int group_id, GroupNodeStatus node_status) override { do_in_jni_thread(FROM_HERE, Bind(&LeAudioClientCallbacks::OnGroupNodeStatus, Unretained(callbacks), addr, group_id, node_status)); } void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, uint32_t src_audio_location, uint16_t avail_cont) override { uint32_t src_audio_location, uint16_t avail_cont) override { do_in_jni_thread(FROM_HERE, do_in_jni_thread(FROM_HERE, Loading system/include/hardware/bt_le_audio.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,11 @@ enum class GroupStreamStatus { DESTROYED, DESTROYED, }; }; enum class GroupNodeStatus { ADDED = 1, REMOVED, }; class LeAudioClientCallbacks { class LeAudioClientCallbacks { public: public: virtual ~LeAudioClientCallbacks() = default; virtual ~LeAudioClientCallbacks() = default; Loading @@ -56,6 +61,9 @@ class LeAudioClientCallbacks { /* Callback with group status update */ /* Callback with group status update */ virtual void OnGroupStatus(int group_id, GroupStatus group_status) = 0; virtual void OnGroupStatus(int group_id, GroupStatus group_status) = 0; /* Callback with node status update */ virtual void OnGroupNodeStatus(const RawAddress& bd_addr, int group_id, GroupNodeStatus node_status) = 0; /* Callback for newly recognized or reconfigured existing le audio group */ /* Callback for newly recognized or reconfigured existing le audio group */ virtual void OnAudioConf(uint8_t direction, int group_id, virtual void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, uint32_t snk_audio_location, Loading Loading
system/binder/android/bluetooth/IBluetoothLeAudio.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -51,6 +51,9 @@ interface IBluetoothLeAudio { const int GROUP_STATUS_INACTIVE = 0; const int GROUP_STATUS_INACTIVE = 0; const int GROUP_STATUS_ACTIVE = 1; const int GROUP_STATUS_ACTIVE = 1; const int GROUP_NODE_ADDED = 1; const int GROUP_NODE_REMOVED = 2; /** /** * Get device group id. Devices with same group id belong to same group (i.e left and right * Get device group id. Devices with same group id belong to same group (i.e left and right * earbud) * earbud) Loading
system/btif/src/btif_le_audio.cc +8 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ using base::Bind; using base::Bind; using base::Unretained; using base::Unretained; using bluetooth::le_audio::ConnectionState; using bluetooth::le_audio::ConnectionState; using bluetooth::le_audio::GroupNodeStatus; using bluetooth::le_audio::GroupStatus; using bluetooth::le_audio::GroupStatus; using bluetooth::le_audio::LeAudioClientCallbacks; using bluetooth::le_audio::LeAudioClientCallbacks; using bluetooth::le_audio::LeAudioClientInterface; using bluetooth::le_audio::LeAudioClientInterface; Loading @@ -53,6 +53,13 @@ class LeAudioClientInterfaceImpl : public LeAudioClientInterface, Unretained(callbacks), group_id, group_status)); Unretained(callbacks), group_id, group_status)); } } void OnGroupNodeStatus(const RawAddress& addr, int group_id, GroupNodeStatus node_status) override { do_in_jni_thread(FROM_HERE, Bind(&LeAudioClientCallbacks::OnGroupNodeStatus, Unretained(callbacks), addr, group_id, node_status)); } void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, uint32_t src_audio_location, uint16_t avail_cont) override { uint32_t src_audio_location, uint16_t avail_cont) override { do_in_jni_thread(FROM_HERE, do_in_jni_thread(FROM_HERE, Loading
system/include/hardware/bt_le_audio.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,11 @@ enum class GroupStreamStatus { DESTROYED, DESTROYED, }; }; enum class GroupNodeStatus { ADDED = 1, REMOVED, }; class LeAudioClientCallbacks { class LeAudioClientCallbacks { public: public: virtual ~LeAudioClientCallbacks() = default; virtual ~LeAudioClientCallbacks() = default; Loading @@ -56,6 +61,9 @@ class LeAudioClientCallbacks { /* Callback with group status update */ /* Callback with group status update */ virtual void OnGroupStatus(int group_id, GroupStatus group_status) = 0; virtual void OnGroupStatus(int group_id, GroupStatus group_status) = 0; /* Callback with node status update */ virtual void OnGroupNodeStatus(const RawAddress& bd_addr, int group_id, GroupNodeStatus node_status) = 0; /* Callback for newly recognized or reconfigured existing le audio group */ /* Callback for newly recognized or reconfigured existing le audio group */ virtual void OnAudioConf(uint8_t direction, int group_id, virtual void OnAudioConf(uint8_t direction, int group_id, uint32_t snk_audio_location, uint32_t snk_audio_location, Loading