Commit 13638f1c by andrewlewis Committed by Oliver Woodman

Remove AdsLoader listeners on releasing ImaAdsLoader

Issue: #4114
PiperOrigin-RevId: 227516509
parent e448ecdf
# Release notes # # Release notes #
### 2.9.4 ###
* IMA extension: Clear ads loader listeners on release
([#4114](https://github.com/google/ExoPlayer/issues/4114)).
### 2.9.3 ### ### 2.9.3 ###
* Captions: Support PNG subtitles in SMPTE-TT * Captions: Support PNG subtitles in SMPTE-TT
......
...@@ -597,6 +597,8 @@ public final class ImaAdsLoader ...@@ -597,6 +597,8 @@ public final class ImaAdsLoader
adsManager.destroy(); adsManager.destroy();
adsManager = null; adsManager = null;
} }
adsLoader.removeAdsLoadedListener(/* adsLoadedListener= */ this);
adsLoader.removeAdErrorListener(/* adErrorListener= */ this);
imaPausedContent = false; imaPausedContent = false;
imaAdState = IMA_AD_STATE_NONE; imaAdState = IMA_AD_STATE_NONE;
pendingAdLoadError = null; pendingAdLoadError = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment