Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
d533f129
Commit
d533f129
authored
Mar 27, 2018
by
Geoffrey Métais
Browse files
Do not filter DOWN remote input events
Close #526
parent
4471bcc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/PlaybackService.java
View file @
d533f129
...
...
@@ -115,8 +115,8 @@ public class PlaybackService extends MediaBrowserServiceCompat{
private
static
final
int
SHOW_TOAST
=
1
;
private
static
final
int
END_MEDIASESSION
=
2
;
private
static
final
int
DELAY_DOUBLE_CLICK
=
800
;
private
static
final
int
DELAY_LONG_CLICK
=
1000
;
private
static
final
long
DELAY_DOUBLE_CLICK
=
800
L
;
private
static
final
long
DELAY_LONG_CLICK
=
1000
L
;
public
interface
Callback
{
void
update
();
...
...
@@ -803,8 +803,8 @@ public class PlaybackService extends MediaBrowserServiceCompat{
}
private
final
class
MediaSessionCallback
extends
MediaSessionCompat
.
Callback
{
private
long
mHeadsetDownTime
=
0
;
private
long
mHeadsetUpTime
=
0
;
private
long
mHeadsetDownTime
=
0
L
;
private
long
mHeadsetUpTime
=
0
L
;
@Override
public
boolean
onMediaButtonEvent
(
Intent
mediaButtonEvent
)
{
...
...
@@ -817,8 +817,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
final
long
time
=
SystemClock
.
uptimeMillis
();
switch
(
event
.
getAction
())
{
case
KeyEvent
.
ACTION_DOWN
:
if
(
event
.
getRepeatCount
()
<=
0
)
mHeadsetDownTime
=
time
;
if
(
event
.
getRepeatCount
()
<=
0
)
mHeadsetDownTime
=
time
;
if
(!
hasMedia
())
{
loadLastAudioPlaylist
();
return
true
;
...
...
vlc-android/src/org/videolan/vlc/RemoteControlClientReceiver.java
View file @
d533f129
...
...
@@ -49,8 +49,7 @@ public class RemoteControlClientReceiver extends MediaButtonReceiver {
if
(
event
!=
null
&&
action
.
equalsIgnoreCase
(
Intent
.
ACTION_MEDIA_BUTTON
))
{
if
(
event
.
getKeyCode
()
!=
KeyEvent
.
KEYCODE_HEADSETHOOK
&&
event
.
getKeyCode
()
!=
KeyEvent
.
KEYCODE_MEDIA_PLAY_PAUSE
&&
event
.
getAction
()
!=
KeyEvent
.
ACTION_DOWN
)
{
event
.
getKeyCode
()
!=
KeyEvent
.
KEYCODE_MEDIA_PLAY_PAUSE
)
{
super
.
onReceive
(
context
,
intent
);
return
;
}
...
...
@@ -103,8 +102,7 @@ public class RemoteControlClientReceiver extends MediaButtonReceiver {
break
;
}
if
(
isOrderedBroadcast
())
abortBroadcast
();
if
(
isOrderedBroadcast
())
abortBroadcast
();
if
(
i
!=
null
)
{
Util
.
startService
(
context
,
i
);
return
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment