UsbMidiDevice: fix MIDI flush()

The proxy MidiReceiver in the USB device was not forwarding the flush
command to the event scheduler.

Bug: 25511696
Change-Id: I6a4759b71bc8f9ae3e20aed1238f62a2ed405e24
Signed-off-by: Phil Burk <philburk@google.com>
This commit is contained in:
Phil Burk
2016-04-05 11:25:36 -07:00
committed by Glenn Kasten
parent ea537bf5b3
commit 2f2bf4014a

View File

@@ -127,6 +127,14 @@ public final class UsbMidiDevice implements Closeable {
public void setReceiver(MidiReceiver receiver) {
mReceiver = receiver;
}
@Override
public void onFlush() throws IOException {
MidiReceiver receiver = mReceiver;
if (receiver != null) {
receiver.flush();
}
}
}
public static UsbMidiDevice create(Context context, Bundle properties, int card, int device) {