-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): foreground issues (close #2045)
- move execution of foregrounding and backgrounding to NotificationState.POSTED in order to avoid race condition where notificationId has not been set yet - avoid comparing to player states that don’t affect foregrounding, by ignoring LOADING, BUFFERING and READY states – all of which can occur both when playing or while paused - also avoid the initial IDLE state, since we are only interested when the player would become idle (i.e. all tracks were removed) - ENDED state should also cause foregrounding to stop (without removing notification)
- Loading branch information
Showing
1 changed file
with
34 additions
and
17 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