Session service prevents process from terminating if swiped away from recents while the audio is playing
Open
@marcbaechinger is already working on this.
Since Apr 12, 2024.
bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 main branch
More version details
a154c98faa3290e9ca45a0e8dabd39c0d74842fc
Devices that reproduce the issue
Galaxy S22 ultra running android 14
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Modify PlaybackService's onTaskRemoved so that it will terminate even if the music is running (Simply calling pauseAllPlayersAndStopSelf() is mentioned in the documentation, so I used just that)
- Optionally add a static integer variable that gets printed and incremented at the start of the app to help with observing the bug
- Launch the app and start playing music
- Swipe the app away from recents while the music is playing
- Launch the app again
Expected result
The static integer value gets reset and prints the same value on both launches
Actual result
The static integer retains it's incremented value and prints different values
Media
Not applicable
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.