MediaSync: rename onReturnAudioBuffer to onAudioBufferConsumed

Bug: 19666434
Change-Id: I117d4a1ab29e5c8e02879d2321316b669c8e43ae
diff --git a/api/current.txt b/api/current.txt
index 2fec250..6884e3b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -16407,7 +16407,7 @@
 
   public static abstract class MediaSync.Callback {
     ctor public MediaSync.Callback();
-    method public abstract void onReturnAudioBuffer(android.media.MediaSync, java.nio.ByteBuffer, int);
+    method public abstract void onAudioBufferConsumed(android.media.MediaSync, java.nio.ByteBuffer, int);
   }
 
   public static abstract interface MediaSync.OnErrorListener {
diff --git a/api/system-current.txt b/api/system-current.txt
index f1156ad..137fb0a 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -17623,7 +17623,7 @@
 
   public static abstract class MediaSync.Callback {
     ctor public MediaSync.Callback();
-    method public abstract void onReturnAudioBuffer(android.media.MediaSync, java.nio.ByteBuffer, int);
+    method public abstract void onAudioBufferConsumed(android.media.MediaSync, java.nio.ByteBuffer, int);
   }
 
   public static abstract interface MediaSync.OnErrorListener {
diff --git a/media/java/android/media/MediaSync.java b/media/java/android/media/MediaSync.java
index 55c65f6..dc6760d 100644
--- a/media/java/android/media/MediaSync.java
+++ b/media/java/android/media/MediaSync.java
@@ -49,7 +49,7 @@
  * sync.setAudioTrack(audioTrack);
  * sync.setCallback(new MediaSync.Callback() {
  *     {@literal @Override}
- *     public void onReturnAudioBuffer(MediaSync sync, ByteBuffer audioBuffer, int bufferIndex) {
+ *     public void onAudioBufferConsumed(MediaSync sync, ByteBuffer audioBuffer, int bufferIndex) {
  *         ...
  *     }
  * }, null);
@@ -88,7 +88,7 @@
  * }
  *
  * // This is the callback from MediaSync.
- * onReturnAudioBuffer(MediaSync sync, ByteBuffer buffer, int bufferIndex) {
+ * onAudioBufferConsumed(MediaSync sync, ByteBuffer buffer, int bufferIndex) {
  *     // ...
  *     audioDecoder.releaseBuffer(bufferIndex, false);
  *     // ...
@@ -104,7 +104,7 @@
  * <p>
  * For audio, the client needs to set up audio track correctly, e.g., using {@link
  * AudioTrack#MODE_STREAM}. The audio buffers are sent to MediaSync directly via {@link
- * #queueAudio}, and are returned to the client via {@link Callback#onReturnAudioBuffer}
+ * #queueAudio}, and are returned to the client via {@link Callback#onAudioBufferConsumed}
  * asynchronously. The client should not modify an audio buffer till it's returned.
  * <p>
  * The client can optionally pre-fill audio/video buffers by setting playback rate to 0.0,
@@ -125,7 +125,7 @@
          * @param audioBuffer The returned audio buffer.
          * @param bufferIndex The index associated with the audio buffer
          */
-        public abstract void onReturnAudioBuffer(
+        public abstract void onAudioBufferConsumed(
                 @NonNull MediaSync sync, @NonNull ByteBuffer audioBuffer, int bufferIndex);
     }
 
@@ -682,7 +682,7 @@
                                 return;
                             }
                             if (mCallback != null) {
-                                mCallback.onReturnAudioBuffer(sync, audioBuffer.mByteBuffer,
+                                mCallback.onAudioBufferConsumed(sync, audioBuffer.mByteBuffer,
                                         audioBuffer.mBufferIndex);
                             }
                         }