[Android] Fix notification for popup mode

Geoffrey Métais git at videolan.org
Mon Apr 18 12:05:38 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 18 12:04:50 2016 +0200| [9fc039a075d67246335deb15e65f6c5d6da68bb7] | committer: Geoffrey Métais

Fix notification for popup mode

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

 vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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 efa996a..ce94a34 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -169,6 +169,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
         vlcVout.addCallback(mVoutCallBack);
         if (!mService.isPlaying())
             mService.playIndex(mService.getCurrentMediaPosition());
+        mService.startService(new Intent(mService, PlaybackService.class));
         showNotification();
     }
 
@@ -411,10 +412,8 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
         builder.addAction(R.drawable.ic_popup_expand_w, mService.getString(R.string.popup_expand), piExpand);
 
         Notification notification = builder.build();
-        mService.startService(new Intent(mService, PlaybackService.class));
-        NotificationManagerCompat.from(mService).notify(42, notification);
         if (!AndroidUtil.isLolliPopOrLater() || mService.isPlaying())
-            mService.startForeground(3, notification);
+            mService.startForeground(42, notification);
         else {
             NotificationManagerCompat.from(mService).notify(42, notification);
         }



More information about the Android mailing list