d:\Zeekr Music>adb shell dumpsys media_session
MEDIA SESSION SERVICE (dumpsys media_session)
3 sessions listeners.
Global priority session is com.android.server.telecom/HeadsetMediaButton (userId=0)
HeadsetMediaButton com.android.server.telecom/HeadsetMediaButton (userId=0)
ownerPid=1242, ownerUid=1000, userId=0
package=com.android.server.telecom
launchIntent=null
mediaButtonReceiver=null
active=false
flags=65537
rating type=0
controllers: 0
state=null
audioAttrs=AudioAttributes: usage=USAGE_VOICE_COMMUNICATION content=CONTENT_TYPE_SPEECH flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: null
queueTitle=null, size=0
User Records:
Record for full_user=0
Volume key long-press listener: null
Volume key long-press listener package:
Media key listener: null
Media key listener package:
OnMediaKeyEventDispatchedListener: added 0 listener(s)
OnMediaKeyEventSessionChangedListener: added 1 listener(s)
from com.android.bluetooth
Last MediaButtonReceiver: MBR {pi=PendingIntent{9df47d0: PendingIntentRecord{3761f92 com.aimp.player broadcastIntent}}, type=1}
Media button session is com.aimp.player/AIMP (userId=0)
Sessions Stack - have 5 sessions:
AIMP com.aimp.player/AIMP (userId=0)
ownerPid=5198, ownerUid=10125, userId=0
package=com.aimp.player
launchIntent=PendingIntent{6d323c9: PendingIntentRecord{cb0dd60 com.aimp.player startActivity}}
mediaButtonReceiver=MBR {pi=PendingIntent{9df47d0: PendingIntentRecord{3761f92 com.aimp.player broadcastIntent}}, type=1}
active=true
flags=7
rating type=1
controllers: 2
state=PlaybackState {state=3, position=0, buffered position=0, speed=1.0, updated=138834477, actions=2375167, custom actions=[Action:mName='Repeat All, mIcon=2131231018, mExtras=null, Action:mName='Previous group, mIcon=2131231017, mExtras=null, Action:mName='Add to favorites, mIcon=2131231010, mExtras=null, Action:mName='Next group, mIcon=2131231013, mExtras=null, Action:mName='Normal, mIcon=2131231022, mExtras=null], active item id=0, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: size=14, description=Stand Up For Rock 'N' Roll, Airbourne, Runnin' Wild
queueTitle=Default, size=2
foobar2000 com.foobar2000.foobar2000/foobar2000 (userId=0)
ownerPid=18242, ownerUid=10039, userId=0
package=com.foobar2000.foobar2000
launchIntent=null
mediaButtonReceiver=MBR {pi=PendingIntent{301b219: PendingIntentRecord{452a2de com.foobar2000.foobar2000 broadcastIntent}}, type=1}
active=true
flags=3
rating type=0
controllers: 1
state=PlaybackState {state=2, position=3700, buffered position=0, speed=0.0, updated=115259831, actions=895, custom actions=[], active item id=-1, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: size=6, description=Stalingrad, Accept, Stalingrad
queueTitle=null, size=0
BluetoothMediaBrowserService com.android.bluetooth/BluetoothMediaBrowserService (userId=0)
ownerPid=13574, ownerUid=1002, userId=0
package=com.android.bluetooth
launchIntent=null
mediaButtonReceiver=null
active=false
flags=3
rating type=0
controllers: 10
state=PlaybackState {state=7, position=0, buffered position=0, speed=0.0, updated=130942657, actions=0, custom actions=[], active item id=-1, error=Bluetooth audio disconnected}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: null
queueTitle=Now Playing, size=0
MediaSessionService com.arcvideo.car.video/MediaSessionService (userId=0)
ownerPid=2916, ownerUid=10082, userId=0
package=com.arcvideo.car.video
launchIntent=null
mediaButtonReceiver=MBR {pi=PendingIntent{a832cbf: PendingIntentRecord{c366f8c com.arcvideo.car.video broadcastIntent}}, type=1}
active=true
flags=3
rating type=0
controllers: 1
state=PlaybackState {state=0, position=0, buffered position=0, speed=1.0, updated=138357479, actions=0, custom actions=[], active item id=-1, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: null
queueTitle=null, size=0
foobar2000 com.foobar2000.foobar2000/foobar2000 (userId=0)
ownerPid=18242, ownerUid=10039, userId=0
package=com.foobar2000.foobar2000
launchIntent=null
mediaButtonReceiver=MBR {pi=PendingIntent{1e42b8e: PendingIntentRecord{452a2de com.foobar2000.foobar2000 broadcastIntent}}, type=1}
active=true
flags=3
rating type=0
controllers: 1
state=PlaybackState {state=2, position=4120, buffered position=0, speed=0.0, updated=138830692, actions=895, custom actions=[], active item id=-1, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=1, controlType=2, max=0, current=0
metadata: size=6, description=Stalingrad, Accept, Stalingrad
queueTitle=null, size=0
Audio playback (lastly played comes first)
uid=10125 packages=com.aimp.player
Media session config:
media_button_receiver_fgs_allowlist_duration_ms: [cur: 10000, def: 10000]
media_session_calback_fgs_allowlist_duration_ms: [cur: 10000, def: 10000]
media_session_callback_fgs_while_in_use_temp_allow_duration_ms: [cur: 10000, def: 10000]