正在查看: All File Recovery v1.0.2 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.vungle.ads.internal.presenter;
import Bc.F;
import Bc.H;
import Bc.J;
import Bc.U0;
import Bc.X;
import Dc.r0;
import android.content.Context;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.webkit.WebViewRenderProcess;
import bd.InterfaceC0517a;
import com.vungle.ads.C0;
import com.vungle.ads.C0537d;
import com.vungle.ads.C0540e0;
import com.vungle.ads.C0546h0;
import com.vungle.ads.C0547i;
import com.vungle.ads.K0;
import com.vungle.ads.M0;
import com.vungle.ads.N;
import com.vungle.ads.N0;
import com.vungle.ads.O;
import com.vungle.ads.O0;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.network.g;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.ui.view.b;
import com.vungle.ads.internal.ui.view.d;
import com.vungle.ads.internal.util.o;
import com.vungle.ads.internal.util.p;
import com.vungle.ads.internal.util.t;
import com.vungle.ads.internal.util.w;
import com.vungle.ads.p0;
import com.vungle.ads.r;
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.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import l.i0;
import qc.C0855b;
import qc.C0858e;
import qc.f;
import sc.C0890e;
import uc.C0914c;
public final class i implements d.a, d.b {
@ef.l
private static final String ACTION = "action";
@ef.l
public static final String ACTION_WITH_VALUE = "actionWithValue";
@ef.l
public static final String CLOSE = "close";
@ef.l
public static final String CONSENT_ACTION = "consentAction";
@ef.l
public static final String CREATIVE_HEARTBEAT = "creativeHeartbeat";
@ef.l
public static final String ERROR = "error";
@ef.l
public static final String GET_AVAILABLE_DISK_SPACE = "getAvailableDiskSpace";
private static final double HEARTBEAT_INTERVAL = 6.0d;
@ef.l
public static final String OPEN = "open";
@ef.l
private static final String OPEN_NON_MRAID = "openNonMraid";
@ef.l
public static final String OPEN_PRIVACY = "openPrivacy";
@ef.l
public static final String PING_URL = "pingUrl";
@ef.l
public static final String SET_ORIENTATION_PROPERTIES = "setOrientationProperties";
@ef.l
public static final String SUCCESSFUL_VIEW = "successfulView";
@ef.l
private static final String TAG = "MRAIDPresenter";
@ef.l
public static final String TPAT = "tpat";
@ef.l
public static final String UPDATE_SIGNALS = "updateSignals";
@ef.l
private static final String USE_CUSTOM_CLOSE = "useCustomClose";
@ef.l
private static final String USE_CUSTOM_PRIVACY = "useCustomPrivacy";
@ef.l
public static final String VIDEO_LENGTH = "videoLength";
@ef.l
public static final String VIDEO_VIEWED = "videoViewed";
@ef.m
private Long adStartTime;
private boolean adViewed;
@ef.l
private final com.vungle.ads.internal.ui.view.b adWidget;
@ef.l
private final C0855b advertisement;
private boolean backEnabled;
@ef.m
private final C0858e bidPayload;
@ef.m
private com.vungle.ads.internal.presenter.a bus;
@ef.l
private final F clickCoordinateTracker$delegate;
private boolean cp0Fired;
@ef.l
private Executor executor;
private boolean heartbeatEnabled;
@ef.l
private final AtomicBoolean isDestroying;
private long lastUserInteractionTimestamp;
@ef.l
private final F logEntry$delegate;
@ef.l
private final C0890e omTracker;
@ef.l
private final F pathProvider$delegate;
@ef.l
private final qc.l placement;
@ef.l
private final com.vungle.ads.internal.platform.d platform;
@ef.m
private n presenterDelegate;
@ef.l
private final F scheduler$delegate;
@ef.l
private final AtomicBoolean sendReportIncentivized;
@ef.l
private final F signalManager$delegate;
@ef.l
private final F suspendableTimer$delegate;
@ef.l
private final F tpatSender$delegate;
@ef.m
private String userId;
private long videoLength;
@ef.l
private final F vungleApiClient$delegate;
@ef.l
private final com.vungle.ads.internal.ui.i vungleWebClient;
@ef.l
public static final a Companion = new a(null);
@ef.l
private static final Map<String, Sdk.SDKMetric.b> eventMap = r0.W(new X(com.vungle.ads.internal.f.CHECKPOINT_0, Sdk.SDKMetric.b.AD_START_EVENT), new X(com.vungle.ads.internal.f.CLICK_URL, Sdk.SDKMetric.b.AD_CLICK_EVENT));
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@i0
public static void getACTION_WITH_VALUE$vungle_ads_release$annotations() {
}
@i0
public static void getCLOSE$vungle_ads_release$annotations() {
}
@i0
public static void getCONSENT_ACTION$vungle_ads_release$annotations() {
}
@i0
public static void getCREATIVE_HEARTBEAT$vungle_ads_release$annotations() {
}
@i0
public static void getERROR$vungle_ads_release$annotations() {
}
@i0
public static void getEventMap$vungle_ads_release$annotations() {
}
@i0
public static void getGET_AVAILABLE_DISK_SPACE$vungle_ads_release$annotations() {
}
@i0
public static void getOPEN$vungle_ads_release$annotations() {
}
@i0
public static void getOPEN_PRIVACY$vungle_ads_release$annotations() {
}
@i0
public static void getPING_URL$vungle_ads_release$annotations() {
}
@i0
public static void getSET_ORIENTATION_PROPERTIES$vungle_ads_release$annotations() {
}
@i0
public static void getSUCCESSFUL_VIEW$vungle_ads_release$annotations() {
}
@i0
public static void getTPAT$vungle_ads_release$annotations() {
}
@i0
public static void getUPDATE_SIGNALS$vungle_ads_release$annotations() {
}
@i0
public static void getVIDEO_LENGTH$vungle_ads_release$annotations() {
}
@i0
public static void getVIDEO_VIEWED$vungle_ads_release$annotations() {
}
@ef.l
public final Map<String, Sdk.SDKMetric.b> getEventMap$vungle_ads_release() {
return i.eventMap;
}
private a() {
}
}
public static final class b extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.d> {
public b() {
super(0);
}
@Override
@ef.l
public final com.vungle.ads.internal.d invoke() {
Context context = i.this.adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
return new com.vungle.ads.internal.d(context, i.this.advertisement);
}
}
public static final class c extends Lambda implements InterfaceC0517a<U0> {
public c() {
super(0);
}
@Override
public U0 invoke() {
invoke2();
return U0.a;
}
public final void invoke2() {
i.this.adWidget.close();
}
}
public static final class d extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.util.n> {
public d() {
super(0);
}
@Override
@ef.m
public final com.vungle.ads.internal.util.n invoke() {
return i.this.advertisement.getLogEntry$vungle_ads_release();
}
}
public static final class e implements com.vungle.ads.internal.network.b<Void> {
public e() {
}
@Override
public void onFailure(@ef.m com.vungle.ads.internal.network.a<Void> aVar, @ef.m Throwable th) {
o.Companion.d(i.TAG, "send RI Failure");
StringBuilder sb = new StringBuilder("Error RI API calls: ");
sb.append(th != null ? th.getLocalizedMessage() : null);
new p0(sb.toString()).setLogEntry$vungle_ads_release(i.this.getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
}
@Override
public void onResponse(@ef.m com.vungle.ads.internal.network.a<Void> aVar, @ef.m com.vungle.ads.internal.network.f<Void> fVar) {
o.Companion.d(i.TAG, "send RI success");
}
}
public static final class f extends Lambda implements InterfaceC0517a<U0> {
final C0546h0 $exception;
final boolean $isFatal;
final String $message;
public f(C0546h0 c0546h0, boolean z, String str) {
super(0);
this.$exception = c0546h0;
this.$isFatal = z;
this.$message = str;
}
@Override
public U0 invoke() {
invoke2();
return U0.a;
}
public final void invoke2() {
i.this.handleWebViewException(this.$exception, this.$isFatal, this.$message);
}
}
public static final class g implements com.vungle.ads.internal.ui.c {
final String $deeplinkUrl;
final i this$0;
public g(String str, i iVar) {
this.$deeplinkUrl = str;
this.this$0 = iVar;
}
@Override
public void onDeeplinkClick(boolean z) {
if (!z) {
new C0540e0(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 = C0855b.getTpatUrls$default(this.this$0.advertisement, com.vungle.ads.internal.f.DEEPLINK_CLICK, String.valueOf(z), null, 4, null);
if (tpatUrls$default != null) {
i iVar = this.this$0;
Iterator it = tpatUrls$default.iterator();
while (it.hasNext()) {
com.vungle.ads.internal.network.i.sendTpat$default(iVar.getTpatSender(), new g.a((String) it.next()).tpatKey(com.vungle.ads.internal.f.DEEPLINK_CLICK).withLogEntry(iVar.getLogEntry()).build(), false, 2, null);
}
}
}
}
public static final class h extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.util.h> {
public static final h INSTANCE = new h();
public h() {
super(0);
}
@Override
@ef.l
public final com.vungle.ads.internal.util.h invoke() {
return new com.vungle.ads.internal.util.h();
}
}
public static final class C0084i extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.network.k> {
final Context $context;
public C0084i(Context context) {
super(0);
this.$context = context;
}
@Override
@ef.l
public final com.vungle.ads.internal.network.k invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(com.vungle.ads.internal.network.k.class);
}
}
public static final class j extends Lambda implements InterfaceC0517a<p> {
final Context $context;
public j(Context context) {
super(0);
this.$context = context;
}
@Override
@ef.l
public final p invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(p.class);
}
}
public static final class k extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.signals.c> {
final Context $context;
public k(Context context) {
super(0);
this.$context = context;
}
@Override
@ef.l
public final com.vungle.ads.internal.signals.c invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(com.vungle.ads.internal.signals.c.class);
}
}
public static final class l extends Lambda implements InterfaceC0517a<com.vungle.ads.internal.network.i> {
final Context $context;
public l(Context context) {
super(0);
this.$context = context;
}
@Override
@ef.l
public final com.vungle.ads.internal.network.i invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getService(com.vungle.ads.internal.network.i.class);
}
}
public static final class m extends Lambda implements InterfaceC0517a<t> {
public static final class a extends Lambda implements InterfaceC0517a<U0> {
final i this$0;
public a(i iVar) {
super(0);
this.this$0 = iVar;
}
@Override
public U0 invoke() {
invoke2();
return U0.a;
}
public final void invoke2() {
this.this$0.reportErrorAndCloseAd(new N());
}
}
public m() {
super(0);
}
@Override
@ef.l
public final t invoke() {
return new t(i.HEARTBEAT_INTERVAL, true, null, new a(i.this), 4, null);
}
}
public i(@ef.l com.vungle.ads.internal.ui.view.b adWidget, @ef.l C0855b advertisement, @ef.l qc.l placement, @ef.l com.vungle.ads.internal.ui.i vungleWebClient, @ef.l Executor executor, @ef.l C0890e omTracker, @ef.m C0858e c0858e, @ef.l com.vungle.ads.internal.platform.d platform) {
Intrinsics.checkNotNullParameter(adWidget, "adWidget");
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
Intrinsics.checkNotNullParameter(placement, "placement");
Intrinsics.checkNotNullParameter(vungleWebClient, "vungleWebClient");
Intrinsics.checkNotNullParameter(executor, "executor");
Intrinsics.checkNotNullParameter(omTracker, "omTracker");
Intrinsics.checkNotNullParameter(platform, "platform");
this.adWidget = adWidget;
this.advertisement = advertisement;
this.placement = placement;
this.vungleWebClient = vungleWebClient;
this.executor = executor;
this.omTracker = omTracker;
this.bidPayload = c0858e;
this.platform = platform;
this.isDestroying = new AtomicBoolean(false);
this.sendReportIncentivized = new AtomicBoolean(false);
ServiceLocator.Companion companion = ServiceLocator.Companion;
Context context = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
J j2 = J.a;
this.vungleApiClient$delegate = H.a(j2, new C0084i(context));
Context context2 = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context2, "adWidget.context");
this.pathProvider$delegate = H.a(j2, new j(context2));
Context context3 = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context3, "adWidget.context");
this.signalManager$delegate = H.a(j2, new k(context3));
Context context4 = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context4, "adWidget.context");
this.tpatSender$delegate = H.a(j2, new l(context4));
this.scheduler$delegate = H.b(h.INSTANCE);
this.logEntry$delegate = H.b(new d());
this.suspendableTimer$delegate = H.b(new m());
this.clickCoordinateTracker$delegate = H.b(new b());
}
private final void closeView() {
Long l2 = this.adStartTime;
if (l2 != null) {
List<String> tpatUrls = this.advertisement.getTpatUrls(com.vungle.ads.internal.f.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.i.sendTpat$default(getTpatSender(), new g.a((String) it.next()).tpatKey(com.vungle.ads.internal.f.AD_CLOSE).withLogEntry(getLogEntry()).build(), false, 2, null);
}
}
}
w.INSTANCE.runOnUiThread(new c());
}
@i0
public static void getAdStartTime$vungle_ads_release$annotations() {
}
@i0
public static void getBackEnabled$vungle_ads_release$annotations() {
}
@i0
public static void getBus$annotations() {
}
@i0
public static void getClickCoordinateTracker$vungle_ads_release$annotations() {
}
@i0
public static void getHeartbeatEnabled$vungle_ads_release$annotations() {
}
@i0
public static void getLastUserInteractionTimestamp$vungle_ads_release$annotations() {
}
public final com.vungle.ads.internal.util.n getLogEntry() {
return (com.vungle.ads.internal.util.n) this.logEntry$delegate.getValue();
}
private final p getPathProvider() {
return (p) this.pathProvider$delegate.getValue();
}
private final com.vungle.ads.internal.util.h getScheduler() {
return (com.vungle.ads.internal.util.h) this.scheduler$delegate.getValue();
}
private final com.vungle.ads.internal.signals.c getSignalManager() {
return (com.vungle.ads.internal.signals.c) this.signalManager$delegate.getValue();
}
@i0
public static void getSuspendableTimer$vungle_ads_release$annotations() {
}
public final com.vungle.ads.internal.network.i getTpatSender() {
return (com.vungle.ads.internal.network.i) this.tpatSender$delegate.getValue();
}
@i0
public static void getUserId$vungle_ads_release$annotations() {
}
@i0
public static void getVideoLength$vungle_ads_release$annotations() {
}
private final com.vungle.ads.internal.network.k getVungleApiClient() {
return (com.vungle.ads.internal.network.k) this.vungleApiClient$delegate.getValue();
}
public final void handleWebViewException(K0 k0, boolean z, String str) {
o.Companion.e(TAG, "handleWebViewException: " + k0.getLocalizedMessage() + ", fatal: " + z + ", errorMsg: " + str);
k0.setLogEntry$vungle_ads_release(getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
if (z) {
makeBusError(k0);
closeView();
}
}
public static void handleWebViewException$default(i iVar, K0 k0, boolean z, String str, int i, Object obj) {
if ((i & 4) != 0) {
str = null;
}
iVar.handleWebViewException(k0, z, str);
}
@i0
public static void isDestroying$vungle_ads_release$annotations() {
}
private final K0 loadMraidAd(File file) {
File file2 = new File(file.getPath(), com.vungle.ads.internal.f.AD_INDEX_FILE_NAME);
if (!file2.exists()) {
return new O(Sdk.SDKError.b.AD_HTML_FAILED_TO_LOAD, "Fail to load html " + file2.getPath());
}
this.adWidget.showWebsite(C0855b.FILE_SCHEME + file2.getPath());
return null;
}
private final void makeBusError(K0 k0) {
com.vungle.ads.internal.presenter.a aVar = this.bus;
if (aVar != null) {
aVar.onError(k0, this.placement.getReferenceId());
}
}
public static final void m102prepare$lambda14(i this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.backEnabled = true;
}
public static final void m103processCommand$lambda10(i this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
List list = null;
f.b bVar = null;
com.vungle.ads.internal.network.a<Void> ri = this$0.getVungleApiClient().ri(new f.i(list, bVar, this$0.adStartTime, this$0.advertisement.advAppId(), this$0.placement.getReferenceId(), this$0.userId, 3, (DefaultConstructorMarker) null));
if (ri != null) {
ri.enqueue(this$0.new e());
return;
}
o.Companion.e(TAG, "Invalid ri call.");
new p0("Error RI API for placement: " + this$0.placement.getReferenceId()).setLogEntry$vungle_ads_release(this$0.getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
}
public static final void m104processCommand$lambda11(i this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getSuspendableTimer$vungle_ads_release().reset();
}
public static final void m105processCommand$lambda12(i this$0, long j2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.vungleWebClient.notifyDiskAvailableSize(j2);
}
public static final void m106processCommand$lambda5(i this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.adWidget.setVisibility(0);
}
private final void recordPlayAssetMetric() {
r.logMetric$vungle_ads_release$default(r.INSTANCE, new C0(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(K0 k0) {
k0.setLogEntry$vungle_ads_release(getLogEntry()).logErrorNoReturnValue$vungle_ads_release();
makeBusError(k0);
closeView();
}
private final void triggerEventMetricForTpat(String str) {
Sdk.SDKMetric.b bVar = eventMap.get(str);
if (bVar != null) {
r.logMetric$vungle_ads_release$default(r.INSTANCE, new C0(bVar), getLogEntry(), (String) null, 4, (Object) null);
}
}
public final void detach(@b.a int i) {
com.vungle.ads.internal.presenter.a aVar;
o.Companion.d(TAG, "detach()");
boolean z = (i & 1) != 0;
boolean z2 = (i & 2) != 0;
this.vungleWebClient.setWebViewObserver(null);
this.vungleWebClient.setMraidDelegate(null);
if (!z && z2 && !this.isDestroying.getAndSet(true) && (aVar = this.bus) != null) {
aVar.onNext("end", null, this.placement.getReferenceId());
}
this.adWidget.destroyWebView(this.omTracker.stop());
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().cancel();
}
}
@ef.m
public final Long getAdStartTime$vungle_ads_release() {
return this.adStartTime;
}
public final boolean getBackEnabled$vungle_ads_release() {
return this.backEnabled;
}
@ef.m
public final com.vungle.ads.internal.presenter.a getBus() {
return this.bus;
}
@ef.l
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;
}
@ef.l
public final t getSuspendableTimer$vungle_ads_release() {
return (t) this.suspendableTimer$delegate.getValue();
}
@ef.m
public final String getUserId$vungle_ads_release() {
return this.userId;
}
public final long getVideoLength$vungle_ads_release() {
return this.videoLength;
}
@ef.m
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()");
}
}
@ef.l
public final AtomicBoolean isDestroying$vungle_ads_release() {
return this.isDestroying;
}
@Override
public void onReceivedError(@ef.l String errorDesc, boolean z) {
Intrinsics.checkNotNullParameter(errorDesc, "errorDesc");
if (z) {
reportErrorAndCloseAd(new M0(errorDesc));
}
}
@Override
public void onRenderProcessUnresponsive(@ef.m WebView webView, @ef.m WebViewRenderProcess webViewRenderProcess) {
handleWebViewException$default(this, new N0("fatal=true"), true, null, 4, null);
}
public final void onViewConfigurationChanged() {
this.vungleWebClient.notifyPropertiesChange(true);
}
public final void onViewTouched(@ef.m MotionEvent motionEvent) {
if (motionEvent != null) {
o.Companion.d(TAG, "user interaction");
this.lastUserInteractionTimestamp = System.currentTimeMillis();
getClickCoordinateTracker$vungle_ads_release().trackCoordinate(motionEvent);
}
}
@Override
public boolean onWebRenderingProcessGone(@ef.m WebView webView, @ef.m Boolean bool) {
boolean booleanValue = bool != null ? bool.booleanValue() : true;
handleWebViewException$default(this, new O0("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());
C0537d adConfig = this.advertisement.getAdConfig();
if (adConfig != null && (settings = adConfig.getSettings()) > 0) {
this.backEnabled = (settings & 2) == 2;
}
this.heartbeatEnabled = this.advertisement.heartbeatEnabled();
C0537d 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 C0547i(sb.toString()));
return;
}
K0 loadMraidAd = loadMraidAd(assetDirectory);
if (loadMraidAd != null) {
reportErrorAndCloseAd(loadMraidAd);
return;
}
this.adStartTime = Long.valueOf(System.currentTimeMillis());
n nVar = this.presenterDelegate;
this.userId = nVar != null ? nVar.getUserId() : null;
n nVar2 = this.presenterDelegate;
if (nVar2 == null || (str = nVar2.getAlertTitleText()) == null) {
str = Td.w.v;
}
n nVar3 = this.presenterDelegate;
if (nVar3 == null || (str2 = nVar3.getAlertBodyText()) == null) {
str2 = Td.w.v;
}
n nVar4 = this.presenterDelegate;
if (nVar4 == null || (str3 = nVar4.getAlertContinueButtonText()) == null) {
str3 = Td.w.v;
}
n nVar5 = this.presenterDelegate;
if (nVar5 == null || (str4 = nVar5.getAlertCloseButtonText()) == null) {
str4 = Td.w.v;
}
this.advertisement.setIncentivizedText(str, str2, str3, str4);
com.vungle.ads.internal.e eVar = com.vungle.ads.internal.e.INSTANCE;
boolean z = eVar.getGDPRIsCountryDataProtected() && Intrinsics.areEqual("unknown", C0914c.INSTANCE.getConsentStatus());
this.vungleWebClient.setConsentStatus(z, eVar.getGDPRConsentTitle(), eVar.getGDPRConsentMessage(), eVar.getGDPRButtonAccept(), eVar.getGDPRButtonDeny());
if (z) {
C0914c.INSTANCE.updateGdprConsent("opted_out_by_timeout", "vungle_modal", Td.w.v);
}
int showCloseDelay = this.advertisement.getShowCloseDelay(Boolean.valueOf(this.placement.isRewardedVideo()));
if (showCloseDelay > 0) {
getScheduler().schedule(new Runnable() {
@Override
public final void run() {
i.m102prepare$lambda14(i.this);
}
}, showCloseDelay);
} else {
this.backEnabled = true;
}
com.vungle.ads.internal.presenter.a aVar = this.bus;
if (aVar != null) {
aVar.onNext("start", null, this.placement.getReferenceId());
}
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().start();
}
if (this.advertisement.adLoadOptimizationEnabled()) {
recordPlayAssetMetric();
}
}
@Override
public boolean processCommand(@ef.l java.lang.String r24, @ef.l Qd.y r25) {
throw new UnsupportedOperationException("Method not decompiled: com.vungle.ads.internal.presenter.i.processCommand(java.lang.String, Qd.y):boolean");
}
public final void setAdStartTime$vungle_ads_release(@ef.m 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(@ef.m com.vungle.ads.internal.presenter.a aVar) {
this.bus = aVar;
}
public final void setEventListener(@ef.m 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(@ef.m n nVar) {
this.presenterDelegate = nVar;
}
public final void setUserId$vungle_ads_release(@ef.m String str) {
this.userId = str;
}
public final void setVideoLength$vungle_ads_release(long j2) {
this.videoLength = j2;
}
public final boolean shouldBlockAutoRedirect$vungle_ads_release() {
com.vungle.ads.internal.e eVar = com.vungle.ads.internal.e.INSTANCE;
return !eVar.allowAutoRedirects() && (this.lastUserInteractionTimestamp == 0 || System.currentTimeMillis() - this.lastUserInteractionTimestamp > eVar.afterClickDuration());
}
public final void start() {
o.Companion.d(TAG, "start()");
this.adWidget.resumeWeb();
setAdVisibility(true);
}
public final void stop() {
o.Companion.d(TAG, "stop()");
this.adWidget.pauseWeb();
setAdVisibility(false);
}
}