Jump to content

Wired Headset Buttons Not Working on Locked Screen


BadUrbanKarma

Recommended Posts

Issue:  Wired headset media controls do NOT function properly when screen is locked AND dark (off).  Controls (generally) work fine when the phone screen is on (even if screen is locked).

I have attempted a wide variety of fixes, including a factory reset/flash of the phone, reinstalling Poweramp, various setting changes in Poweramp (keep notification, wakelock), allowing background app (battery optimization off), etc.

All is normal when the screen is not locked... Log below of a "pause" action followed by a "play" action when working as expected:

==================
11:04:48.413 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34307806 playerState=1
==================
11:04:48.426 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34307806 playerState=1
==================
11:04:49.036 PlayerService TOGGLE_PLAY_PAUSE
from PSMediaButtonReceiver pausePlaying
==================
11:04:51.839 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34311245 playerState=2
==================
11:04:51.859 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:04:51.870 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34311246 playerState=1

 
Things get crazy when taking the same "pause" and "play" actions once the power button is pressed to lock the screen (and turn it off).  Button press/release is the same, but the subsequent actions are not:

==================
11:06:48.336 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34427741 playerState=1
==================
11:06:48.343 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34427741 playerState=1
==================
11:06:48.502 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:48.502 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:06:48.966 PlayerService TOGGLE_PLAY_PAUSE
from PSMediaButtonReceiver resumePlaying
==================
11:06:50.996 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:50.996 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:06:51.011 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:06:54.704 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:55.775 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:55.903 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:01.297 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34440695 playerState=2
==================
11:07:01.366 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34440695 playerState=2
==================
11:07:01.441 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:01.622 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:07:04.164 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:04.164 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:07:04.173 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:07.565 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:08.621 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:08.746 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:14.606 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34454018 playerState=2
==================
11:07:14.644 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34454018 playerState=2
==================
11:07:14.767 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:14.904 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:07:17.269 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:17.269 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:07:17.280 HeadsetPlugReceiver headset event
connection BT=false am mode=0

This issue is happening on a new phone... a Moto G Power (2020) with Android 10

Version Info ======================
Build: v3-build-884-arm64-play full verified
Store: Play
Unlocker: build-302
Arch: 64
Skin: ActivityTheme_Black
Device: motorola moto g power sofia sofia sofia_retail [arm64-v8a, armeabi-v7a, armeabi]
Installer: com.android.vending (22.4.25-21 [0] [PR] 337959405)
Android: 10 motorola/sofia_retail/sofia:10/QPMS30.80-51-8/c3480:user/release-keys en_US

I don't think this is a bug particular to Poweramp.  I confirmed the same behavior occurs in Pulsar.

  • 1 month later...

Still broken...  Worse now, after an Android update because it fails regardless of screen on, off or locked.  All headset buttons are worthless now.  Since the problem persists in Safe Mode, I'm guessing the base programming is screwed up.  Probably a Moto / Android 10 issue.  Wish I knew how to fix... I love this headset, which worked perfectly on a Moto G5s Plus.

Yes, it does sound like a Moto / Android issue as you have tried all the obvious solutions already. Especially as you state it happens in other apps too. You'll need to report it to them as a bug.

Strange that other Moto users haven't reported the same though, are you using a custom ROM or any button-remapping apps?

Andre

@andrewilley

Stock rom and no button mapper. Phone is rooted, but I re-flashed and tested without root and issue persisted. 

Maybe there are not very many users of wired headsets with media control buttons? My wife has the same phone and the same issues. So, I know it is not a hardware issue particular to my phone. 

My current suspicion... Moto added "Moto Audio" app, which likely required some custom programming because it applies to wired 3.5mm outputs, but, as soon as I press a media button on the headset, the Moto Audio app recognizes the headset and shuts down. So, I think we have some strange audio path conflicts. But, this is just a layman's hypothesis. 

10 hours ago, andrewilley said:

Yes, it does sound like a Moto / Android issue as you have tried all the obvious solutions already. Especially as you state it happens in other apps too. You'll need to report it to them as a bug.

Strange that other Moto users haven't reported the same though, are you using a custom ROM or any button-remapping apps?

Andre

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...