-
Notifications
You must be signed in to change notification settings - Fork 574
Open
Description
Version
Media3 main branch
More version details
1.6.x
1.5.x
etc
Devices that reproduce the issue
Devices with Android 11 and below
Devices that do not reproduce the issue
Devices with Android 12+
Reproducible in the demo app?
Yes
Reproduction steps
- Run demo-session project
- Play any video
- Pause video
- Open Settings -> Apps & notifications -> Media3 Session Demo
- Click "Force Stop"
- Send media session play event (for example, press the play button on the headset or invoke a command via ADB -
adb shell input keyevent 85
) - See logcat: Crash And ANR
Expected result
ANR and Crash
FATAL EXCEPTION: main
Process: androidx.media3.demo.session, PID: 16226
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{6363728 u0 androidx.media3.demo.session/.PlaybackService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
ANR in androidx.media3.demo.session
PID: 16226
Reason: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{6363728 u0 androidx.media3.demo.session/.PlaybackService}
Actual result
ANR and Сrash are absent.
Media
Any media from the demo-session project
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.