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

Skip to content
Commit 7fe0b77c authored by Robert Wu's avatar Robert Wu
Browse files

MidiService: Fix USB removeDeviceConnection

When MIDI USB devices are removed, removeUsbMidiDeviceLocked
is not called at the correct places.

This CL moves the check as a per Device basis. Whenever
mDeviceConnections is removed per device,
removeUsbMidiDeviceLocked should be called.

Before, we were calling addUsbMidiDeviceLocked on a Device
basis and removeUsbMidiDeviceLocked on a Client basis. This
caused incorrect behavior. The consistent behavior with this
CL allows MIDI 2.0 opens to work as expected.

Bug: 231465285
Test: Tested MIDI 2.0 app with MIDI 2.0 device
Test: Tested MIDI Keyboard with virtual device
Test: Tested MIDI Keyboard with Bluetooth MIDI
Test: Tested MIDI Keyboard with USB MIDI
Change-Id: I68567fa54b1013c6dce357f77451fe11ae2140f9
parent b83ae06a
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