正在查看: CallApp v2.226 应用的 e.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 e.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.vungle.ads.internal.presenter;
import android.content.Context;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.webkit.WebViewRenderProcess;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.twilio.voice.EventKeys;
import com.vungle.ads.AdNotLoadedCantPlay;
import com.vungle.ads.HeartbeatMissingError;
import com.vungle.ads.IndexHtmlError;
import com.vungle.ads.LinkError;
import com.vungle.ads.MraidTemplateError;
import com.vungle.ads.NetworkUnreachable;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.VungleError;
import com.vungle.ads.WebViewError;
import com.vungle.ads.WebViewRenderProcessUnresponsive;
import com.vungle.ads.WebViewRenderingProcessGone;
import com.vungle.ads.e0;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.model.CommonRequestBody;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.network.g;
import com.vungle.ads.internal.protos.Sdk$SDKError;
import com.vungle.ads.internal.protos.Sdk$SDKMetric;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.ui.view.MRAIDAdWidget;
import com.vungle.ads.internal.util.o;
import com.vungle.ads.internal.util.q;
import java.io.File;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Lazy;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.l0;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.r;
import org.jetbrains.annotations.NotNull;
public final class e implements gr.d, gr.e {
@NotNull
private static final String ACTION = "action";
@NotNull
public static final String ACTION_WITH_VALUE = "actionWithValue";
@NotNull
public static final String CLOSE = "close";
@NotNull
public static final String CONSENT_ACTION = "consentAction";
@NotNull
public static final String CREATIVE_HEARTBEAT = "creativeHeartbeat";
@NotNull
public static final String ERROR = "error";
@NotNull
public static final String GET_AVAILABLE_DISK_SPACE = "getAvailableDiskSpace";
private static final double HEARTBEAT_INTERVAL = 6.0d;
@NotNull
public static final String OPEN = "open";
@NotNull
private static final String OPEN_NON_MRAID = "openNonMraid";
@NotNull
public static final String OPEN_PRIVACY = "openPrivacy";
@NotNull
public static final String PING_URL = "pingUrl";
@NotNull
public static final String SET_ORIENTATION_PROPERTIES = "setOrientationProperties";
@NotNull
public static final String SUCCESSFUL_VIEW = "successfulView";
@NotNull
private static final String TAG = "MRAIDPresenter";
@NotNull
public static final String TPAT = "tpat";
@NotNull
public static final String UPDATE_SIGNALS = "updateSignals";
@NotNull
private static final String USE_CUSTOM_CLOSE = "useCustomClose";
@NotNull
private static final String USE_CUSTOM_PRIVACY = "useCustomPrivacy";
@NotNull
public static final String VIDEO_LENGTH = "videoLength";
@NotNull
public static final String VIDEO_VIEWED = "videoViewed";
private Long adStartTime;
private boolean adViewed;
@NotNull
private final MRAIDAdWidget adWidget;
@NotNull
private final AdPayload advertisement;
private boolean backEnabled;
private final BidPayload bidPayload;
private com.vungle.ads.internal.presenter.a bus;
@NotNull
private final Lazy clickCoordinateTracker$delegate;
private boolean cp0Fired;
@NotNull
private Executor executor;
private boolean heartbeatEnabled;
@NotNull
private final AtomicBoolean isDestroying;
private long lastUserInteractionTimestamp;
@NotNull
private final Lazy logEntry$delegate;
@NotNull
private final com.vungle.ads.internal.omsdk.b omTracker;
@NotNull
private final Lazy pathProvider$delegate;
@NotNull
private final Placement placement;
@NotNull
private final com.vungle.ads.internal.platform.c platform;
private com.vungle.ads.internal.presenter.i presenterDelegate;
@NotNull
private final Lazy scheduler$delegate;
@NotNull
private final AtomicBoolean sendReportIncentivized;
@NotNull
private final Lazy signalManager$delegate;
@NotNull
private final Lazy suspendableTimer$delegate;
@NotNull
private final Lazy tpatSender$delegate;
private String userId;
private long videoLength;
@NotNull
private final Lazy vungleApiClient$delegate;
@NotNull
private final com.vungle.ads.internal.ui.b vungleWebClient;
@NotNull
public static final a Companion = new a(null);
@NotNull
private static final Map<String, Sdk$SDKMetric.b> eventMap = l0.g(new Pair[]{new Pair(com.vungle.ads.internal.e.CHECKPOINT_0, Sdk$SDKMetric.b.AD_START_EVENT), new Pair(com.vungle.ads.internal.e.CLICK_URL, Sdk$SDKMetric.b.AD_CLICK_EVENT)});
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static void getACTION_WITH_VALUE$vungle_ads_release$annotations() {
}
public static void getCLOSE$vungle_ads_release$annotations() {
}
public static void getCONSENT_ACTION$vungle_ads_release$annotations() {
}
public static void getCREATIVE_HEARTBEAT$vungle_ads_release$annotations() {
}
public static void getERROR$vungle_ads_release$annotations() {
}
public static void getEventMap$vungle_ads_release$annotations() {
}
public static void getGET_AVAILABLE_DISK_SPACE$vungle_ads_release$annotations() {
}
public static void getOPEN$vungle_ads_release$annotations() {
}
public static void getOPEN_PRIVACY$vungle_ads_release$annotations() {
}
public static void getPING_URL$vungle_ads_release$annotations() {
}
public static void getSET_ORIENTATION_PROPERTIES$vungle_ads_release$annotations() {
}
public static void getSUCCESSFUL_VIEW$vungle_ads_release$annotations() {
}
public static void getTPAT$vungle_ads_release$annotations() {
}
public static void getUPDATE_SIGNALS$vungle_ads_release$annotations() {
}
public static void getVIDEO_LENGTH$vungle_ads_release$annotations() {
}
public static void getVIDEO_VIEWED$vungle_ads_release$annotations() {
}
@NotNull
public final Map<String, Sdk$SDKMetric.b> getEventMap$vungle_ads_release() {
return e.eventMap;
}
private a() {
}
}
public static final class b extends r implements Function0 {
public b() {
super(0);
}
@NotNull
public final com.vungle.ads.internal.d m686invoke() {
Context context = e.this.adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
return new com.vungle.ads.internal.d(context, e.this.advertisement);
}
}
public static final class c extends r implements Function0 {
public c() {
super(0);
}
public Object invoke() {
m687invoke();
return Unit.a;
}
public final void m687invoke() {
e.this.adWidget.close();
}
}
public static final class d extends r implements Function0 {
public d() {
super(0);
}
public final com.vungle.ads.internal.util.j m688invoke() {
return e.this.advertisement.getLogEntry();
}
}
public static final class C0112e implements com.vungle.ads.internal.network.b {
public C0112e() {
}
@Override
public void onFailure(com.vungle.ads.internal.network.a aVar, Throwable th) {
com.vungle.ads.internal.util.k.Companion.d(e.TAG, "send RI Failure");
StringBuilder sb = new StringBuilder("Error RI API calls: ");
sb.append(th != null ? th.getLocalizedMessage() : null);
new NetworkUnreachable(sb.toString()).setLogEntry$vungle_ads_release(e.this.getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
}
@Override
public void onResponse(com.vungle.ads.internal.network.a aVar, com.vungle.ads.internal.network.f fVar) {
com.vungle.ads.internal.util.k.Companion.d(e.TAG, "send RI success");
}
}
public static final class f extends r implements Function0 {
final MraidTemplateError $exception;
final boolean $isFatal;
final String $message;
public f(MraidTemplateError mraidTemplateError, boolean z, String str) {
super(0);
this.$exception = mraidTemplateError;
this.$isFatal = z;
this.$message = str;
}
public Object invoke() {
m689invoke();
return Unit.a;
}
public final void m689invoke() {
e.this.handleWebViewException(this.$exception, this.$isFatal, this.$message);
}
}
public static final class g implements com.vungle.ads.internal.ui.a {
final String $deeplinkUrl;
final e this$0;
public g(String str, e eVar) {
this.$deeplinkUrl = str;
this.this$0 = eVar;
}
@Override
public void onDeeplinkClick(boolean z) {
if (!z) {
new LinkError(Sdk$SDKError.b.DEEPLINK_OPEN_FAILED, "Fail to open " + this.$deeplinkUrl).setLogEntry$vungle_ads_release(this.this$0.getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
}
List tpatUrls$default = AdPayload.getTpatUrls$default(this.this$0.advertisement, com.vungle.ads.internal.e.DEEPLINK_CLICK, String.valueOf(z), null, 4, null);
if (tpatUrls$default != null) {
e eVar = this.this$0;
Iterator it = tpatUrls$default.iterator();
while (it.hasNext()) {
com.vungle.ads.internal.network.h.sendTpat$default(eVar.getTpatSender(), new g.a((String) it.next()).tpatKey(com.vungle.ads.internal.e.DEEPLINK_CLICK).withLogEntry(eVar.getLogEntry()).build(), false, 2, null);
}
}
}
}
public static final class h extends r implements Function0 {
public static final h INSTANCE = new h();
public h() {
super(0);
}
@NotNull
public final com.vungle.ads.internal.util.g m690invoke() {
return new com.vungle.ads.internal.util.g();
}
}
public static final class i extends r implements Function0 {
final Context $context;
public i(Context context) {
super(0);
this.$context = context;
}
@NotNull
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(VungleApiClient.class);
}
}
public static final class j extends r implements Function0 {
final Context $context;
public j(Context context) {
super(0);
this.$context = context;
}
@NotNull
public final com.vungle.ads.internal.util.l invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(com.vungle.ads.internal.util.l.class);
}
}
public static final class k extends r implements Function0 {
final Context $context;
public k(Context context) {
super(0);
this.$context = context;
}
@NotNull
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(SignalManager.class);
}
}
public static final class l extends r implements Function0 {
final Context $context;
public l(Context context) {
super(0);
this.$context = context;
}
@NotNull
public final com.vungle.ads.internal.network.h invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(com.vungle.ads.internal.network.h.class);
}
}
public static final class m extends r implements Function0 {
public static final class a extends r implements Function0 {
final e this$0;
public a(e eVar) {
super(0);
this.this$0 = eVar;
}
public Object invoke() {
m692invoke();
return Unit.a;
}
public final void m692invoke() {
this.this$0.reportErrorAndCloseAd(new HeartbeatMissingError());
}
}
public m() {
super(0);
}
@NotNull
public final o m691invoke() {
return new o(e.HEARTBEAT_INTERVAL, true, null, new a(e.this), 4, null);
}
}
public e(@NotNull MRAIDAdWidget mRAIDAdWidget, @NotNull AdPayload adPayload, @NotNull Placement placement, @NotNull com.vungle.ads.internal.ui.b bVar, @NotNull Executor executor, @NotNull com.vungle.ads.internal.omsdk.b bVar2, BidPayload bidPayload, @NotNull com.vungle.ads.internal.platform.c cVar) {
Intrinsics.checkNotNullParameter(mRAIDAdWidget, "adWidget");
Intrinsics.checkNotNullParameter(adPayload, "advertisement");
Intrinsics.checkNotNullParameter(placement, "placement");
Intrinsics.checkNotNullParameter(bVar, "vungleWebClient");
Intrinsics.checkNotNullParameter(executor, "executor");
Intrinsics.checkNotNullParameter(bVar2, "omTracker");
Intrinsics.checkNotNullParameter(cVar, EventKeys.PLATFORM);
this.adWidget = mRAIDAdWidget;
this.advertisement = adPayload;
this.placement = placement;
this.vungleWebClient = bVar;
this.executor = executor;
this.omTracker = bVar2;
this.bidPayload = bidPayload;
this.platform = cVar;
this.isDestroying = new AtomicBoolean(false);
this.sendReportIncentivized = new AtomicBoolean(false);
ServiceLocator.Companion companion = ServiceLocator.Companion;
Context context = mRAIDAdWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
ru.l lVar = ru.l.SYNCHRONIZED;
this.vungleApiClient$delegate = ru.k.a(lVar, new i(context));
Context context2 = mRAIDAdWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context2, "adWidget.context");
this.pathProvider$delegate = ru.k.a(lVar, new j(context2));
Context context3 = mRAIDAdWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context3, "adWidget.context");
this.signalManager$delegate = ru.k.a(lVar, new k(context3));
Context context4 = mRAIDAdWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context4, "adWidget.context");
this.tpatSender$delegate = ru.k.a(lVar, new l(context4));
this.scheduler$delegate = ru.k.b(h.INSTANCE);
this.logEntry$delegate = ru.k.b(new d());
this.suspendableTimer$delegate = ru.k.b(new m());
this.clickCoordinateTracker$delegate = ru.k.b(new b());
}
private final void closeView() {
Long l2 = this.adStartTime;
if (l2 != null) {
List<String> tpatUrls = this.advertisement.getTpatUrls(com.vungle.ads.internal.e.AD_CLOSE, String.valueOf(System.currentTimeMillis() - l2.longValue()), String.valueOf(this.platform.getVolumeLevel()));
if (tpatUrls != null) {
Iterator<T> it = tpatUrls.iterator();
while (it.hasNext()) {
com.vungle.ads.internal.network.h.sendTpat$default(getTpatSender(), new g.a((String) it.next()).tpatKey(com.vungle.ads.internal.e.AD_CLOSE).withLogEntry(getLogEntry()).build(), false, 2, null);
}
}
}
q.INSTANCE.runOnUiThread(new c());
}
public static void getAdStartTime$vungle_ads_release$annotations() {
}
public static void getBackEnabled$vungle_ads_release$annotations() {
}
public static void getBus$annotations() {
}
public static void getClickCoordinateTracker$vungle_ads_release$annotations() {
}
public static void getHeartbeatEnabled$vungle_ads_release$annotations() {
}
public static void getLastUserInteractionTimestamp$vungle_ads_release$annotations() {
}
public final com.vungle.ads.internal.util.j getLogEntry() {
return (com.vungle.ads.internal.util.j) this.logEntry$delegate.getValue();
}
private final com.vungle.ads.internal.util.l getPathProvider() {
return (com.vungle.ads.internal.util.l) this.pathProvider$delegate.getValue();
}
private final com.vungle.ads.internal.util.g getScheduler() {
return (com.vungle.ads.internal.util.g) this.scheduler$delegate.getValue();
}
private final SignalManager getSignalManager() {
return (SignalManager) this.signalManager$delegate.getValue();
}
public static void getSuspendableTimer$vungle_ads_release$annotations() {
}
public final com.vungle.ads.internal.network.h getTpatSender() {
return (com.vungle.ads.internal.network.h) this.tpatSender$delegate.getValue();
}
public static void getUserId$vungle_ads_release$annotations() {
}
public static void getVideoLength$vungle_ads_release$annotations() {
}
private final VungleApiClient getVungleApiClient() {
return (VungleApiClient) this.vungleApiClient$delegate.getValue();
}
public final void handleWebViewException(VungleError vungleError, boolean z, String str) {
com.vungle.ads.internal.util.k.Companion.e(TAG, "handleWebViewException: " + vungleError.getLocalizedMessage() + ", fatal: " + z + ", errorMsg: " + str);
vungleError.setLogEntry$vungle_ads_release(getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
if (z) {
makeBusError(vungleError);
closeView();
}
}
public static void handleWebViewException$default(e eVar, VungleError vungleError, boolean z, String str, int i2, Object obj) {
if ((i2 & 4) != 0) {
str = null;
}
eVar.handleWebViewException(vungleError, z, str);
}
public static void isDestroying$vungle_ads_release$annotations() {
}
private final VungleError loadMraidAd(File file) {
File file2 = new File(file.getPath(), com.vungle.ads.internal.e.AD_INDEX_FILE_NAME);
if (!file2.exists()) {
return new IndexHtmlError(Sdk$SDKError.b.AD_HTML_FAILED_TO_LOAD, "Fail to load html " + file2.getPath());
}
this.adWidget.showWebsite(AdPayload.FILE_SCHEME + file2.getPath());
return null;
}
private final void makeBusError(VungleError vungleError) {
com.vungle.ads.internal.presenter.a aVar = this.bus;
if (aVar != null) {
aVar.onError(vungleError, this.placement.getReferenceId());
}
}
public static final void m681prepare$lambda14(e eVar) {
Intrinsics.checkNotNullParameter(eVar, "this$0");
eVar.backEnabled = true;
}
public static final void m682processCommand$lambda10(e eVar) {
Intrinsics.checkNotNullParameter(eVar, "this$0");
List list = null;
CommonRequestBody.AdSizeParam adSizeParam = null;
com.vungle.ads.internal.network.a ri = eVar.getVungleApiClient().ri(new CommonRequestBody.RequestParam(list, adSizeParam, eVar.adStartTime, eVar.advertisement.advAppId(), eVar.placement.getReferenceId(), eVar.userId, 3, (DefaultConstructorMarker) null));
if (ri != null) {
ri.enqueue(eVar.new C0112e());
return;
}
com.vungle.ads.internal.util.k.Companion.e(TAG, "Invalid ri call.");
new NetworkUnreachable("Error RI API for placement: " + eVar.placement.getReferenceId()).setLogEntry$vungle_ads_release(eVar.getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
}
public static final void m683processCommand$lambda11(e eVar) {
Intrinsics.checkNotNullParameter(eVar, "this$0");
eVar.getSuspendableTimer$vungle_ads_release().reset();
}
public static final void m684processCommand$lambda12(e eVar, long j2) {
Intrinsics.checkNotNullParameter(eVar, "this$0");
eVar.vungleWebClient.notifyDiskAvailableSize(j2);
}
public static final void m685processCommand$lambda5(e eVar) {
Intrinsics.checkNotNullParameter(eVar, "this$0");
eVar.adWidget.setVisibility(0);
}
private final void recordPlayAssetMetric() {
com.vungle.ads.f.logMetric$vungle_ads_release$default(com.vungle.ads.f.INSTANCE, new e0(this.advertisement.getAssetsFullyDownloaded() ? Sdk$SDKMetric.b.LOCAL_ASSETS_USED : Sdk$SDKMetric.b.REMOTE_ASSETS_USED), getLogEntry(), (String) null, 4, (Object) null);
}
public final void reportErrorAndCloseAd(VungleError vungleError) {
vungleError.setLogEntry$vungle_ads_release(getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
makeBusError(vungleError);
closeView();
}
private final void triggerEventMetricForTpat(String str) {
Sdk$SDKMetric.b bVar = eventMap.get(str);
if (bVar != null) {
com.vungle.ads.f.logMetric$vungle_ads_release$default(com.vungle.ads.f.INSTANCE, new e0(bVar), getLogEntry(), (String) null, 4, (Object) null);
}
}
public final void detach(int i2) {
com.vungle.ads.internal.presenter.a aVar;
com.vungle.ads.internal.util.k.Companion.d(TAG, "detach()");
boolean z = (i2 & 1) != 0;
boolean z2 = (i2 & 2) != 0;
this.vungleWebClient.setWebViewObserver(null);
this.vungleWebClient.setMraidDelegate(null);
if (!z && z2 && !this.isDestroying.getAndSet(true) && (aVar = this.bus) != null) {
aVar.onNext(TtmlNode.END, null, this.placement.getReferenceId());
}
this.adWidget.destroyWebView(this.omTracker.stop());
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().cancel();
}
}
public final Long getAdStartTime$vungle_ads_release() {
return this.adStartTime;
}
public final boolean getBackEnabled$vungle_ads_release() {
return this.backEnabled;
}
public final com.vungle.ads.internal.presenter.a getBus() {
return this.bus;
}
@NotNull
public final com.vungle.ads.internal.d getClickCoordinateTracker$vungle_ads_release() {
return (com.vungle.ads.internal.d) this.clickCoordinateTracker$delegate.getValue();
}
public final boolean getHeartbeatEnabled$vungle_ads_release() {
return this.heartbeatEnabled;
}
public final long getLastUserInteractionTimestamp$vungle_ads_release() {
return this.lastUserInteractionTimestamp;
}
@NotNull
public final o getSuspendableTimer$vungle_ads_release() {
return (o) this.suspendableTimer$delegate.getValue();
}
public final String getUserId$vungle_ads_release() {
return this.userId;
}
public final long getVideoLength$vungle_ads_release() {
return this.videoLength;
}
public final Long getViewStatus() {
boolean z = this.adViewed;
if (!z && !this.cp0Fired) {
return 3L;
}
if (this.cp0Fired) {
return !z ? 2L : null;
}
return 1L;
}
public final void handleExit() {
if (this.backEnabled) {
this.adWidget.showWebsite("javascript:window.vungle.mraidBridgeExt.requestMRAIDClose()");
}
}
@NotNull
public final AtomicBoolean isDestroying$vungle_ads_release() {
return this.isDestroying;
}
@Override
public void onReceivedError(@NotNull String str, boolean z) {
Intrinsics.checkNotNullParameter(str, "errorDesc");
if (z) {
reportErrorAndCloseAd(new WebViewError(str));
}
}
@Override
public void onRenderProcessUnresponsive(WebView webView, WebViewRenderProcess webViewRenderProcess) {
handleWebViewException$default(this, new WebViewRenderProcessUnresponsive("fatal=true"), true, null, 4, null);
}
public final void onViewConfigurationChanged() {
this.vungleWebClient.notifyPropertiesChange(true);
}
public final void onViewTouched(MotionEvent motionEvent) {
if (motionEvent != null) {
com.vungle.ads.internal.util.k.Companion.d(TAG, "user interaction");
this.lastUserInteractionTimestamp = System.currentTimeMillis();
getClickCoordinateTracker$vungle_ads_release().trackCoordinate(motionEvent);
}
}
@Override
public boolean onWebRenderingProcessGone(WebView webView, Boolean bool) {
boolean booleanValue = bool != null ? bool.booleanValue() : true;
handleWebViewException$default(this, new WebViewRenderingProcessGone("didCrash=" + booleanValue), booleanValue, null, 4, null);
return true;
}
public final void prepare() {
String str;
String str2;
String str3;
String str4;
int settings;
this.isDestroying.set(false);
this.adWidget.linkWebView(this.vungleWebClient, this.advertisement.getWebViewSettings());
com.vungle.ads.c adConfig = this.advertisement.getAdConfig();
if (adConfig != null && (settings = adConfig.getSettings()) > 0) {
this.backEnabled = (settings & 2) == 2;
}
this.heartbeatEnabled = this.advertisement.heartbeatEnabled();
com.vungle.ads.c adConfig2 = this.advertisement.getAdConfig();
Integer valueOf = adConfig2 != null ? Integer.valueOf(adConfig2.getAdOrientation()) : null;
this.adWidget.setOrientation((valueOf != null && valueOf.intValue() == 0) ? 7 : (valueOf != null && valueOf.intValue() == 1) ? 6 : 4);
this.omTracker.start();
this.vungleWebClient.setMraidDelegate(this);
this.vungleWebClient.setErrorHandler(this);
File assetDirectory = this.advertisement.getAssetDirectory();
if (assetDirectory == null || !assetDirectory.exists()) {
StringBuilder sb = new StringBuilder("adv dir not exists: ");
sb.append(assetDirectory != null ? assetDirectory.getPath() : null);
reportErrorAndCloseAd(new AdNotLoadedCantPlay(sb.toString()));
return;
}
VungleError loadMraidAd = loadMraidAd(assetDirectory);
if (loadMraidAd != null) {
reportErrorAndCloseAd(loadMraidAd);
return;
}
this.adStartTime = Long.valueOf(System.currentTimeMillis());
com.vungle.ads.internal.presenter.i iVar = this.presenterDelegate;
this.userId = iVar != null ? iVar.getUserId() : null;
com.vungle.ads.internal.presenter.i iVar2 = this.presenterDelegate;
if (iVar2 == null || (str = iVar2.getAlertTitleText()) == null) {
str = "";
}
com.vungle.ads.internal.presenter.i iVar3 = this.presenterDelegate;
if (iVar3 == null || (str2 = iVar3.getAlertBodyText()) == null) {
str2 = "";
}
com.vungle.ads.internal.presenter.i iVar4 = this.presenterDelegate;
if (iVar4 == null || (str3 = iVar4.getAlertContinueButtonText()) == null) {
str3 = "";
}
com.vungle.ads.internal.presenter.i iVar5 = this.presenterDelegate;
if (iVar5 == null || (str4 = iVar5.getAlertCloseButtonText()) == null) {
str4 = "";
}
this.advertisement.setIncentivizedText(str, str2, str3, str4);
ConfigManager configManager = ConfigManager.INSTANCE;
boolean z = configManager.getGDPRIsCountryDataProtected() && "unknown".equals(fr.c.INSTANCE.getConsentStatus());
this.vungleWebClient.setConsentStatus(z, configManager.getGDPRConsentTitle(), configManager.getGDPRConsentMessage(), configManager.getGDPRButtonAccept(), configManager.getGDPRButtonDeny());
if (z) {
fr.c.INSTANCE.updateGdprConsent("opted_out_by_timeout", "vungle_modal", "");
}
int showCloseDelay = this.advertisement.getShowCloseDelay(Boolean.valueOf(this.placement.isRewardedVideo()));
if (showCloseDelay > 0) {
getScheduler().schedule(new com.vungle.ads.internal.presenter.d(this, 3), showCloseDelay);
} else {
this.backEnabled = true;
}
com.vungle.ads.internal.presenter.a aVar = this.bus;
if (aVar != null) {
aVar.onNext(TtmlNode.START, null, this.placement.getReferenceId());
}
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().start();
}
if (this.advertisement.adLoadOptimizationEnabled()) {
recordPlayAssetMetric();
}
}
@Override
public boolean processCommand(@org.jetbrains.annotations.NotNull java.lang.String r24, @org.jetbrains.annotations.NotNull kotlinx.serialization.json.JsonObject r25) {
throw new UnsupportedOperationException("Method not decompiled: com.vungle.ads.internal.presenter.e.processCommand(java.lang.String, kotlinx.serialization.json.JsonObject):boolean");
}
public final void setAdStartTime$vungle_ads_release(Long l2) {
this.adStartTime = l2;
}
public final void setAdVisibility(boolean z) {
this.vungleWebClient.setAdVisibility(z);
}
public final void setBackEnabled$vungle_ads_release(boolean z) {
this.backEnabled = z;
}
public final void setBus(com.vungle.ads.internal.presenter.a aVar) {
this.bus = aVar;
}
public final void setEventListener(com.vungle.ads.internal.presenter.a aVar) {
this.bus = aVar;
}
public final void setHeartbeatEnabled$vungle_ads_release(boolean z) {
this.heartbeatEnabled = z;
}
public final void setLastUserInteractionTimestamp$vungle_ads_release(long j2) {
this.lastUserInteractionTimestamp = j2;
}
public final void setPresenterDelegate$vungle_ads_release(com.vungle.ads.internal.presenter.i iVar) {
this.presenterDelegate = iVar;
}
public final void setUserId$vungle_ads_release(String str) {
this.userId = str;
}
public final void setVideoLength$vungle_ads_release(long j2) {
this.videoLength = j2;
}
public final boolean shouldBlockAutoRedirect$vungle_ads_release() {
ConfigManager configManager = ConfigManager.INSTANCE;
return !configManager.allowAutoRedirects() && (this.lastUserInteractionTimestamp == 0 || System.currentTimeMillis() - this.lastUserInteractionTimestamp > configManager.afterClickDuration());
}
public final void start() {
com.vungle.ads.internal.util.k.Companion.d(TAG, "start()");
this.adWidget.resumeWeb();
setAdVisibility(true);
}
public final void stop() {
com.vungle.ads.internal.util.k.Companion.d(TAG, "stop()");
this.adWidget.pauseWeb();
setAdVisibility(false);
}
}