Skip to content
Commit 98003d36 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

Send long-press of KEYCODE_HEADSETHOOK to the media key listener

For the key events with the code KEYCODE_HEADSETHOOK, the
MediaSessionService always starts the voice input for long-presses
regardless of the media key listener, and only short-presses can be sent
to the media key listener.

This CL sends all media key events to the media key listener first
if the listener is set. If the key event isn't consumed, short-presses
will be sent to the media session and long-presses will start the voice
input.

Bug: 35348856
Test: Manual test (Install the OnMediaKeyListener test app and confirm
that the app can consume the media key long-press)
Change-Id: I82f8e5f355efe16867e6f4345c46470c690e1f80
parent 34a6663d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment