[Android] Ignore remote control shortcuts for video playback

Geoffrey Métais git at videolan.org
Fri Apr 14 17:54:22 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 14 17:46:34 2017 +0200| [6317516d96366dd9fc67f83e8c9ca499a46b70c6] | committer: Geoffrey Métais

Ignore remote control shortcuts for video playback

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 824bf56..3d02f97 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1109,7 +1109,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
         @Override
         public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
             KeyEvent event = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
-            if (event != null) {
+            if (event != null && !isVideoPlaying()) {
                 int keyCode = event.getKeyCode();
                 if (keyCode == KeyEvent.KEYCODE_MEDIA_PLAY || keyCode == KeyEvent.KEYCODE_MEDIA_PAUSE
                         || keyCode == KeyEvent.KEYCODE_HEADSETHOOK || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE) {



More information about the Android mailing list