Skip to content

KEYCODE_HEADSETHOOK sent twice #3083

@ckett73

Description

@ckett73

Version

Media3 1.9.2

More version details

Since Media3 version 1.9.2, button events seem to be sent twice.
We see events like KEYCODE_HEADSETHOOK received twice by onMediaButtonEvent (MediaSession).
This leads to strange playback behaviour, because we need to evaluate the events received by onMediaButtonEvent.

Reproduce with
adb shell input keyevent 79
or some wired headset with a "hook" button.

Maybe this is related to:
#2816

Devices that reproduce the issue

Reproduced with:

  • Emulator Pixel 9a API 36
  • Samsung SM-T220

Devices that do not reproduce the issue

None

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play some media (audio) with Media3
  2. Send adb shell input keyevent 79 or press headset hook button

Expected result

Only one event per button click or keyevent send

Actual result

Events are duplicated. Received in onMediaButtonEvent

Media

Any audio media

Bug Report

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions