OSDN Git Service

Eleven: remove an unnecessary check when playing music to improve perf
authorLinus Lee <llee@cyngn.com>
Sat, 18 Apr 2015 00:59:24 +0000 (17:59 -0700)
committerLinus Lee <llee@cyngn.com>
Fri, 29 May 2015 22:02:24 +0000 (22:02 +0000)
Change-Id: Ic9b6d1ee2f80446013dd0794696e8cd66a73221e
(cherry picked from commit bda812eec5dd254ff5ab32773dc6aa24f3171b60)

src/com/cyanogenmod/eleven/utils/MusicUtils.java

index 53aa949..6279a78 100644 (file)
@@ -871,15 +871,6 @@ public final class MusicUtils {
             if (forceShuffle) {
                 mService.setShuffleMode(MusicPlaybackService.SHUFFLE_NORMAL);
             }
-            final long currentId = mService.getAudioId();
-            final int currentQueuePosition = getQueuePosition();
-            if (position != -1 && currentQueuePosition == position && currentId == list[position]) {
-                final long[] playlist = getQueue();
-                if (Arrays.equals(list, playlist)) {
-                    mService.play();
-                    return;
-                }
-            }
             if (position < 0) {
                 position = 0;
             }