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

Geoffrey Métais geoffrey.metais at gmail.com
Mon Nov 28 15:27:34 CET 2016


LGTM

On Sun, Nov 27, 2016 at 9:06 PM Marc K <morckx at gmail.com> wrote:

> 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
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20161128/d92fe663/attachment.html>


More information about the Android mailing list