diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-11-30 03:29:47 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-11-30 03:29:47 +0000 |
commit | eb3399e34da5a7514f2468402543cb7d5aabc362 (patch) | |
tree | b1e37c476d18ce82905519c7e961b54c7246d0a7 | |
parent | 95174f7ae80ba2448a8e57fb4f5524e7e93ca2ed (diff) | |
parent | c1956032622f486b6e67bdb13e026976a71948ea (diff) | |
download | Bluetooth-eb3399e34da5a7514f2468402543cb7d5aabc362.tar.gz |
Merge cherrypicks of [5656146, 5653357, 5656373, 5656227, 5656421, 5654207, 5654208, 5654209, 5654210, 5656164, 5656412, 5656413, 5656355, 5656356, 5656357, 5655631, 5655632, 5656165, 5656166, 5656167, 5656168, 5656376, 5656422, 5656147, 5656148, 5656149] into pi-qpr2-releaseandroid-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31
Change-Id: If394c4aef5749856311a9af1a4a6913205e8e21d
-rw-r--r-- | src/com/android/bluetooth/newavrcp/MediaPlayerWrapper.java | 11 | ||||
-rw-r--r-- | tests/unit/src/com/android/bluetooth/newavrcp/MediaPlayerWrapperTest.java | 22 |
2 files changed, 0 insertions, 33 deletions
diff --git a/src/com/android/bluetooth/newavrcp/MediaPlayerWrapper.java b/src/com/android/bluetooth/newavrcp/MediaPlayerWrapper.java index d27054d4b..256e7714b 100644 --- a/src/com/android/bluetooth/newavrcp/MediaPlayerWrapper.java +++ b/src/com/android/bluetooth/newavrcp/MediaPlayerWrapper.java @@ -53,7 +53,6 @@ class MediaPlayerWrapper { private final Object mCallbackLock = new Object(); private Callback mRegisteredCallback = null; - protected MediaPlayerWrapper() { mCurrentData = new MediaData(null, null, null); } @@ -122,16 +121,6 @@ class MediaPlayerWrapper { } Metadata getCurrentMetadata() { - // Try to use the now playing list if the information exists. - if (getActiveQueueID() != -1) { - for (Metadata data : getCurrentQueue()) { - if (data.mediaId.equals(Util.NOW_PLAYING_PREFIX + getActiveQueueID())) { - d("getCurrentMetadata: Using playlist data: " + data.toString()); - return data.clone(); - } - } - } - return Util.toMetadata(getMetadata()); } diff --git a/tests/unit/src/com/android/bluetooth/newavrcp/MediaPlayerWrapperTest.java b/tests/unit/src/com/android/bluetooth/newavrcp/MediaPlayerWrapperTest.java index cdae46b49..85ad14760 100644 --- a/tests/unit/src/com/android/bluetooth/newavrcp/MediaPlayerWrapperTest.java +++ b/tests/unit/src/com/android/bluetooth/newavrcp/MediaPlayerWrapperTest.java @@ -311,28 +311,6 @@ public class MediaPlayerWrapperTest { verify(mFailHandler, never()).onTerribleFailure(any(), any(), anyBoolean()); } - /* - * This test checks whether getCurrentMetadata() returns the corresponding item from - * the now playing list instead of the current metadata if there is a match. - */ - @Test - public void testCurrentSongFromQueue() { - // Create the wrapper object and register the looper with the timeout handler - TestLooperManager looperManager = new TestLooperManager(mThread.getLooper()); - - mTestState.setActiveQueueItemId(101); - doReturn(mTestState.build()).when(mMockController).getPlaybackState(); - - MediaPlayerWrapper wrapper = - MediaPlayerWrapper.wrap(mMockController, mThread.getLooper()); - wrapper.registerCallback(mTestCbs); - - // The current metadata doesn't contain track number info so check that - // field to see if the correct data was used. - Assert.assertEquals(wrapper.getCurrentMetadata().trackNum, "2"); - Assert.assertEquals(wrapper.getCurrentMetadata().numTracks, "3"); - } - @Test public void testNullMetadata() { // Create the wrapper object and register the looper with the timeout handler |