[Android] Add 'stop' action in playback notification

Geoffrey Métais git at videolan.org
Fri Oct 6 12:13:56 CEST 2017


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

Add 'stop' action in playback notification

And update icons

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

 .../videolan/vlc/gui/helpers/NotificationHelper.java   | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java b/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java
index 249cb651c..3befe1c81 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java
@@ -70,12 +70,13 @@ public class NotificationHelper {
                     .setCategory(NotificationCompat.CATEGORY_SERVICE)
                     .setDeleteIntent(piStop)
                     .setContentIntent(spi)
-                    .addAction(R.drawable.ic_previous_w, ctx.getString(R.string.previous), piBackward);
+                    .addAction(R.drawable.ic_widget_previous_w, ctx.getString(R.string.previous), piBackward);
             if (playing)
-                builder.addAction(R.drawable.ic_pause_w, ctx.getString(R.string.pause), piPlay);
+                builder.addAction(R.drawable.ic_widget_pause_w, ctx.getString(R.string.pause), piPlay);
             else
-                builder.addAction(R.drawable.ic_play_w, ctx.getString(R.string.play), piPlay);
-            builder.addAction(R.drawable.ic_next_w, ctx.getString(R.string.next), piForward);
+                builder.addAction(R.drawable.ic_widget_play_w, ctx.getString(R.string.play), piPlay);
+            builder.addAction(R.drawable.ic_widget_next_w, ctx.getString(R.string.next), piForward);
+            builder.addAction(R.drawable.ic_widget_close_w, ctx.getString(R.string.stop), piStop);
 
             if (AndroidDevices.showMediaStyle) {
                 builder.setStyle(new Notification.MediaStyle()
@@ -98,12 +99,13 @@ public class NotificationHelper {
                     .setCategory(NotificationCompat.CATEGORY_SERVICE)
                     .setDeleteIntent(piStop)
                     .setContentIntent(spi)
-                    .addAction(R.drawable.ic_previous_w, ctx.getString(R.string.previous), piBackward);
+                    .addAction(R.drawable.ic_widget_previous_w, ctx.getString(R.string.previous), piBackward);
             if (playing)
-                builder.addAction(R.drawable.ic_pause_w, ctx.getString(R.string.pause), piPlay);
+                builder.addAction(R.drawable.ic_widget_pause_w, ctx.getString(R.string.pause), piPlay);
             else
-                builder.addAction(R.drawable.ic_play_w, ctx.getString(R.string.play), piPlay);
-            builder.addAction(R.drawable.ic_next_w, ctx.getString(R.string.next), piForward);
+                builder.addAction(R.drawable.ic_widget_play_w, ctx.getString(R.string.play), piPlay);
+            builder.addAction(R.drawable.ic_widget_next_w, ctx.getString(R.string.next), piForward);
+            builder.addAction(R.drawable.ic_widget_close_w, ctx.getString(R.string.stop), piStop);
             if (AndroidDevices.showMediaStyle) {
                 builder.setStyle(new NotificationCompat.MediaStyle()
                         .setMediaSession(sessionToken)



More information about the Android mailing list