[Android] [PATCH] From main thread only fetch cover art from memory cache

Marc K morckx at gmail.com
Sun Nov 27 21:06:23 CET 2016


From: morckx <morckx at gmail.com>

---
 vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index c9fe9bd..dcc8c2f 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1597,7 +1597,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
     @MainThread
     public Bitmap getCover() {
         if (hasCurrentMedia()) {
-            return AudioUtil.getCover(PlaybackService.this, getCurrentMedia(), 512);
+            return AudioUtil.getCoverFromMemCache(PlaybackService.this, getCurrentMedia(), 512);
         }
         return null;
     }
@@ -1605,7 +1605,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
     @MainThread
     public Bitmap getCoverPrev() {
         if (mPrevIndex != -1)
-            return AudioUtil.getCover(PlaybackService.this, mMediaList.getMedia(mPrevIndex), 64);
+            return AudioUtil.getCoverFromMemCache(PlaybackService.this, mMediaList.getMedia(mPrevIndex), 64);
         else
             return null;
     }
@@ -1613,7 +1613,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
     @MainThread
     public Bitmap getCoverNext() {
         if (mNextIndex != -1)
-            return AudioUtil.getCover(PlaybackService.this, mMediaList.getMedia(mNextIndex), 64);
+            return AudioUtil.getCoverFromMemCache(PlaybackService.this, mMediaList.getMedia(mNextIndex), 64);
         else
             return null;
     }
-- 
2.9.3



More information about the Android mailing list