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

morckx git at videolan.org
Tue Nov 29 12:04:47 CET 2016


vlc-android | branch: master | morckx <morckx at gmail.com> | Sun Nov 27 21:06:23 2016 +0100| [6942c099026af6974a1ba03dccf6ecc051365725] | committer: Geoffrey Métais

>From main thread only fetch cover art from memory cache

> https://code.videolan.org/videolan/vlc-android/commit/6942c099026af6974a1ba03dccf6ecc051365725
---

 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 2e95a5d..9f6aabd 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1599,7 +1599,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;
     }
@@ -1607,7 +1607,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;
     }
@@ -1615,7 +1615,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;
     }



More information about the Android mailing list