Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43205bc1 authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Revert "Always send KEYCODE_MEDIA_PLAY_PAUSE"

Due to double debounce delays in the media framework as well as Google Play Music (to enable double-tap-to-skip feature), this introduces a delay in switching play state.

Reverting for now and will focus on synchronizing play state instead.

This reverts commit 59735197.

Bug: 64006398 
Change-Id: Ib314da388c85af5dfb66326802ab062a32c52792
Fixes: 67853947
parent 59735197
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2703,8 +2703,12 @@ public final class Avrcp {
                return KeyEvent.KEYCODE_VOLUME_DOWN;
            case BluetoothAvrcp.PASSTHROUGH_ID_MUTE:
                return KeyEvent.KEYCODE_MUTE;
            case BluetoothAvrcp.PASSTHROUGH_ID_PLAY:
                return KeyEvent.KEYCODE_MEDIA_PLAY;
            case BluetoothAvrcp.PASSTHROUGH_ID_STOP:
                return KeyEvent.KEYCODE_MEDIA_STOP;
            case BluetoothAvrcp.PASSTHROUGH_ID_PAUSE:
                return KeyEvent.KEYCODE_MEDIA_PAUSE;
            case BluetoothAvrcp.PASSTHROUGH_ID_RECORD:
                return KeyEvent.KEYCODE_MEDIA_RECORD;
            case BluetoothAvrcp.PASSTHROUGH_ID_REWIND:
@@ -2727,12 +2731,6 @@ public final class Avrcp {
                return KeyEvent.KEYCODE_F4;
            case BluetoothAvrcp.PASSTHROUGH_ID_F5:
                return KeyEvent.KEYCODE_F5;
            // Interop workaround for headphones/car kits
            // which do not properly key track of playback
            // state...
            case BluetoothAvrcp.PASSTHROUGH_ID_PLAY:
            case BluetoothAvrcp.PASSTHROUGH_ID_PAUSE:
                return KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE;
            // Fallthrough for all unknown key mappings
            case BluetoothAvrcp.PASSTHROUGH_ID_SELECT:
            case BluetoothAvrcp.PASSTHROUGH_ID_ROOT_MENU: