diff options
| author | Robert Wu <robertwu@google.com> | 2022-05-10 23:01:24 +0000 |
|---|---|---|
| committer | Robert Wu <robertwu@google.com> | 2022-05-12 22:05:34 +0000 |
| commit | 139be681854585bf24adb879111336f8ad5b4999 (patch) | |
| tree | 3c4a383227b45eef66a3b1441f7b13a3afd9b859 /core/java/android/util/SparseSetArray.java | |
| parent | 9228e50119a13c155d6048d7ee713e380ca54737 (diff) | |
USB MIDI: Don't call openLocked on device unplug
When a USB MIDI device with multiple ports is
unplugged, onDeviceStatusChanged gets called
multiple times. The first time ends up opening a
port since there are still other open ports.
The fix here is to ignore onDeviceStatusChanged()
if close() was called before.
Also changed a continue to a break since that
condition almost never gets hit.
Bug: 232142589
Bug: 231496864
Test: Midi Keyboard that opens both input and output
for both peripheral and host mode
Change-Id: I973d55371cd16803ede192081531ca5f59847a51
Diffstat (limited to 'core/java/android/util/SparseSetArray.java')
0 files changed, 0 insertions, 0 deletions
