[Android] Show mini player when a video is in background

Geoffrey Métais git at videolan.org
Tue Apr 10 09:35:58 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 10 09:35:11 2018 +0200| [9a831abafb76eef4449ba12516286207f559bbee] | committer: Geoffrey Métais

Show mini player when a video is in background

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 49cb2de8a..fccf62e45 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -624,7 +624,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
     @TargetApi(Build.VERSION_CODES.LOLLIPOP)
     public void showNotification() {
         if (!AndroidDevices.isAndroidTv && VLCApplication.showTvUi()) return;
-        if (isPlayingPopup() || !hasRenderer() && playlistManager.getPlayer().isVideoPlaying()) {
+        if (isPlayingPopup() || !hasRenderer() && isVideoPlaying()) {
             hideNotification(true);
             return;
         }
@@ -1440,6 +1440,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
         if (BuildConfig.DEBUG) Log.v(TAG, "Showing index " + index + " with playing URI " + media.getUri());
         playlistManager.setCurrentIndex(index);
         notifyTrackChanged();
+        PlaylistManager.Companion.getShowAudioPlayer().setValue(!isVideoPlaying());
         showNotification();
     }
 



More information about the Android mailing list