From d91b8d023e1e27e6c96fa9051a39e7e15b922402 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 2 May 2015 14:02:25 -0700 Subject: Fix hardware players sending multiple ACTION_DOWN events --- .../daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index c9f92f41..64da9a13 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -366,7 +366,7 @@ public class DownloadServiceLifecycleSupport { } private void handleKeyEvent(KeyEvent event) { - if(event.getAction() == KeyEvent.ACTION_DOWN) { + if(event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) { switch (event.getKeyCode()) { case RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: -- cgit v1.2.3