Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 90d53f23 authored by Robert Wu's avatar Robert Wu
Browse files

Accumulate Bluetooth MIDI packets until ready

Bluetooth MIDI uses a packet encoder to encode and send packets.
When a caller calls send too quickly, the Bluetooth characteristic
is not ready and BluetoothPacketEncoder waits for a packet that
never arrives.

With this change, if the sender sends a couple packets before the
connection is ready, they will be added to a queue. Once the
Bluetooth characteristic is avaliable, this queue will be sent
with the next packet. This way, we can remove this infinite loop.

Bug: 64598842
Test: Added code to Phil's MidiBtlePairing app to send data to a
bluetooth MIDI device repeatedly after pairing. Verified that packets
don't get sent correctly before the change and that packets do get
sent correctly with this change.

Change-Id: Ib261d871752e83a2150980cd50acb56ee318b034
parent 3688b228
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment