[Android] Fix playlist progression in popup mode

Geoffrey Métais git at videolan.org
Tue May 22 10:05:55 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 22 10:05:24 2018 +0200| [a3876afe40c1283e5d80185da25368f5857c8b0c] | committer: Geoffrey Métais

Fix playlist progression in popup mode

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java        | 2 +-
 vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 327a28311..624b0bb52 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -571,6 +571,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
 
     public void onPlaybackStopped() {
         hideNotification();
+        removePopup();
         if (mWakeLock.isHeld()) mWakeLock.release();
         changeAudioFocus(false);
         mMedialibrary.resumeBackgroundOperations();
@@ -777,7 +778,6 @@ public class PlaybackService extends MediaBrowserServiceCompat{
 
     @MainThread
     public void stop(boolean systemExit) {
-        removePopup();
         playlistManager.stop(systemExit);
     }
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index dca7ecc1d..9d729f9fa 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -78,8 +78,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
 
     public void removePopup() {
         hideNotification();
-        if (mRootView == null)
-            return;
+        if (mRootView == null) return;
         mService.removeCallback(this);
         final IVLCVout vlcVout = mService.getVLCVout();
         vlcVout.detachViews();
@@ -213,9 +212,6 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
     @Override
     public void onMediaPlayerEvent(MediaPlayer.Event event) {
         switch (event.type) {
-            case MediaPlayer.Event.Stopped:
-                removePopup();
-                break;
             case MediaPlayer.Event.Playing:
                 if (!mAlwaysOn)
                     mRootView.setKeepScreenOn(true);



More information about the Android mailing list