Skip to content
  • Sébastien Toque's avatar
    Add an option to "steal" headset remote control from other apps · 7d43022b
    Sébastien Toque authored
    On HTC phones, a double click on media button triggers a call to the last number.
    This is annoying, since we use double click on media button to switch to next song.
    
    Because RemoteControlClient event are not ordered, they can't be aborted.
    When the event reachs the RemoteControlClientReceiver, it's already too late,
    the OS (or whatever triggers a call) has also received the event and we can't do anything.
    
    A workaround is to use a receiver on ACTION_MEDIA_BUTTON with high priority
    (Integer.MAX_VALUE) instead of a regular RemoteControlClientReceiver.
    Since ACTION_MEDIA_BUTTON events are sent before any RemoteControlClient events
     and are ordered, they can be aborted.
    7d43022b