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
Would you be able to clarify if this is a change/regression introduced in 1.4.0 (i.e. not present in 1.3.1, and maybe caused by c64dacf), or a longstanding inconsistency where we are not handling HEADSETHOOK the same way as PLAY?
Activity
DavidEdwardsBL commentedon Aug 1, 2024
@icbaker I was going to post in the previous issue, but thought this is perhaps unique enough for a new issue.
icbaker commentedon Aug 5, 2024
Would you be able to clarify if this is a change/regression introduced in 1.4.0 (i.e. not present in 1.3.1, and maybe caused by c64dacf), or a longstanding inconsistency where we are not handling
HEADSETHOOKthe same way asPLAY?DavidEdwardsBL commentedon Aug 5, 2024
The code in question is quite old:
https://github.com/androidx/media/blame/b01c6ffcb3fca3d038476dab5d3bc9c9f2010781/libraries/session/src/main/java/androidx/media3/session/MediaButtonReceiver.java#L133
This part exists over a year, so it is not a problem introduced in 1.4.0.
The issue is here:
Whereby
KEYCODE_MEDIA_PLAYandKEYCODE_MEDIA_PLAY_PAUSEare detected, but not theKEYCODE_HEADSETHOOK.Handle `HEADSETHOOK` as 'play' in `MediaButtonReceiver.onReceive`
icbaker commentedon Aug 13, 2024
Thanks for the extra info - this should be resolved by the commit linked above.
Handle `HEADSETHOOK` as 'play' in `MediaButtonReceiver.onReceive`
Handle `HEADSETHOOK` as 'play' in `MediaButtonReceiver.onReceive`