diff options
author | Brad Stenning <stenning@google.com> | 2017-08-16 11:26:11 -0700 |
---|---|---|
committer | Brad Stenning <stenning@google.com> | 2017-08-16 20:53:28 +0000 |
commit | 71ad6a95f3622a4d54c7e850dcb31b8a30d6edfd (patch) | |
tree | eb0b57614801d56c5d8ed3bb4902e3a97dd93ced | |
parent | 7f54b3b2428726ae9fbe490aa1014ea4ce8921b3 (diff) | |
download | LocalMediaPlayer-71ad6a95f3622a4d54c7e850dcb31b8a30d6edfd.tar.gz |
Internal queue was set to the same queue as the one in the data model.
This protects the queue from changes by external classes.
Bug: 62352340
Test: If using default install you can use first select the the playlist
from artist (has 154 elements) and play something from deep in the
list (greater than 25) then play from the album list (it's size is
24). It would crash immediately before this fix.
Change-Id: I64d9f392a3427ff37480469a22fd4a291ee66560
(cherry picked from commit d95a94eb57f87b30fe993365f4ee3ae0779ae535)
-rw-r--r-- | src/com/android/car/media/localmediaplayer/Player.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/car/media/localmediaplayer/Player.java b/src/com/android/car/media/localmediaplayer/Player.java index 7f1850f..6d37cac 100644 --- a/src/com/android/car/media/localmediaplayer/Player.java +++ b/src/com/android/car/media/localmediaplayer/Player.java @@ -319,7 +319,7 @@ public class Player extends MediaSession.Callback { return; } - mQueue = queue; + mQueue = new ArrayList<>(queue); mCurrentQueueIdx = foundIdx; QueueItem current = mQueue.get(mCurrentQueueIdx); String path = current.getDescription().getExtras().getString(DataModel.PATH_KEY); |