diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-04-20 17:20:00 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-04-20 17:20:00 -0700 |
commit | 7d5c6f9abfc97f37728482091a5fbab5b822b0f7 (patch) | |
tree | 3ce54d51d437d7cda003a73ac34262df523a4bf1 | |
parent | f86d4434243f5a5526d96abafcb1615b661eabb0 (diff) | |
download | dsub-7d5c6f9abfc97f37728482091a5fbab5b822b0f7.tar.gz dsub-7d5c6f9abfc97f37728482091a5fbab5b822b0f7.tar.bz2 dsub-7d5c6f9abfc97f37728482091a5fbab5b822b0f7.zip |
Handle down events instead of up. Some hardware devices only send up events
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 8a83d881..c9f92f41 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -366,18 +366,7 @@ public class DownloadServiceLifecycleSupport { } private void handleKeyEvent(KeyEvent event) { - if(event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() > 0) { - switch (event.getKeyCode()) { - case RemoteControlClient.FLAG_KEY_MEDIA_PREVIOUS: - case KeyEvent.KEYCODE_MEDIA_PREVIOUS: - downloadService.seekTo(downloadService.getPlayerPosition() - 10000); - break; - case RemoteControlClient.FLAG_KEY_MEDIA_NEXT: - case KeyEvent.KEYCODE_MEDIA_NEXT: - downloadService.seekTo(downloadService.getPlayerPosition() + 10000); - break; - } - } else if(event.getAction() == KeyEvent.ACTION_UP) { + if(event.getAction() == KeyEvent.ACTION_DOWN) { switch (event.getKeyCode()) { case RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: |