[Android] Immediately set playbackservice foreground on Oreo

Geoffrey Métais git at videolan.org
Fri Oct 6 10:14:24 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct  6 10:13:33 2017 +0200| [a9390335a8b3788905d21d57e958d26e8d982eea] | committer: Geoffrey Métais

Immediately set playbackservice foreground on Oreo

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 093100425..b922cb7cd 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -323,6 +323,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
 
     @Override
     public int onStartCommand(Intent intent, int flags, int startId) {
+        if (AndroidUtil.isOOrLater)
+            showNotification();
         if (intent == null)
             return START_STICKY;
         final String action = intent.getAction();



More information about the Android mailing list