[Android] Set content intent to popup player notification
Geoffrey Métais
git at videolan.org
Thu Nov 2 14:25:03 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 2 14:24:36 2017 +0100| [1579301571ac9a094c71ee8c589c953fe96890e9] | committer: Geoffrey Métais
Set content intent to popup player notification
> https://code.videolan.org/videolan/vlc-android/commit/1579301571ac9a094c71ee8c589c953fe96890e9
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 1 +
2 files 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 0ae10a754..33cba0b88 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1005,7 +1005,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
}
}
- private PendingIntent getSessionPendingIntent() {
+ public PendingIntent getSessionPendingIntent() {
if (mMediaPlayer.getVLCVout().areViewsAttached()) { //PIP
final Intent notificationIntent = new Intent(this, VideoPlayerActivity.class);
return PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
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 4a85d6214..58d9ad5d3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -291,6 +291,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
.setContentText(mService.getString(R.string.popup_playback))
.setAutoCancel(false)
.setOngoing(true)
+ .setContentIntent(mService.getSessionPendingIntent())
.setDeleteIntent(piStop);
//Switch
More information about the Android
mailing list