[Android] Fix playlist progression in popup mode

Geoffrey Métais git at videolan.org
Wed May 23 15:00:51 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 22 17:47:01 2018 +0200| [50c8e8d0058e84537267edf5cc3134404c668f09] | committer: Geoffrey Métais

Fix playlist progression in popup mode

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index 0370a68a7..8aed94425 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -582,6 +582,7 @@ class PlaybackService : MediaBrowserServiceCompat() {
 
     fun onPlaybackStopped(systemExit: Boolean) {
         if (!systemExit) hideNotification(VLCApplication.isForeground())
+        removePopup()
         if (wakeLock.isHeld) wakeLock.release()
         audioFocusHelper.changeAudioFocus(false)
         medialibrary.resumeBackgroundOperations()
@@ -707,7 +708,6 @@ class PlaybackService : MediaBrowserServiceCompat() {
     @MainThread
     @JvmOverloads
     fun stop(systemExit: Boolean = false) {
-        removePopup()
         playlistManager.stop(systemExit)
     }
 
@@ -1046,7 +1046,7 @@ class PlaybackService : MediaBrowserServiceCompat() {
 
     @MainThread
     fun removePopup() {
-        if (popupManager != null) popupManager!!.removePopup()
+        popupManager?.removePopup()
         popupManager = null
     }
 
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 1cb466609..587e81ac2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -209,9 +209,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