Description
Version
Media3 main branch
More version details
No response
Devices that reproduce the issue
Devices that have a headset attached to them and send KEYCODE_HEADSETHOOK
when clicking on the headsets primary button.
Concrete error device: OPPO CPH1951
.
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
- Play media
- Double click on headset primary button (usually on single button headsets it is play / pause)
On all devices, the issue can be reproduced by sending the keycode for KEYCODE_HEADSETHOOK
twice (replicating a double tap) over ADB.
We took a look at the code, and can see why there is an issue. At this stage, we are testing for PLAY_PAUSE and HEADSETHOOK. It then sets a handler to fire to detect a double tap. Once the next tap comes through, the double tap flag is set.
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.
Expected result
The system converts to a seek to next.
Actual result
The system makes a play / pause.
Media
Any
Bug Report
- You will email the zip file produced by
adb bugreport
to [email protected] after filing this issue.