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

Commit a5769594 authored by Phil Burk's avatar Phil Burk
Browse files

BluetoothMidi: ignore reserved bit in header

The BLE-MIDI spec defines bit 6 as reserved.
The decoder was checking to make sure it was zero.
But that would prevent it from being used in the future.
So now it ignores the reserved bit.

Bug: 149927520
Test: atest BluetoothMidiTests
Change-Id: Ibd2054c4dbf01941da56727b49dec23dc65088c0
parent 30c2f30f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -70,7 +70,9 @@ public class BluetoothPacketDecoder extends PacketDecoder {
        }

        byte header = buffer[0];
        if ((header & 0xC0) != 0x80) {
        // Check for the header bit 7.
        // Ignore the reserved bit 6.
        if ((header & 0x80) != 0x80) {
            Log.e(TAG, "packet does not start with header");
            return;
        }