diff options
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/session/MediaController.java | 3 | ||||
-rw-r--r-- | media/java/android/media/session/MediaSession.java | 2 |
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); } |