[Android] Simplify type check for video resume point saving

Geoffrey Métais git at videolan.org
Mon Oct 30 17:55:08 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 30 17:30:56 2017 +0100| [5e2a42b9f7b91ee6d30fd4f51001b2ade77406dc] | committer: Geoffrey Métais

Simplify type check for video resume point saving

> https://code.videolan.org/videolan/vlc-android/commit/5e2a42b9f7b91ee6d30fd4f51001b2ade77406dc
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 9b9577692..0ae10a754 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -753,7 +753,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
         if (media == null || media.getId() == 0)
             return;
         final boolean canSwitchToVideo = canSwitchToVideo();
-        if (canSwitchToVideo || media.isPodcast()) {
+        if (media.getType() == MediaWrapper.TYPE_VIDEO || canSwitchToVideo || media.isPodcast()) {
             //Save progress
             final long time = getTime();
             final long length = getLength();



More information about the Android mailing list