Loading media/java/android/media/RemoteController.java +57 −53 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ import java.util.List; private boolean mIsRegistered = false; private PendingIntent mClientPendingIntentCurrent; private OnClientUpdateListener mOnClientUpdateListener; private OnClientAvrcpUpdateListener mOnClientAvrcpUpdateListener; private PlaybackInfo mLastPlaybackInfo; private int mArtworkWidth = -1; private int mArtworkHeight = -1; Loading Loading @@ -150,6 +151,25 @@ import java.util.List; } } /** * @hide */ public RemoteController(Context context, OnClientUpdateListener updateListener, Looper looper, OnClientAvrcpUpdateListener avrcpUpdateListener) throws IllegalArgumentException { this(context, updateListener, looper); mOnClientAvrcpUpdateListener = avrcpUpdateListener; } /** * @hide */ public interface OnClientAvrcpUpdateListener { public void onClientFolderInfoBrowsedPlayer(String stringUri); public void onClientUpdateNowPlayingEntries(long[] playList); public void onClientNowPlayingContentChange(); public void onClientPlayItemResponse(boolean success); }; /** * Interface definition for the callbacks to be invoked whenever media events, metadata Loading Loading @@ -205,27 +225,6 @@ import java.util.List; * @param metadataEditor the container of the new metadata. */ public void onClientMetadataUpdate(MetadataEditor metadataEditor); /** * @hide */ public void onClientFolderInfoBrowsedPlayer(String stringUri); /** * @hide */ public void onClientUpdateNowPlayingEntries(long[] playList); /** * @hide */ public void onClientNowPlayingContentChange(); /** * @hide */ public void onClientPlayItemResponse(boolean success); }; Loading Loading @@ -1171,67 +1170,72 @@ import java.util.List; } } /** * @hide */ public void onFolderInfoBrowsedPlayer(String stringUri) { private void onFolderInfoBrowsedPlayer(String stringUri) { Log.d(TAG, "RemoteController: onFolderInfoBrowsedPlayer"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientFolderInfoBrowsedPlayer(stringUri); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Browsed player response", e); } } /** * @hide */ public void onNowPlayingEntriesUpdate(long[] playList) { private void onNowPlayingEntriesUpdate(long[] playList) { Log.d(TAG, "RemoteController: onUpdateNowPlayingEntries"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientUpdateNowPlayingEntries(playList); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Now Playing Entries", e); } } /** * @hide */ public void onNowPlayingContentChange() { private void onNowPlayingContentChange() { Log.d(TAG, "RemoteController: onNowPlayingContentChange"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientNowPlayingContentChange(); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on Now Playing Content Change", e); } } /** * @hide */ public void onSetPlayItemResponse(boolean success) { private void onSetPlayItemResponse(boolean success) { Log.d(TAG, "RemoteController: onPlayItemResponse"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientPlayItemResponse(success); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Play Item response", e); } } //================================================== Loading packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java +0 −12 Original line number Diff line number Diff line Loading @@ -138,18 +138,6 @@ public class KeyguardTransportControlView extends FrameLayout { public void onClientMetadataUpdate(RemoteController.MetadataEditor metadataEditor) { updateMetadata(metadataEditor); } @Override public void onClientFolderInfoBrowsedPlayer(String stringUri) { } @Override public void onClientUpdateNowPlayingEntries(long[] playList) { } @Override public void onClientNowPlayingContentChange() { } @Override public void onClientPlayItemResponse(boolean success) { } }; private class UpdateSeekBarRunnable implements Runnable { Loading Loading
media/java/android/media/RemoteController.java +57 −53 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ import java.util.List; private boolean mIsRegistered = false; private PendingIntent mClientPendingIntentCurrent; private OnClientUpdateListener mOnClientUpdateListener; private OnClientAvrcpUpdateListener mOnClientAvrcpUpdateListener; private PlaybackInfo mLastPlaybackInfo; private int mArtworkWidth = -1; private int mArtworkHeight = -1; Loading Loading @@ -150,6 +151,25 @@ import java.util.List; } } /** * @hide */ public RemoteController(Context context, OnClientUpdateListener updateListener, Looper looper, OnClientAvrcpUpdateListener avrcpUpdateListener) throws IllegalArgumentException { this(context, updateListener, looper); mOnClientAvrcpUpdateListener = avrcpUpdateListener; } /** * @hide */ public interface OnClientAvrcpUpdateListener { public void onClientFolderInfoBrowsedPlayer(String stringUri); public void onClientUpdateNowPlayingEntries(long[] playList); public void onClientNowPlayingContentChange(); public void onClientPlayItemResponse(boolean success); }; /** * Interface definition for the callbacks to be invoked whenever media events, metadata Loading Loading @@ -205,27 +225,6 @@ import java.util.List; * @param metadataEditor the container of the new metadata. */ public void onClientMetadataUpdate(MetadataEditor metadataEditor); /** * @hide */ public void onClientFolderInfoBrowsedPlayer(String stringUri); /** * @hide */ public void onClientUpdateNowPlayingEntries(long[] playList); /** * @hide */ public void onClientNowPlayingContentChange(); /** * @hide */ public void onClientPlayItemResponse(boolean success); }; Loading Loading @@ -1171,67 +1170,72 @@ import java.util.List; } } /** * @hide */ public void onFolderInfoBrowsedPlayer(String stringUri) { private void onFolderInfoBrowsedPlayer(String stringUri) { Log.d(TAG, "RemoteController: onFolderInfoBrowsedPlayer"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientFolderInfoBrowsedPlayer(stringUri); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Browsed player response", e); } } /** * @hide */ public void onNowPlayingEntriesUpdate(long[] playList) { private void onNowPlayingEntriesUpdate(long[] playList) { Log.d(TAG, "RemoteController: onUpdateNowPlayingEntries"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientUpdateNowPlayingEntries(playList); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Now Playing Entries", e); } } /** * @hide */ public void onNowPlayingContentChange() { private void onNowPlayingContentChange() { Log.d(TAG, "RemoteController: onNowPlayingContentChange"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientNowPlayingContentChange(); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on Now Playing Content Change", e); } } /** * @hide */ public void onSetPlayItemResponse(boolean success) { private void onSetPlayItemResponse(boolean success) { Log.d(TAG, "RemoteController: onPlayItemResponse"); final OnClientUpdateListener l; final OnClientAvrcpUpdateListener l; synchronized(mInfoLock) { l = mOnClientUpdateListener; l = mOnClientAvrcpUpdateListener; } try { if (l != null) { l.onClientPlayItemResponse(success); } } catch (Exception e) { Log.e(TAG, "Error Updating AVRCP on receiving Play Item response", e); } } //================================================== Loading
packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java +0 −12 Original line number Diff line number Diff line Loading @@ -138,18 +138,6 @@ public class KeyguardTransportControlView extends FrameLayout { public void onClientMetadataUpdate(RemoteController.MetadataEditor metadataEditor) { updateMetadata(metadataEditor); } @Override public void onClientFolderInfoBrowsedPlayer(String stringUri) { } @Override public void onClientUpdateNowPlayingEntries(long[] playList) { } @Override public void onClientNowPlayingContentChange() { } @Override public void onClientPlayItemResponse(boolean success) { } }; private class UpdateSeekBarRunnable implements Runnable { Loading