diff options
| author | 2022-05-04 19:22:52 +0000 | |
|---|---|---|
| committer | 2022-05-05 00:37:49 +0000 | |
| commit | 7fe0b77c8bbd4760ee13003c39cf59f7be633850 (patch) | |
| tree | e49f3af3351dfcfb9daeaca1d574143b4c76728c /api/api.go | |
| parent | b83ae06adf6cf6ca843d494c81c6fea5bfb8114d (diff) | |
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions