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
Loading
Please register or sign in to comment