diff options
author | Phil Burk <philburk@google.com> | 2015-07-30 21:26:48 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-30 21:26:48 +0000 |
commit | 559a2420d396ef7a7c7bcab012bef379ad864bff (patch) | |
tree | 465bbf8c1b9d651cdacf4ffb954ee911903865ca | |
parent | 4988378cd0f1bb6cdd83f797d10fd45105672296 (diff) | |
parent | 645a0b2bfe0098fc49b873cd17d36c2bf5244dd5 (diff) | |
download | frameworks_base-559a2420d396ef7a7c7bcab012bef379ad864bff.zip frameworks_base-559a2420d396ef7a7c7bcab012bef379ad864bff.tar.gz frameworks_base-559a2420d396ef7a7c7bcab012bef379ad864bff.tar.bz2 |
Merge "MidiDevice: document that opens can return nulls" into mnc-dev
-rw-r--r-- | media/java/android/media/midi/MidiDevice.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/media/java/android/media/midi/MidiDevice.java b/media/java/android/media/midi/MidiDevice.java index 93fb6d2..e1990cd 100644 --- a/media/java/android/media/midi/MidiDevice.java +++ b/media/java/android/media/midi/MidiDevice.java @@ -113,8 +113,13 @@ public final class MidiDevice implements Closeable { /** * Called to open a {@link MidiInputPort} for the specified port number. * + * An input port can only be used by one sender at a time. + * Opening an input port will fail if another application has already opened it for use. + * A {@link MidiDeviceStatus} can be used to determine if an input port is already open. + * * @param portNumber the number of the input port to open - * @return the {@link MidiInputPort} + * @return the {@link MidiInputPort} if the open is successful, + * or null in case of failure. */ public MidiInputPort openInputPort(int portNumber) { try { @@ -133,8 +138,11 @@ public final class MidiDevice implements Closeable { /** * Called to open a {@link MidiOutputPort} for the specified port number. * + * An output port may be opened by multiple applications. + * * @param portNumber the number of the output port to open - * @return the {@link MidiOutputPort} + * @return the {@link MidiOutputPort} if the open is successful, + * or null in case of failure. */ public MidiOutputPort openOutputPort(int portNumber) { try { |