-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release AnalyticsListeners after calling SimpleExoPlayer.release
Currently we don't remove the AnalyticsListeners registed to SimpleExoPlayer after calling release. We didn't do this mainly because there are messages triggered as part of the release that still cause interesting events (e.g. decoderDisabled with the final counters, final dropped counts etc). However, we should fully release/remove the listeners once these pending events are delivered to: 1. Not leak listener implementations (e.g. if the listener is an Activity) 2. Ensure we don't send future events that may cause listeners to unintentionally access released or nulled variables. This could happen for example if someone calls a player method after the player was released. In addition, we can add a onPlayerReleased callback to AnalyticsListener to allow implementations to clean themselves up once all pending events are delivered. PiperOrigin-RevId: 347434344
- Loading branch information
1 parent
4139ee5
commit 9982e1f
Showing
6 changed files
with
130 additions
and
18 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
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