Merge "MIDI: don't create two of the same device"

This commit is contained in:
Robert Wu
2022-02-17 22:00:33 +00:00
committed by Android (Google) Code Review

View File

@@ -768,7 +768,6 @@ public class MidiService extends IMidiManager.Stub {
synchronized (mDevicesByInfo) {
for (Device device : mDevicesByInfo.values()) {
if (device.isUidAllowed(uid)) {
deviceInfos.add(device.getDeviceInfo());
// UMP devices have protocols that are not PROTOCOL_UNKNOWN
if (transport == MidiManager.TRANSPORT_UNIVERSAL_MIDI_PACKETS) {
if (device.getDeviceInfo().getDefaultProtocol()