Step Record v1.1.5版本的 MD5 值为:5797275f89198878d2f00ee92d534382
以下内容为反编译后的 SKHKzK.java 源代码,内容仅作参考
package com.vungle.ads.internal.presenter;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.webkit.WebViewRenderProcess;
import androidx.annotation.VisibleForTesting;
import com.chartboost.heliumsdk.impl.H1KHK;
import com.chartboost.heliumsdk.impl.H1KtStKSS;
import com.chartboost.heliumsdk.impl.H1StzSzz;
import com.chartboost.heliumsdk.impl.H1zz;
import com.chartboost.heliumsdk.impl.HHHH1;
import com.chartboost.heliumsdk.impl.HKKKHtKzt;
import com.chartboost.heliumsdk.impl.HSSKSS;
import com.chartboost.heliumsdk.impl.HtKHH;
import com.chartboost.heliumsdk.impl.HttKH;
import com.chartboost.heliumsdk.impl.Hzt1zz;
import com.chartboost.heliumsdk.impl.K111HKSSz;
import com.chartboost.heliumsdk.impl.K1Hz1;
import com.chartboost.heliumsdk.impl.KHz1HHt1;
import com.chartboost.heliumsdk.impl.KKzHKK;
import com.chartboost.heliumsdk.impl.KStKzHS;
import com.chartboost.heliumsdk.impl.KtK1t;
import com.chartboost.heliumsdk.impl.Kzz1KS;
import com.chartboost.heliumsdk.impl.KzzztHK;
import com.chartboost.heliumsdk.impl.S1StH111;
import com.chartboost.heliumsdk.impl.SHKSt1z;
import com.chartboost.heliumsdk.impl.SK1Ht1;
import com.chartboost.heliumsdk.impl.SKtS;
import com.chartboost.heliumsdk.impl.Sz1StSK;
import com.chartboost.heliumsdk.impl.SzHS;
import com.chartboost.heliumsdk.impl.SztSKK1K;
import com.chartboost.heliumsdk.impl.t1Httz1Ht;
import com.chartboost.heliumsdk.impl.t1K1HHHtz;
import com.chartboost.heliumsdk.impl.t1SKHKS1t;
import com.chartboost.heliumsdk.impl.tKSt1tzKz;
import com.chartboost.heliumsdk.impl.tSHtKS1zS;
import com.chartboost.heliumsdk.impl.ttHtzKt;
import com.chartboost.heliumsdk.impl.ttSHtSH;
import com.chartboost.heliumsdk.impl.tzzztH;
import com.chartboost.heliumsdk.impl.zHtz1KH;
import com.chartboost.heliumsdk.impl.zS1z1t;
import com.chartboost.heliumsdk.impl.zSztH;
import com.chartboost.heliumsdk.impl.zzSSH;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.vungle.ads.AdConfig;
import com.vungle.ads.ServiceLocator;
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.protos.Sdk$SDKMetric;
import java.io.File;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Lazy;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlinx.serialization.json.JsonObject;
public final class SKHKzK implements HHHH1.SKHKzK, HHHH1.t1H1KH1K {
private static final String ACTION = "action";
public static final String ACTION_WITH_VALUE = "actionWithValue";
public static final String CLOSE = "close";
public static final String CONSENT_ACTION = "consentAction";
public static final String CREATIVE_HEARTBEAT = "creativeHeartbeat";
public static final C0438SKHKzK Companion = new C0438SKHKzK(null);
public static final String ERROR = "error";
private static final double HEARTBEAT_INTERVAL = 6.0d;
public static final String OPEN = "open";
private static final String OPEN_NON_MRAID = "openNonMraid";
public static final String OPEN_PRIVACY = "openPrivacy";
public static final String SET_ORIENTATION_PROPERTIES = "setOrientationProperties";
public static final String SUCCESSFUL_VIEW = "successfulView";
private static final String TAG = "MRAIDPresenter";
public static final String TPAT = "tpat";
private static final String USE_CUSTOM_CLOSE = "useCustomClose";
private static final String USE_CUSTOM_PRIVACY = "useCustomPrivacy";
public static final String VIDEO_LENGTH = "videoLength";
public static final String VIDEO_VIEWED = "videoViewed";
private Long adStartTime;
private boolean adViewed;
private final H1zz adWidget;
private final AdPayload advertisement;
private boolean backEnabled;
private final BidPayload bidPayload;
private SztSKK1K bus;
private final Lazy clickCoordinateTracker$delegate;
private Executor executor;
private final Lazy executors$delegate;
private boolean heartbeatEnabled;
private final AtomicBoolean isDestroying;
private final HttKH omTracker;
private final Lazy pathProvider$delegate;
private final Placement placement;
private Sz1StSK presenterDelegate;
private final Lazy scheduler$delegate;
private final AtomicBoolean sendReportIncentivized;
private final Lazy suspendableTimer$delegate;
private String userId;
private final Lazy vungleApiClient$delegate;
private final zSztH vungleWebClient;
public static final class HKzHtzz extends tKSt1tzKz implements Function0<com.vungle.ads.internal.util.t1H1KH1K> {
public static final class C0437SKHKzK extends tKSt1tzKz implements Function0<Unit> {
final SKHKzK this$0;
public C0437SKHKzK(SKHKzK sKHKzK) {
super(0);
this.this$0 = sKHKzK;
}
@Override
public Unit invoke() {
invoke2();
return Unit.SKHKzK;
}
public final void invoke2() {
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(318, "Error ad template missing Heartbeat", this.this$0.placement.getReferenceId(), this.this$0.advertisement.getCreativeId(), this.this$0.advertisement.eventId());
this.this$0.reportErrorAndCloseAd(new HKKKHtKzt(Kzz1KS.HEARTBEAT_ERROR, null, 2, null));
}
}
public HKzHtzz() {
super(0);
}
@Override
public final com.vungle.ads.internal.util.t1H1KH1K invoke() {
return new com.vungle.ads.internal.util.t1H1KH1K(SKHKzK.HEARTBEAT_INTERVAL, true, null, new C0437SKHKzK(SKHKzK.this), 4, null);
}
}
public static final class HtSH implements zS1z1t {
public HtSH() {
}
@Override
public void onDeeplinkClick(boolean z) {
List<String> tpatUrls = SKHKzK.this.advertisement.getTpatUrls("deeplink.click", String.valueOf(z));
KHz1HHt1 kHz1HHt1 = new KHz1HHt1(SKHKzK.this.getVungleApiClient$vungle_ads_release(), SKHKzK.this.placement.getReferenceId(), SKHKzK.this.advertisement.getCreativeId(), SKHKzK.this.advertisement.eventId(), SKHKzK.this.getExecutors().getIoExecutor(), SKHKzK.this.getPathProvider());
if (tpatUrls != null) {
SKHKzK sKHKzK = SKHKzK.this;
Iterator<T> it = tpatUrls.iterator();
while (it.hasNext()) {
kHz1HHt1.sendTpat((String) it.next(), sKHKzK.executor);
}
}
}
}
public static final class KtH1t1 extends tKSt1tzKz implements Function0<H1StzSzz> {
final Context $context;
public KtH1t1(Context context) {
super(0);
this.$context = context;
}
@Override
public final H1StzSzz invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(H1StzSzz.class);
}
}
public static final class C0438SKHKzK {
private C0438SKHKzK() {
}
public C0438SKHKzK(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@VisibleForTesting
public static void getACTION_WITH_VALUE$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getCLOSE$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getCONSENT_ACTION$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getCREATIVE_HEARTBEAT$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getERROR$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getOPEN$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getOPEN_PRIVACY$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getSET_ORIENTATION_PROPERTIES$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getSUCCESSFUL_VIEW$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getTPAT$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getVIDEO_LENGTH$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getVIDEO_VIEWED$vungle_ads_release$annotations() {
}
}
public static final class Sz1tH extends tKSt1tzKz implements Function0<HSSKSS> {
final Context $context;
public Sz1tH(Context context) {
super(0);
this.$context = context;
}
@Override
public final HSSKSS invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(HSSKSS.class);
}
}
public static final class t1H1KH1K extends tKSt1tzKz implements Function0<com.vungle.ads.internal.t1H1KH1K> {
public t1H1KH1K() {
super(0);
}
@Override
public final com.vungle.ads.internal.t1H1KH1K invoke() {
Context context = SKHKzK.this.adWidget.getContext();
ttHtzKt.tz(context, "adWidget.context");
return new com.vungle.ads.internal.t1H1KH1K(context, SKHKzK.this.advertisement, SKHKzK.this.executor);
}
}
public static final class t1S1zKHK implements KStKzHS<Void> {
@Override
public void onFailure(zzSSH<Void> zzssh, Throwable th) {
Log.d(SKHKzK.TAG, "send RI Failure");
}
@Override
public void onResponse(zzSSH<Void> zzssh, KzzztHK<Void> kzzztHK) {
Log.d(SKHKzK.TAG, "send RI success");
}
}
public static final class tz extends tKSt1tzKz implements Function0<t1K1HHHtz> {
public static final tz INSTANCE = new tz();
public tz() {
super(0);
}
@Override
public final t1K1HHHtz invoke() {
return new t1K1HHHtz();
}
}
public static final class tzttS1SS1 extends tKSt1tzKz implements Function0<com.vungle.ads.internal.network.t1H1KH1K> {
final Context $context;
public tzttS1SS1(Context context) {
super(0);
this.$context = context;
}
@Override
public final com.vungle.ads.internal.network.t1H1KH1K invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(com.vungle.ads.internal.network.t1H1KH1K.class);
}
}
public SKHKzK(H1zz h1zz, AdPayload adPayload, Placement placement, zSztH zszth, Executor executor, HttKH httKH, BidPayload bidPayload) {
ttHtzKt.tzttS1SS1(h1zz, "adWidget");
ttHtzKt.tzttS1SS1(adPayload, "advertisement");
ttHtzKt.tzttS1SS1(placement, "placement");
ttHtzKt.tzttS1SS1(zszth, "vungleWebClient");
ttHtzKt.tzttS1SS1(executor, "executor");
ttHtzKt.tzttS1SS1(httKH, "omTracker");
this.adWidget = h1zz;
this.advertisement = adPayload;
this.placement = placement;
this.vungleWebClient = zszth;
this.executor = executor;
this.omTracker = httKH;
this.bidPayload = bidPayload;
this.isDestroying = new AtomicBoolean(false);
this.sendReportIncentivized = new AtomicBoolean(false);
ServiceLocator.Companion companion = ServiceLocator.Companion;
Context context = h1zz.getContext();
ttHtzKt.tz(context, "adWidget.context");
this.vungleApiClient$delegate = S1StH111.tS1(1, new tzttS1SS1(context));
Context context2 = h1zz.getContext();
ttHtzKt.tz(context2, "adWidget.context");
this.executors$delegate = S1StH111.tS1(1, new Sz1tH(context2));
Context context3 = h1zz.getContext();
ttHtzKt.tz(context3, "adWidget.context");
this.pathProvider$delegate = S1StH111.tS1(1, new KtH1t1(context3));
this.scheduler$delegate = S1StH111.zSSHzSHtz(tz.INSTANCE);
this.suspendableTimer$delegate = S1StH111.zSSHzSHtz(new HKzHtzz());
this.clickCoordinateTracker$delegate = S1StH111.zSSHzSHtz(new t1H1KH1K());
}
private final void closeView() {
this.adWidget.close();
}
@VisibleForTesting
public static void getAdStartTime$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getBackEnabled$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getBus$annotations() {
}
@VisibleForTesting
public static void getClickCoordinateTracker$vungle_ads_release$annotations() {
}
public final HSSKSS getExecutors() {
return (HSSKSS) this.executors$delegate.getValue();
}
@VisibleForTesting
public static void getHeartbeatEnabled$vungle_ads_release$annotations() {
}
public final H1StzSzz getPathProvider() {
return (H1StzSzz) this.pathProvider$delegate.getValue();
}
private final t1K1HHHtz getScheduler() {
return (t1K1HHHtz) this.scheduler$delegate.getValue();
}
@VisibleForTesting
public static void getSuspendableTimer$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getUserId$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static void getVungleApiClient$vungle_ads_release$annotations() {
}
private final void handleWebViewException(Kzz1KS kzz1KS, boolean z, String str) {
Log.e(TAG, "handleWebViewException: " + kzz1KS.getLocalizedMessage() + ", fatal: " + z + ", errorMsg: " + str);
if (z) {
makeBusError(kzz1KS);
closeView();
}
}
public static void handleWebViewException$default(SKHKzK sKHKzK, Kzz1KS kzz1KS, boolean z, String str, int i, Object obj) {
if ((i & 4) != 0) {
str = null;
}
sKHKzK.handleWebViewException(kzz1KS, z, str);
}
@VisibleForTesting
public static void isDestroying$vungle_ads_release$annotations() {
}
private final boolean loadMraid(File file) {
File file2;
String parent = file.getParent();
String str = null;
if (parent != null) {
file2 = new File(parent);
} else {
file2 = null;
}
StringBuilder sb = new StringBuilder();
if (file2 != null) {
str = file2.getPath();
}
sb.append(str);
File file3 = new File(SHKSt1z.t1H1KH1K(sb, File.separator, "index.html"));
if (!file3.exists()) {
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(310, "Fail to load html " + file3.getPath(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return false;
}
this.adWidget.showWebsite(AdPayload.FILE_SCHEME + file3.getPath());
return true;
}
private final void makeBusError(Kzz1KS kzz1KS) {
SztSKK1K sztSKK1K = this.bus;
if (sztSKK1K != null) {
sztSKK1K.onError(kzz1KS, this.placement.getReferenceId());
}
}
public static final void m76prepare$lambda11(SKHKzK sKHKzK) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
sKHKzK.backEnabled = true;
}
public static final void m77processCommand$lambda3(SKHKzK sKHKzK) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
sKHKzK.vungleWebClient.notifyPropertiesChange(true);
}
public static final void m78processCommand$lambda4(SKHKzK sKHKzK) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
sKHKzK.adWidget.setVisibility(0);
}
public static final void m79processCommand$lambda6(SKHKzK sKHKzK) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
String referenceId = sKHKzK.placement.getReferenceId();
zzSSH<Void> ri = sKHKzK.getVungleApiClient$vungle_ads_release().ri(new CommonRequestBody.RequestParam((List) null, (Boolean) null, (String) null, sKHKzK.adStartTime, sKHKzK.advertisement.appId(), referenceId, sKHKzK.userId, 7, (DefaultConstructorMarker) null));
if (ri == null) {
Log.e(TAG, "Invalid ri call.");
} else {
ri.enqueue(new t1S1zKHK());
}
}
public static final void m80processCommand$lambda7(SKHKzK sKHKzK, boolean z, String str, String str2) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
sKHKzK.handleWebViewException(new HKKKHtKzt(Kzz1KS.CREATIVE_ERROR, null, 2, null), z, ttSHtSH.tzttS1SS1(str, " : ", str2));
}
public static final void m81processCommand$lambda8(SKHKzK sKHKzK) {
ttHtzKt.tzttS1SS1(sKHKzK, "this$0");
sKHKzK.getSuspendableTimer$vungle_ads_release().reset();
}
private final void recordPlayAssetMetric() {
Sdk$SDKMetric.t1H1KH1K t1h1kh1k;
if (this.advertisement.getAssetsFullyDownloaded()) {
t1h1kh1k = Sdk$SDKMetric.t1H1KH1K.LOCAL_ASSETS_USED;
} else {
t1h1kh1k = Sdk$SDKMetric.t1H1KH1K.REMOTE_ASSETS_USED;
}
com.vungle.ads.SKHKzK.INSTANCE.logMetric$vungle_ads_release(new K111HKSSz(t1h1kh1k), (r13 & 2) != 0 ? null : this.placement.getReferenceId(), (r13 & 4) != 0 ? null : this.advertisement.getCreativeId(), (r13 & 8) != 0 ? null : this.advertisement.eventId(), (r13 & 16) != 0 ? null : null);
}
public final void reportErrorAndCloseAd(Kzz1KS kzz1KS) {
makeBusError(kzz1KS);
closeView();
}
public final void detach(int i) {
boolean z;
SztSKK1K sztSKK1K;
Log.d(TAG, "detach()");
boolean z2 = false;
if ((i & 1) != 0) {
z = true;
} else {
z = false;
}
if ((i & 2) != 0) {
z2 = true;
}
this.vungleWebClient.setWebViewObserver(null);
this.vungleWebClient.setMraidDelegate(null);
if (!z && z2 && !this.isDestroying.getAndSet(true) && (sztSKK1K = this.bus) != null) {
sztSKK1K.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 SztSKK1K getBus() {
return this.bus;
}
public final com.vungle.ads.internal.t1H1KH1K getClickCoordinateTracker$vungle_ads_release() {
return (com.vungle.ads.internal.t1H1KH1K) this.clickCoordinateTracker$delegate.getValue();
}
public final boolean getHeartbeatEnabled$vungle_ads_release() {
return this.heartbeatEnabled;
}
public final com.vungle.ads.internal.util.t1H1KH1K getSuspendableTimer$vungle_ads_release() {
return (com.vungle.ads.internal.util.t1H1KH1K) this.suspendableTimer$delegate.getValue();
}
public final String getUserId$vungle_ads_release() {
return this.userId;
}
public final com.vungle.ads.internal.network.t1H1KH1K getVungleApiClient$vungle_ads_release() {
return (com.vungle.ads.internal.network.t1H1KH1K) this.vungleApiClient$delegate.getValue();
}
public final void handleExit() {
if (this.backEnabled) {
this.adWidget.showWebsite("javascript:window.vungle.mraidBridgeExt.requestMRAIDClose()");
}
}
public final AtomicBoolean isDestroying$vungle_ads_release() {
return this.isDestroying;
}
@Override
public void onReceivedError(String str, boolean z) {
ttHtzKt.tzttS1SS1(str, "errorDesc");
if (z) {
reportErrorAndCloseAd(new HKKKHtKzt(Kzz1KS.AD_RENDER_NETWORK_ERROR, null, 2, null));
}
}
@Override
public void onRenderProcessUnresponsive(WebView webView, WebViewRenderProcess webViewRenderProcess) {
handleWebViewException$default(this, new HKKKHtKzt(Kzz1KS.WEBVIEW_RENDER_UNRESPONSIVE, null, 2, null), true, null, 4, null);
}
public final void onViewConfigurationChanged() {
this.vungleWebClient.notifyPropertiesChange(true);
}
public final void onViewTouched(MotionEvent motionEvent) {
if (motionEvent != null) {
getClickCoordinateTracker$vungle_ads_release().trackCoordinate(motionEvent);
}
}
@Override
public boolean onWebRenderingProcessGone(WebView webView, Boolean bool) {
handleWebViewException$default(this, new HKKKHtKzt(Kzz1KS.WEB_CRASH, null, 2, null), true, null, 4, null);
return true;
}
public final void prepare() {
Integer num;
int i;
String str;
String str2;
String str3;
String str4;
String str5;
int settings;
boolean z;
boolean z2 = false;
this.isDestroying.set(false);
this.adWidget.linkWebView(this.vungleWebClient);
AdConfig adConfig = this.advertisement.getAdConfig();
if (adConfig != null && (settings = adConfig.getSettings()) > 0) {
if ((settings & 2) == 2) {
z = true;
} else {
z = false;
}
this.backEnabled = z;
}
SzHS szHS = SzHS.INSTANCE;
this.heartbeatEnabled = szHS.heartbeatEnabled();
AdConfig adConfig2 = this.advertisement.getAdConfig();
if (adConfig2 != null) {
num = Integer.valueOf(adConfig2.getAdOrientation());
} else {
num = null;
}
if (num != null && num.intValue() == 0) {
i = 7;
} else if (num != null && num.intValue() == 1) {
i = 6;
} else {
i = 4;
}
this.adWidget.setOrientation(i);
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();
sb.append(assetDirectory.getPath());
if (!loadMraid(new File(SHKSt1z.t1H1KH1K(sb, File.separator, "template")))) {
reportErrorAndCloseAd(new KKzHKK());
return;
}
this.adStartTime = Long.valueOf(System.currentTimeMillis());
Sz1StSK sz1StSK = this.presenterDelegate;
if (sz1StSK != null) {
str = sz1StSK.getUserId();
} else {
str = null;
}
this.userId = str;
Sz1StSK sz1StSK2 = this.presenterDelegate;
if (sz1StSK2 == null || (str2 = sz1StSK2.getAlertTitleText()) == null) {
str2 = "";
}
Sz1StSK sz1StSK3 = this.presenterDelegate;
if (sz1StSK3 == null || (str3 = sz1StSK3.getAlertBodyText()) == null) {
str3 = "";
}
Sz1StSK sz1StSK4 = this.presenterDelegate;
if (sz1StSK4 == null || (str4 = sz1StSK4.getAlertContinueButtonText()) == null) {
str4 = "";
}
Sz1StSK sz1StSK5 = this.presenterDelegate;
if (sz1StSK5 == null || (str5 = sz1StSK5.getAlertCloseButtonText()) == null) {
str5 = "";
}
this.advertisement.setIncentivizedText(str2, str3, str4, str5);
if (szHS.getGDPRIsCountryDataProtected() && ttHtzKt.SKHKzK("unknown", H1KHK.INSTANCE.getConsentStatus())) {
z2 = true;
}
this.vungleWebClient.setConsentStatus(z2, szHS.getGDPRConsentTitle(), szHS.getGDPRConsentMessage(), szHS.getGDPRButtonAccept(), szHS.getGDPRButtonDeny());
if (z2) {
H1KHK.INSTANCE.updateGdprConsent("opted_out_by_timeout", "vungle_modal", "");
}
int showCloseDelay = this.advertisement.getShowCloseDelay(Boolean.valueOf(this.placement.getIsIncentivized()));
if (showCloseDelay > 0) {
getScheduler().schedule(new K1Hz1(this, 19), showCloseDelay);
} else {
this.backEnabled = true;
}
SztSKK1K sztSKK1K = this.bus;
if (sztSKK1K != null) {
sztSKK1K.onNext("start", null, this.placement.getReferenceId());
}
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().start();
return;
}
return;
}
reportErrorAndCloseAd(new KKzHKK());
}
@Override
public boolean processCommand(String str, JsonObject jsonObject) {
float parseFloat;
SztSKK1K sztSKK1K;
BidPayload bidPayload;
ttHtzKt.tzttS1SS1(str, "command");
ttHtzKt.tzttS1SS1(jsonObject, "arguments");
Handler handler = new Handler(Looper.getMainLooper());
String str2 = null;
switch (str.hashCode()) {
case -1912374177:
if (str.equals(SUCCESSFUL_VIEW)) {
SztSKK1K sztSKK1K2 = this.bus;
if (sztSKK1K2 != null) {
sztSKK1K2.onNext(SUCCESSFUL_VIEW, null, this.placement.getReferenceId());
}
if (this.placement.getIsIncentivized() && SzHS.INSTANCE.isReportIncentivizedEnabled() && !this.sendReportIncentivized.getAndSet(true)) {
this.executor.execute(new HtKHH(this, 16));
}
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case -1422950858:
if (str.equals("action")) {
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case -735200587:
if (str.equals(ACTION_WITH_VALUE)) {
KtK1t ktK1t = KtK1t.INSTANCE;
String contentStringValue = ktK1t.getContentStringValue(jsonObject, "event");
String contentStringValue2 = ktK1t.getContentStringValue(jsonObject, "value");
if (ttHtzKt.SKHKzK(contentStringValue, "videoViewed")) {
if (contentStringValue2 != null) {
try {
parseFloat = Float.parseFloat(contentStringValue2);
} catch (NumberFormatException unused) {
Log.e(TAG, "value for videoViewed is null !");
}
sztSKK1K = this.bus;
if (sztSKK1K != null && parseFloat > 0.0f && !this.adViewed) {
this.adViewed = true;
if (sztSKK1K != null) {
sztSKK1K.onNext("adViewed", null, this.placement.getReferenceId());
}
bidPayload = this.bidPayload;
if (bidPayload != null) {
KHz1HHt1 kHz1HHt1 = new KHz1HHt1(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List<String> impression = bidPayload.getImpression();
if (impression != null) {
Iterator<T> it = impression.iterator();
while (it.hasNext()) {
kHz1HHt1.sendTpat((String) it.next(), this.executor);
}
}
}
}
}
parseFloat = 0.0f;
sztSKK1K = this.bus;
if (sztSKK1K != null) {
this.adViewed = true;
if (sztSKK1K != null) {
}
bidPayload = this.bidPayload;
if (bidPayload != null) {
}
}
}
if (ttHtzKt.SKHKzK(contentStringValue, VIDEO_LENGTH)) {
handler.post(new tSHtKS1zS(this, 16));
}
handler.post(new zHtz1KH(this, 16));
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case -660787472:
if (str.equals(CONSENT_ACTION)) {
String contentStringValue3 = KtK1t.INSTANCE.getContentStringValue(jsonObject, "event");
t1SKHKS1t t1skhks1t = t1SKHKS1t.OPT_OUT;
H1KHK.INSTANCE.updateGdprConsent(ttHtzKt.SKHKzK(contentStringValue3, t1skhks1t.getValue()) ? t1skhks1t.getValue() : t1SKHKS1t.OPT_IN.getValue(), "vungle_modal", null);
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case -511324706:
if (str.equals("openPrivacy")) {
String contentStringValue4 = KtK1t.INSTANCE.getContentStringValue(jsonObject, "url");
if (!(contentStringValue4 == null || contentStringValue4.length() == 0) && SK1Ht1.INSTANCE.isValidUrl(contentStringValue4)) {
Context context = this.adWidget.getContext();
ttHtzKt.tz(context, "adWidget.context");
if (!H1KtStKSS.launch(null, contentStringValue4, context, true, new t1Httz1Ht(this.bus, this.placement.getReferenceId()), null)) {
new Hzt1zz(contentStringValue4).logErrorNoReturnValue$vungle_ads_release();
}
return true;
}
if (contentStringValue4 == null) {
contentStringValue4 = "nonePrivacyUrl";
}
new Hzt1zz(contentStringValue4).setPlacementId$vungle_ads_release(this.placement.getReferenceId()).setCreativeId$vungle_ads_release(this.advertisement.getCreativeId()).setEventId$vungle_ads_release(this.advertisement.eventId()).logErrorNoReturnValue$vungle_ads_release();
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case -418575596:
break;
case -348095344:
if (str.equals(USE_CUSTOM_PRIVACY)) {
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 3417674:
break;
case 3566511:
if (str.equals("tpat")) {
String contentStringValue5 = KtK1t.INSTANCE.getContentStringValue(jsonObject, "event");
if (contentStringValue5 == null || contentStringValue5.length() == 0) {
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(129, "Empty tpat key", this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return true;
}
KHz1HHt1 kHz1HHt12 = new KHz1HHt1(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List tpatUrls$default = AdPayload.getTpatUrls$default(this.advertisement, contentStringValue5, null, 2, null);
if (tpatUrls$default != null) {
Iterator it2 = tpatUrls$default.iterator();
while (it2.hasNext()) {
kHz1HHt12.sendTpat((String) it2.next(), this.executor);
}
}
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 94756344:
if (str.equals("close")) {
closeView();
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 96784904:
if (str.equals("error")) {
KtK1t ktK1t2 = KtK1t.INSTANCE;
final String contentStringValue6 = ktK1t2.getContentStringValue(jsonObject, "code");
final boolean parseBoolean = Boolean.parseBoolean(ktK1t2.getContentStringValue(jsonObject, "fatal"));
final String contentStringValue7 = ktK1t2.getContentStringValue(jsonObject, "errorMessage");
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(parseBoolean ? 317 : 301, ttSHtSH.tzttS1SS1(contentStringValue6, " : ", contentStringValue7), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
SKtS.INSTANCE.runOnUiThread(new Runnable() {
@Override
public final void run() {
com.vungle.ads.internal.presenter.SKHKzK.m80processCommand$lambda7(com.vungle.ads.internal.presenter.SKHKzK.this, parseBoolean, contentStringValue6, contentStringValue7);
}
});
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 133423073:
if (str.equals(SET_ORIENTATION_PROPERTIES)) {
String contentStringValue8 = KtK1t.INSTANCE.getContentStringValue(jsonObject, "forceOrientation");
if (!(contentStringValue8 == null || contentStringValue8.length() == 0)) {
Locale locale = Locale.ENGLISH;
ttHtzKt.tz(locale, "ENGLISH");
String lowerCase = contentStringValue8.toLowerCase(locale);
ttHtzKt.tz(lowerCase, "this as java.lang.String).toLowerCase(locale)");
if (ttHtzKt.SKHKzK(lowerCase, "landscape")) {
this.adWidget.setOrientation(6);
} else if (ttHtzKt.SKHKzK(lowerCase, "portrait")) {
this.adWidget.setOrientation(7);
}
}
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 1614272768:
if (str.equals(USE_CUSTOM_CLOSE)) {
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
case 1850430989:
if (str.equals(CREATIVE_HEARTBEAT)) {
if (this.heartbeatEnabled) {
handler.post(new tzzztH(this, 17));
}
return true;
}
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
default:
com.vungle.ads.SKHKzK.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(str), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(str));
return true;
}
}
public final void setAdStartTime$vungle_ads_release(Long l) {
this.adStartTime = l;
}
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(SztSKK1K sztSKK1K) {
this.bus = sztSKK1K;
}
public final void setEventListener(SztSKK1K sztSKK1K) {
this.bus = sztSKK1K;
}
public final void setHeartbeatEnabled$vungle_ads_release(boolean z) {
this.heartbeatEnabled = z;
}
public final void setPresenterDelegate$vungle_ads_release(Sz1StSK sz1StSK) {
this.presenterDelegate = sz1StSK;
}
public final void setUserId$vungle_ads_release(String str) {
this.userId = str;
}
public final void start() {
Log.d(TAG, "start()");
this.adWidget.resumeWeb();
setAdVisibility(true);
if (SzHS.INSTANCE.adLoadOptimizationEnabled()) {
recordPlayAssetMetric();
}
}
public final void stop() {
Log.d(TAG, "stop()");
this.adWidget.pauseWeb();
setAdVisibility(false);
}
}