Inline ENABLE_PRELOADING

ImaAdsLoader relies on preloading being enabled (it doesn't
work without it) so we may as well remove the constant to
avoid potential confusion.

PiperOrigin-RevId: 284951356
This commit is contained in:
andrewlewis 2019-12-11 11:12:01 +00:00 committed by Andrew Lewis
parent cb85cdd3eb
commit b3de2b08d4

View File

@ -272,11 +272,6 @@ public final class ImaAdsLoader
private static final boolean DEBUG = false;
private static final String TAG = "ImaAdsLoader";
/**
* Whether to enable preloading of ads in {@link AdsRenderingSettings}.
*/
private static final boolean ENABLE_PRELOADING = true;
private static final String IMA_SDK_SETTINGS_PLAYER_TYPE = "google/exo.ext.ima";
private static final String IMA_SDK_SETTINGS_PLAYER_VERSION = ExoPlayerLibraryInfo.VERSION;
@ -1055,7 +1050,7 @@ public final class ImaAdsLoader
private void initializeAdsManager() {
AdsRenderingSettings adsRenderingSettings = imaFactory.createAdsRenderingSettings();
adsRenderingSettings.setEnablePreloading(ENABLE_PRELOADING);
adsRenderingSettings.setEnablePreloading(true);
adsRenderingSettings.setMimeTypes(supportedMimeTypes);
if (mediaLoadTimeoutMs != TIMEOUT_UNSET) {
adsRenderingSettings.setLoadVideoTimeout(mediaLoadTimeoutMs);