Modify the interface of TransportMediatorJellybeanMR2 to fix build issues

Bug: 18049859
(cherry-picked from commit f10352548d22d37b794225e320b3b170a4e8694d)

Change-Id: I09977069531ecef484be7eaa2fa183a4e2654189
diff --git a/v4/jellybean-mr2/android/support/v4/media/TransportMediatorJellybeanMR2.java b/v4/jellybean-mr2/android/support/v4/media/TransportMediatorJellybeanMR2.java
index 38b6778..be3555e 100644
--- a/v4/jellybean-mr2/android/support/v4/media/TransportMediatorJellybeanMR2.java
+++ b/v4/jellybean-mr2/android/support/v4/media/TransportMediatorJellybeanMR2.java
@@ -28,9 +28,7 @@
 import android.view.View;
 import android.view.ViewTreeObserver;
 
-class TransportMediatorJellybeanMR2
-        implements RemoteControlClient.OnGetPlaybackPositionListener,
-        RemoteControlClient.OnPlaybackPositionUpdateListener {
+class TransportMediatorJellybeanMR2 {
     final Context mContext;
     final AudioManager mAudioManager;
     final View mTargetView;
@@ -75,7 +73,20 @@
             mTransportCallback.handleAudioFocusChange(focusChange);
         }
     };
-
+    final RemoteControlClient.OnGetPlaybackPositionListener mGetPlaybackPositionListener
+            = new RemoteControlClient.OnGetPlaybackPositionListener() {
+                @Override
+                public long onGetPlaybackPosition() {
+                    return mTransportCallback.getPlaybackPosition();
+                }
+            };
+    final RemoteControlClient.OnPlaybackPositionUpdateListener mPlaybackPositionUpdateListener
+            = new RemoteControlClient.OnPlaybackPositionUpdateListener() {
+                public void onPlaybackPositionUpdate(long newPositionMs) {
+                    mTransportCallback.playbackPositionUpdate(newPositionMs);
+                }
+            };
+ 
     PendingIntent mPendingIntent;
     RemoteControlClient mRemoteControl;
     boolean mFocused;
@@ -112,8 +123,8 @@
         mPendingIntent = PendingIntent.getBroadcast(mContext, 0, mIntent,
                 PendingIntent.FLAG_CANCEL_CURRENT);
         mRemoteControl = new RemoteControlClient(mPendingIntent);
-        mRemoteControl.setOnGetPlaybackPositionListener(this);
-        mRemoteControl.setPlaybackPositionUpdateListener(this);
+        mRemoteControl.setOnGetPlaybackPositionListener(mGetPlaybackPositionListener);
+        mRemoteControl.setPlaybackPositionUpdateListener(mPlaybackPositionUpdateListener);
     }
 
     void gainFocus() {
@@ -145,16 +156,6 @@
         }
     }
 
-    @Override
-    public long onGetPlaybackPosition() {
-        return mTransportCallback.getPlaybackPosition();
-    }
-
-    @Override
-    public void onPlaybackPositionUpdate(long newPositionMs) {
-        mTransportCallback.playbackPositionUpdate(newPositionMs);
-    }
-
     public void refreshState(boolean playing, long position, int transportControls) {
         if (mRemoteControl != null) {
             mRemoteControl.setPlaybackState(playing ? RemoteControlClient.PLAYSTATE_PLAYING