Pass app context to the IMA SDK
Notes: this doesn't fix the current issue where the component containing the ad overlay view leaks, but is good practice anyway. PiperOrigin-RevId: 308582036
This commit is contained in:
parent
49e5e66033
commit
f052e89a8f
@ -477,7 +477,9 @@ public final class ImaAdsLoader
|
||||
adCallbacks = new ArrayList<>(/* initialCapacity= */ 1);
|
||||
adDisplayContainer = imaFactory.createAdDisplayContainer();
|
||||
adDisplayContainer.setPlayer(/* videoAdPlayer= */ this);
|
||||
adsLoader = imaFactory.createAdsLoader(context, imaSdkSettings, adDisplayContainer);
|
||||
adsLoader =
|
||||
imaFactory.createAdsLoader(
|
||||
context.getApplicationContext(), imaSdkSettings, adDisplayContainer);
|
||||
adsLoader.addAdErrorListener(/* adErrorListener= */ this);
|
||||
adsLoader.addAdsLoadedListener(/* adsLoadedListener= */ this);
|
||||
fakeContentProgressElapsedRealtimeMs = C.TIME_UNSET;
|
||||
|
Loading…
x
Reference in New Issue
Block a user