Remove AdsLoader listeners on releasing ImaAdsLoader

Issue: #4114
PiperOrigin-RevId: 227516509
This commit is contained in:
andrewlewis 2019-01-02 15:04:20 +00:00 committed by Oliver Woodman
parent e448ecdff8
commit 13638f1c29
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,10 @@
# Release notes #
### 2.9.4 ###
* IMA extension: Clear ads loader listeners on release
([#4114](https://github.com/google/ExoPlayer/issues/4114)).
### 2.9.3 ###
* Captions: Support PNG subtitles in SMPTE-TT

View File

@ -597,6 +597,8 @@ public final class ImaAdsLoader
adsManager.destroy();
adsManager = null;
}
adsLoader.removeAdsLoadedListener(/* adsLoadedListener= */ this);
adsLoader.removeAdErrorListener(/* adErrorListener= */ this);
imaPausedContent = false;
imaAdState = IMA_AD_STATE_NONE;
pendingAdLoadError = null;