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

Commit abf0adc5 authored by Jin Seok Park's avatar Jin Seok Park
Browse files

[Media ML] Sync with original implementation

Originally, a volume key long press listener would have been called
for the first ACTION_DOWN KeyEvent with repeat count equal to 0, but
the new implementation does not call it.
This CL fixes the current implementation to match the original
implementation.

Bug: 157988289
Test: manually
Change-Id: I563215fc522e952412ebbae1ddaa1a6b1b646c53
parent 6555756e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2572,6 +2572,9 @@ public class MediaSessionService extends SystemService implements Monitor {
                    }
                } else {
                    if (mKeyType == KEY_TYPE_VOLUME) {
                        if (isFirstLongPressKeyEvent(keyEvent)) {
                            dispatchVolumeKeyLongPressLocked(mTrackingFirstDownKeyEvent);
                        }
                        dispatchVolumeKeyLongPressLocked(keyEvent);
                    } else if (isFirstLongPressKeyEvent(keyEvent)
                            && isVoiceKey(keyEvent.getKeyCode())) {