-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add isPlaybackOngoing and stopMediaSessionService
This API additions help an app to implement the lifecycle of a MediaSessionService properly and in consistency with the `MediaSessionService` being in the foreground or not. Not properly implementing `onTaskRemoved` is the main reason for crashes and confusion. This change provides `MediaSessionService` with a default implementation that avoids crashes of the service. This default implementation uses the new API provided with this change just as an app can do. Issue: #1219 PiperOrigin-RevId: 621874838
- Loading branch information
1 parent
f9ed303
commit 617f989
Showing
3 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters