[Android] Playback notification: Move 'close' button

Geoffrey Métais git at videolan.org
Wed Mar 13 11:12:11 CET 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 12 15:46:03 2019 +0100| [a76ece99925d331d9cf7539aae986140a8e4b0c8] | committer: Geoffrey Métais

Playback notification: Move 'close' button

Show 'close' button for non seekable media, and move it at the end of
actions as previoulsy placed.

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

 vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java | 5 +++--
 1 file changed, 3 insertions(+), 2 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 44e51cab3..ad8a5b29d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/NotificationHelper.java
@@ -82,12 +82,13 @@ public class NotificationHelper {
                     R.drawable.ic_widget_play_w, ctx.getString(R.string.play),
                     MediaButtonReceiver.buildMediaButtonPendingIntent(ctx,
                             PlaybackStateCompat.ACTION_PLAY_PAUSE)));
-        } else builder.addAction(new NotificationCompat.Action(
-                R.drawable.ic_widget_close_w, ctx.getString(R.string.stop), piStop));
+        }
         builder.addAction(new NotificationCompat.Action(
                 R.drawable.ic_widget_next_w, ctx.getString(R.string.next),
                 MediaButtonReceiver.buildMediaButtonPendingIntent(ctx,
                         PlaybackStateCompat.ACTION_SKIP_TO_NEXT)));
+        if (!pausable) builder.addAction(new NotificationCompat.Action(
+                R.drawable.ic_widget_close_w, ctx.getString(R.string.stop), piStop));
 
         if (AndroidDevices.showMediaStyle) {
             builder.setStyle(new androidx.media.app.NotificationCompat.MediaStyle()



More information about the Android mailing list