summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
authorRoboErik <epastern@google.com>2014-09-25 18:28:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-25 18:28:21 +0000
commitdf26651ff45838ab8c2927178250a44a30bac4dd (patch)
tree557b0cba0839928ea9c29097a3206f91c2a22494 /media/java
parent864a8b667a5f15f60dd0fe0628f536f1cb175756 (diff)
parent03fce072cac092923e10a6b5f09fcde333375f9e (diff)
downloadframeworks_base-df26651ff45838ab8c2927178250a44a30bac4dd.zip
frameworks_base-df26651ff45838ab8c2927178250a44a30bac4dd.tar.gz
frameworks_base-df26651ff45838ab8c2927178250a44a30bac4dd.tar.bz2
Merge "Allow null queues to be set in MediaSession" into lmp-dev
Diffstat (limited to 'media/java')
-rw-r--r--media/java/android/media/session/MediaController.java3
-rw-r--r--media/java/android/media/session/MediaSession.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java
index cfbf3af..e490c2b 100644
--- a/media/java/android/media/session/MediaController.java
+++ b/media/java/android/media/session/MediaController.java
@@ -918,7 +918,8 @@ public final class MediaController {
@Override
public void onQueueChanged(ParceledListSlice parceledQueue) {
- List<MediaSession.QueueItem> queue = parceledQueue.getList();
+ List<MediaSession.QueueItem> queue = parceledQueue == null ? null : parceledQueue
+ .getList();
MediaController controller = mController.get();
if (controller != null) {
controller.postMessage(MSG_UPDATE_QUEUE, queue, null);
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index 2c38697..ad018ad 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -427,7 +427,7 @@ public final class MediaSession {
*/
public void setQueue(@Nullable List<QueueItem> queue) {
try {
- mBinder.setQueue(new ParceledListSlice<QueueItem>(queue));
+ mBinder.setQueue(queue == null ? null : new ParceledListSlice<QueueItem>(queue));
} catch (RemoteException e) {
Log.wtf("Dead object in setQueue.", e);
}