diff options
author | Mike Lockwood <lockwood@google.com> | 2015-03-24 08:27:11 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2015-04-09 11:49:51 -0700 |
commit | f0a41d1c591193fbe02c9ddbaf24c79af4da9972 (patch) | |
tree | ddb94c31f0fe87dae3c4413609a5b752c3a197d8 /services/midi | |
parent | b6f50d357bd3d4d296be6bb047f5ce93a79cbca1 (diff) | |
download | frameworks_base-f0a41d1c591193fbe02c9ddbaf24c79af4da9972.zip frameworks_base-f0a41d1c591193fbe02c9ddbaf24c79af4da9972.tar.gz frameworks_base-f0a41d1c591193fbe02c9ddbaf24c79af4da9972.tar.bz2 |
Add support for Bluetooth MIDI devices
The Bluetooth MIDI devices are handled in the BluetoothMidiService APK.
Apps wishing to connect to Bluetooth MIDI devices call MidiManager.openBluetoothDevice()
which binds to BluetoothMidiService in a similar way as virtual devices are implemented.
Change-Id: Ie3fbca757928fd7873a009f9bf9e0ce0be487da6
Diffstat (limited to 'services/midi')
-rw-r--r-- | services/midi/java/com/android/server/midi/MidiService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/midi/java/com/android/server/midi/MidiService.java b/services/midi/java/com/android/server/midi/MidiService.java index 1d2180e..c1c5c56 100644 --- a/services/midi/java/com/android/server/midi/MidiService.java +++ b/services/midi/java/com/android/server/midi/MidiService.java @@ -372,8 +372,8 @@ public class MidiService extends IMidiManager.Stub { int numOutputPorts, String[] inputPortNames, String[] outputPortNames, Bundle properties, int type) { int uid = Binder.getCallingUid(); - if (type != MidiDeviceInfo.TYPE_VIRTUAL && uid != Process.SYSTEM_UID) { - throw new SecurityException("only system can create non-virtual devices"); + if (type == MidiDeviceInfo.TYPE_USB && uid != Process.SYSTEM_UID) { + throw new SecurityException("only system can create USB devices"); } synchronized (mDevicesByInfo) { |