Loading core/java/android/midi/MidiDeviceServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -254,12 +254,12 @@ public final class MidiDeviceServer implements Closeable { return new MidiReceiver() { @Override public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { ArrayList<MidiInputPort> receivers = mOutputPortReceivers[portNumberF]; synchronized (receivers) { for (int i = 0; i < receivers.size(); i++) { // FIXME catch errors and remove dead ones receivers.get(i).onPost(msg, offset, count, timestamp); receivers.get(i).post(msg, offset, count, timestamp); } } } Loading core/java/android/midi/MidiInputPort.java +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public class MidiInputPort extends MidiPort implements MidiReceiver { * @param timestamp future time to post the message (based on * {@link java.lang.System#nanoTime} */ public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { assert(offset >= 0 && count >= 0 && offset + count <= msg.length); synchronized (mBuffer) { Loading core/java/android/midi/MidiManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -66,22 +66,24 @@ public class MidiManager { } /** * Callback interface used for clients to receive MIDI device added and removed notifications * Callback class used for clients to receive MIDI device added and removed notifications */ public interface DeviceCallback { public static class DeviceCallback { /** * Called to notify when a new MIDI device has been added * * @param device a {@link MidiDeviceInfo} for the newly added device */ void onDeviceAdded(MidiDeviceInfo device); void onDeviceAdded(MidiDeviceInfo device) { } /** * Called to notify when a MIDI device has been removed * * @param device a {@link MidiDeviceInfo} for the removed device */ void onDeviceRemoved(MidiDeviceInfo device); void onDeviceRemoved(MidiDeviceInfo device) { } } /** Loading core/java/android/midi/MidiOutputPort.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class MidiOutputPort extends MidiPort implements MidiSender { for (int i = 0; i < mReceivers.size(); i++) { MidiReceiver receiver = mReceivers.get(i); try { receiver.onPost(buffer, offset, size, timestamp); receiver.post(buffer, offset, size, timestamp); } catch (IOException e) { Log.e(TAG, "post failed"); deadReceivers.add(receiver); Loading core/java/android/midi/MidiReceiver.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public interface MidiReceiver { * The msg bytes should be copied by the receiver rather than retaining a reference * to this parameter. * Also, modifying the contents of the msg array parameter may result in other receivers * in the same application receiving incorrect values in their onPost() method. * in the same application receiving incorrect values in their post() method. * * @param msg a byte array containing the MIDI data * @param offset the offset of the first byte of the data in the byte array Loading @@ -40,5 +40,5 @@ public interface MidiReceiver { * @param timestamp the timestamp of the message (based on {@link java.lang.System#nanoTime} * @throws IOException */ public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException; public void post(byte[] msg, int offset, int count, long timestamp) throws IOException; } Loading
core/java/android/midi/MidiDeviceServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -254,12 +254,12 @@ public final class MidiDeviceServer implements Closeable { return new MidiReceiver() { @Override public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { ArrayList<MidiInputPort> receivers = mOutputPortReceivers[portNumberF]; synchronized (receivers) { for (int i = 0; i < receivers.size(); i++) { // FIXME catch errors and remove dead ones receivers.get(i).onPost(msg, offset, count, timestamp); receivers.get(i).post(msg, offset, count, timestamp); } } } Loading
core/java/android/midi/MidiInputPort.java +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public class MidiInputPort extends MidiPort implements MidiReceiver { * @param timestamp future time to post the message (based on * {@link java.lang.System#nanoTime} */ public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { assert(offset >= 0 && count >= 0 && offset + count <= msg.length); synchronized (mBuffer) { Loading
core/java/android/midi/MidiManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -66,22 +66,24 @@ public class MidiManager { } /** * Callback interface used for clients to receive MIDI device added and removed notifications * Callback class used for clients to receive MIDI device added and removed notifications */ public interface DeviceCallback { public static class DeviceCallback { /** * Called to notify when a new MIDI device has been added * * @param device a {@link MidiDeviceInfo} for the newly added device */ void onDeviceAdded(MidiDeviceInfo device); void onDeviceAdded(MidiDeviceInfo device) { } /** * Called to notify when a MIDI device has been removed * * @param device a {@link MidiDeviceInfo} for the removed device */ void onDeviceRemoved(MidiDeviceInfo device); void onDeviceRemoved(MidiDeviceInfo device) { } } /** Loading
core/java/android/midi/MidiOutputPort.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class MidiOutputPort extends MidiPort implements MidiSender { for (int i = 0; i < mReceivers.size(); i++) { MidiReceiver receiver = mReceivers.get(i); try { receiver.onPost(buffer, offset, size, timestamp); receiver.post(buffer, offset, size, timestamp); } catch (IOException e) { Log.e(TAG, "post failed"); deadReceivers.add(receiver); Loading
core/java/android/midi/MidiReceiver.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public interface MidiReceiver { * The msg bytes should be copied by the receiver rather than retaining a reference * to this parameter. * Also, modifying the contents of the msg array parameter may result in other receivers * in the same application receiving incorrect values in their onPost() method. * in the same application receiving incorrect values in their post() method. * * @param msg a byte array containing the MIDI data * @param offset the offset of the first byte of the data in the byte array Loading @@ -40,5 +40,5 @@ public interface MidiReceiver { * @param timestamp the timestamp of the message (based on {@link java.lang.System#nanoTime} * @throws IOException */ public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException; public void post(byte[] msg, int offset, int count, long timestamp) throws IOException; }