You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KEYCODE_HEADSETHOOK and double click behaviour #1493
After the flag is set, it will be checked either here or here. Unfortunately, neither cases take KEYCODE_HEADSETHOOK into account. This leads to next media not being set.
Activity
icbaker commentedon Jun 25, 2024
Thanks for reporting - it looks like
HEADSETHOOKis handled for double tap by media1: https://cs.android.com/android/platform/superproject/+/androidx-main:frameworks/support/media/media/src/main/java/android/support/v4/media/session/MediaSessionCompat.java;l=1147-1150;drc=1991cf1992f8ec2331848b8f0b6c26a433da5f54I also noticed our code seems to consider
KEYCODE_MEDIA_PLAYfor the second of a double tap (in one of the branches), but not the first:media/libraries/session/src/main/java/androidx/media3/session/MediaSessionImpl.java
Lines 1252 to 1253 in be2d68c
I've sent a change to make all 3 places handle all 3 of:
HEADSETHOOKPLAY_PAUSEPLAYTransform double-tap of `HEADSETHOOK` to skip-to-next
icbaker commentedon Jul 10, 2024
After a bit of back and forth in review, I dropped the handling of
PLAYfor consistency with what we already document. The change is linked above.Transform double-tap of `HEADSETHOOK` to skip-to-next