Issue description
In the IMA extension, if the AdsManager is destroyed before the ALL_ADS_COMPLETED event is raised by IMA, the ad overlay view is leaked, which in turn can leak its activity.
Note: This is a bug in dependency, but I'm filing this issue as a tracking bug for people who want to be updated on the status of the issue. [Internal: b/155041144]
Reproduction steps
Run the demo app. Attach Android Studio profiler. Run an ad playback with the IMA extension. Return to the sample chooser. Take a heap dump and observe that the PlayerActivity has leaked.
Link to test content
Reproduces using IMA samples in the demo app.
A full bug report captured from the device
n/a as already diagnosed.
Version of ExoPlayer being used
dev-v2
Device(s) and version(s) of Android being used
Reproducible on API 29 emulator with Play Store.