[Android] Force hide notification on playback end

Geoffrey Métais git at videolan.org
Tue Aug 29 12:15:21 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Aug 28 16:58:17 2017 +0200| [27625eac6158bbee9a68d1337e101a4ab8592bd8] | committer: Geoffrey Métais

Force hide notification on playback end

And clear widgets

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 32c11f613..a637723ea 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -619,6 +619,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                     break;
                 case MediaPlayer.Event.Stopped:
                     Log.i(TAG, "MediaPlayer.Event.Stopped");
+                    hideNotification();
                     saveMediaMeta();
                     executeUpdate();
                     publishState();
@@ -637,6 +638,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                     } else {
                         if (mWakeLock.isHeld())
                             mWakeLock.release();
+                        mCurrentIndex = -1;
+                        hideNotification();
                         changeAudioFocus(false);
                         executeUpdate();
                         publishState();



More information about the Android mailing list