[Android] Set content intent to popup player notification
Geoffrey Métais
git at videolan.org
Thu Nov 2 14:25:36 CET 2017
vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 2 14:24:36 2017 +0100| [16a4af0a0af534e04ab895e23e297aa34ffa06e0] | committer: Geoffrey Métais
Set content intent to popup player notification
(cherry picked from commit 1579301571ac9a094c71ee8c589c953fe96890e9)
> https://code.videolan.org/videolan/vlc-android/commit/16a4af0a0af534e04ab895e23e297aa34ffa06e0
---
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