Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 MRAIDPresenter.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 com.amazon.device.ads.DtbDeviceDataRetriever;
import com.vungle.ads.AdNotLoadedCantPlay;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.InternalError;
import com.vungle.ads.PrivacyUrlError;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.ClickCoordinateTracker;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.privacy.PrivacyConsent;
import com.vungle.ads.internal.protos.Sdk$SDKMetric;
import com.vungle.ads.internal.util.SuspendableTimer;
import java.io.File;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.LazyThreadSafetyMode;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.json.JsonObject;
import myobfuscated.ej2.b0;
import myobfuscated.hj2.a;
import myobfuscated.ik2.h;
import myobfuscated.k9.m;
import myobfuscated.kj2.e;
import myobfuscated.kj2.i;
import myobfuscated.lj2.d;
import myobfuscated.qj2.e;
import myobfuscated.vj2.c;
import myobfuscated.wj2.f;
import myobfuscated.wj2.j;
import myobfuscated.wj2.l;
import org.jetbrains.annotations.NotNull;
public final class MRAIDPresenter implements c.a, c.b {
@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 a Companion = new a(null);
@NotNull
public static final String ERROR = "error";
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 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
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 myobfuscated.vj2.a adWidget;
@NotNull
private final myobfuscated.kj2.a advertisement;
private boolean backEnabled;
private final BidPayload bidPayload;
private myobfuscated.qj2.a bus;
@NotNull
private final h clickCoordinateTracker$delegate;
@NotNull
private Executor executor;
@NotNull
private final h executors$delegate;
private boolean heartbeatEnabled;
@NotNull
private final AtomicBoolean isDestroying;
@NotNull
private final myobfuscated.nj2.b omTracker;
@NotNull
private final h pathProvider$delegate;
@NotNull
private final i placement;
private e presenterDelegate;
@NotNull
private final h scheduler$delegate;
@NotNull
private final AtomicBoolean sendReportIncentivized;
@NotNull
private final h suspendableTimer$delegate;
private String userId;
@NotNull
private final h vungleApiClient$delegate;
@NotNull
private final myobfuscated.uj2.e vungleWebClient;
public static final class a {
private 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 getOPEN$vungle_ads_release$annotations() {
}
public static void getOPEN_PRIVACY$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 getVIDEO_LENGTH$vungle_ads_release$annotations() {
}
public static void getVIDEO_VIEWED$vungle_ads_release$annotations() {
}
}
public static final class b implements myobfuscated.uj2.c {
public b() {
MRAIDPresenter.this = r1;
}
@Override
public void onDeeplinkClick(boolean z) {
List<String> tpatUrls = MRAIDPresenter.this.advertisement.getTpatUrls("deeplink.click", String.valueOf(z));
myobfuscated.lj2.e eVar = new myobfuscated.lj2.e(MRAIDPresenter.this.getVungleApiClient$vungle_ads_release(), MRAIDPresenter.this.placement.getReferenceId(), MRAIDPresenter.this.advertisement.getCreativeId(), MRAIDPresenter.this.advertisement.eventId(), MRAIDPresenter.this.getExecutors().getIoExecutor(), MRAIDPresenter.this.getPathProvider());
if (tpatUrls != null) {
MRAIDPresenter mRAIDPresenter = MRAIDPresenter.this;
for (String str : tpatUrls) {
eVar.sendTpat(str, mRAIDPresenter.executor);
}
}
}
}
public static final class c implements myobfuscated.lj2.b<Void> {
@Override
public void onFailure(myobfuscated.lj2.a<Void> aVar, Throwable th) {
Log.d(MRAIDPresenter.TAG, "send RI Failure");
}
@Override
public void onResponse(myobfuscated.lj2.a<Void> aVar, d<Void> dVar) {
Log.d(MRAIDPresenter.TAG, "send RI success");
}
}
public MRAIDPresenter(@NotNull myobfuscated.vj2.a adWidget, @NotNull myobfuscated.kj2.a advertisement, @NotNull i placement, @NotNull myobfuscated.uj2.e vungleWebClient, @NotNull Executor executor, @NotNull myobfuscated.nj2.b omTracker, BidPayload bidPayload) {
Intrinsics.checkNotNullParameter(adWidget, "adWidget");
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
Intrinsics.checkNotNullParameter(placement, "placement");
Intrinsics.checkNotNullParameter(vungleWebClient, "vungleWebClient");
Intrinsics.checkNotNullParameter(executor, "executor");
Intrinsics.checkNotNullParameter(omTracker, "omTracker");
this.adWidget = adWidget;
this.advertisement = advertisement;
this.placement = placement;
this.vungleWebClient = vungleWebClient;
this.executor = executor;
this.omTracker = omTracker;
this.bidPayload = bidPayload;
this.isDestroying = new AtomicBoolean(false);
this.sendReportIncentivized = new AtomicBoolean(false);
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
this.vungleApiClient$delegate = kotlin.a.a(lazyThreadSafetyMode, new Function0<VungleApiClient>() {
{
super(0);
}
@Override
@NotNull
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getOrBuild$vungle_ads_release(VungleApiClient.class);
}
});
final Context context2 = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context2, "adWidget.context");
this.executors$delegate = kotlin.a.a(lazyThreadSafetyMode, new Function0<myobfuscated.hj2.a>() {
{
super(0);
}
@Override
@NotNull
public final a invoke() {
return ServiceLocator.Companion.getInstance(context2).getOrBuild$vungle_ads_release(a.class);
}
});
final Context context3 = adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context3, "adWidget.context");
this.pathProvider$delegate = kotlin.a.a(lazyThreadSafetyMode, new Function0<j>() {
{
super(0);
}
@Override
@NotNull
public final j invoke() {
return ServiceLocator.Companion.getInstance(context3).getOrBuild$vungle_ads_release(j.class);
}
});
this.scheduler$delegate = kotlin.a.b(new Function0<f>() {
@Override
@NotNull
public final f invoke() {
return new f();
}
});
this.suspendableTimer$delegate = kotlin.a.b(new Function0<SuspendableTimer>() {
{
super(0);
}
@Override
@NotNull
public final SuspendableTimer invoke() {
final MRAIDPresenter mRAIDPresenter = MRAIDPresenter.this;
return new SuspendableTimer(6.0d, true, null, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(318, "Error ad template missing Heartbeat", MRAIDPresenter.this.placement.getReferenceId(), MRAIDPresenter.this.advertisement.getCreativeId(), MRAIDPresenter.this.advertisement.eventId());
MRAIDPresenter.this.reportErrorAndCloseAd(new InternalError(VungleError.HEARTBEAT_ERROR, null, 2, null));
}
}, 4, null);
}
});
this.clickCoordinateTracker$delegate = kotlin.a.b(new Function0<ClickCoordinateTracker>() {
{
super(0);
}
@Override
@NotNull
public final ClickCoordinateTracker invoke() {
myobfuscated.vj2.a aVar;
aVar = MRAIDPresenter.this.adWidget;
Context context4 = aVar.getContext();
Intrinsics.checkNotNullExpressionValue(context4, "adWidget.context");
return new ClickCoordinateTracker(context4, MRAIDPresenter.this.advertisement, MRAIDPresenter.this.executor);
}
});
}
private final void closeView() {
this.adWidget.close();
}
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 final myobfuscated.hj2.a getExecutors() {
return (myobfuscated.hj2.a) this.executors$delegate.getValue();
}
public static void getHeartbeatEnabled$vungle_ads_release$annotations() {
}
public final j getPathProvider() {
return (j) this.pathProvider$delegate.getValue();
}
private final f getScheduler() {
return (f) this.scheduler$delegate.getValue();
}
public static void getSuspendableTimer$vungle_ads_release$annotations() {
}
public static void getUserId$vungle_ads_release$annotations() {
}
public static void getVungleApiClient$vungle_ads_release$annotations() {
}
private final void handleWebViewException(VungleError vungleError, boolean z, String str) {
Log.e(TAG, "handleWebViewException: " + vungleError.getLocalizedMessage() + ", fatal: " + z + ", errorMsg: " + str);
if (z) {
makeBusError(vungleError);
closeView();
}
}
public static void handleWebViewException$default(MRAIDPresenter mRAIDPresenter, VungleError vungleError, boolean z, String str, int i, Object obj) {
if ((i & 4) != 0) {
str = null;
}
mRAIDPresenter.handleWebViewException(vungleError, z, str);
}
public static void isDestroying$vungle_ads_release$annotations() {
}
private final boolean loadMraid(File file) {
String parent = file.getParent();
File file2 = parent != null ? new File(parent) : null;
StringBuilder sb = new StringBuilder();
sb.append(file2 != null ? file2.getPath() : null);
File file3 = new File(e.m(sb, File.separator, "index.html"));
if (file3.exists()) {
myobfuscated.vj2.a aVar = this.adWidget;
aVar.showWebsite(myobfuscated.kj2.a.FILE_SCHEME + file3.getPath());
return true;
}
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.logError$vungle_ads_release(310, "Fail to load html " + file3.getPath(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return false;
}
private final void makeBusError(VungleError vungleError) {
myobfuscated.qj2.a aVar = this.bus;
if (aVar != null) {
aVar.onError(vungleError, this.placement.getReferenceId());
}
}
public static final void m275prepare$lambda11(MRAIDPresenter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.backEnabled = true;
}
public static final void m276processCommand$lambda3(MRAIDPresenter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.vungleWebClient.notifyPropertiesChange(true);
}
public static final void m277processCommand$lambda4(MRAIDPresenter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.adWidget.setVisibility(0);
}
public static final void m278processCommand$lambda6(MRAIDPresenter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
String referenceId = this$0.placement.getReferenceId();
myobfuscated.lj2.a<Void> ri = this$0.getVungleApiClient$vungle_ads_release().ri(new e.g((List) null, (Boolean) null, (String) null, this$0.adStartTime, this$0.advertisement.appId(), referenceId, this$0.userId, 7, (DefaultConstructorMarker) null));
if (ri == null) {
Log.e(TAG, "Invalid ri call.");
} else {
ri.enqueue(new c());
}
}
public static final void m279processCommand$lambda7(MRAIDPresenter this$0, boolean z, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.handleWebViewException(new InternalError(VungleError.CREATIVE_ERROR, null, 2, null), z, myobfuscated.b02.b.n(str, " : ", str2));
}
public static final void m280processCommand$lambda8(MRAIDPresenter this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getSuspendableTimer$vungle_ads_release().reset();
}
private final void recordPlayAssetMetric() {
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(new b0(this.advertisement.getAssetsFullyDownloaded() ? Sdk$SDKMetric.SDKMetricType.LOCAL_ASSETS_USED : Sdk$SDKMetric.SDKMetricType.REMOTE_ASSETS_USED), (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(VungleError vungleError) {
makeBusError(vungleError);
closeView();
}
public final void detach(int i) {
myobfuscated.qj2.a aVar;
Log.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();
}
}
public final Long getAdStartTime$vungle_ads_release() {
return this.adStartTime;
}
public final boolean getBackEnabled$vungle_ads_release() {
return this.backEnabled;
}
public final myobfuscated.qj2.a getBus() {
return this.bus;
}
@NotNull
public final ClickCoordinateTracker getClickCoordinateTracker$vungle_ads_release() {
return (ClickCoordinateTracker) this.clickCoordinateTracker$delegate.getValue();
}
public final boolean getHeartbeatEnabled$vungle_ads_release() {
return this.heartbeatEnabled;
}
@NotNull
public final SuspendableTimer getSuspendableTimer$vungle_ads_release() {
return (SuspendableTimer) this.suspendableTimer$delegate.getValue();
}
public final String getUserId$vungle_ads_release() {
return this.userId;
}
@NotNull
public final VungleApiClient getVungleApiClient$vungle_ads_release() {
return (VungleApiClient) this.vungleApiClient$delegate.getValue();
}
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 errorDesc, boolean z) {
Intrinsics.checkNotNullParameter(errorDesc, "errorDesc");
if (z) {
reportErrorAndCloseAd(new InternalError(VungleError.AD_RENDER_NETWORK_ERROR, null, 2, null));
}
}
@Override
public void onRenderProcessUnresponsive(WebView webView, WebViewRenderProcess webViewRenderProcess) {
handleWebViewException$default(this, new InternalError(VungleError.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 InternalError(VungleError.WEB_CRASH, null, 2, null), true, null, 4, null);
return true;
}
public final void prepare() {
int settings;
boolean z = false;
this.isDestroying.set(false);
this.adWidget.linkWebView(this.vungleWebClient);
myobfuscated.ej2.b adConfig = this.advertisement.getAdConfig();
if (adConfig != null && (settings = adConfig.getSettings()) > 0) {
this.backEnabled = (settings & 2) == 2;
}
myobfuscated.fj2.a aVar = myobfuscated.fj2.a.INSTANCE;
this.heartbeatEnabled = aVar.heartbeatEnabled();
myobfuscated.ej2.b 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()) {
reportErrorAndCloseAd(new AdNotLoadedCantPlay());
return;
}
StringBuilder sb = new StringBuilder();
sb.append(assetDirectory.getPath());
if (!loadMraid(new File(e.m(sb, File.separator, myobfuscated.kj2.a.KEY_TEMPLATE)))) {
reportErrorAndCloseAd(new AdNotLoadedCantPlay());
return;
}
this.adStartTime = Long.valueOf(System.currentTimeMillis());
myobfuscated.qj2.e eVar = this.presenterDelegate;
this.userId = eVar != null ? eVar.getUserId() : null;
myobfuscated.qj2.e eVar2 = this.presenterDelegate;
String str = (eVar2 == null || (str = eVar2.getAlertTitleText()) == null) ? "" : "";
myobfuscated.qj2.e eVar3 = this.presenterDelegate;
String str2 = (eVar3 == null || (str2 = eVar3.getAlertBodyText()) == null) ? "" : "";
myobfuscated.qj2.e eVar4 = this.presenterDelegate;
String str3 = (eVar4 == null || (str3 = eVar4.getAlertContinueButtonText()) == null) ? "" : "";
myobfuscated.qj2.e eVar5 = this.presenterDelegate;
this.advertisement.setIncentivizedText(str, str2, str3, (eVar5 == null || (r8 = eVar5.getAlertCloseButtonText()) == null) ? "" : "");
if (aVar.getGDPRIsCountryDataProtected() && Intrinsics.c("unknown", myobfuscated.rj2.a.INSTANCE.getConsentStatus())) {
z = true;
}
this.vungleWebClient.setConsentStatus(z, aVar.getGDPRConsentTitle(), aVar.getGDPRConsentMessage(), aVar.getGDPRButtonAccept(), aVar.getGDPRButtonDeny());
if (z) {
myobfuscated.rj2.a.INSTANCE.updateGdprConsent("opted_out_by_timeout", "vungle_modal", "");
}
int showCloseDelay = this.advertisement.getShowCloseDelay(Boolean.valueOf(this.placement.isIncentivized()));
if (showCloseDelay > 0) {
getScheduler().schedule(new myobfuscated.oo1.e(this, 29), showCloseDelay);
} else {
this.backEnabled = true;
}
myobfuscated.qj2.a aVar2 = this.bus;
if (aVar2 != null) {
aVar2.onNext("start", null, this.placement.getReferenceId());
}
if (this.heartbeatEnabled) {
getSuspendableTimer$vungle_ads_release().start();
}
}
@Override
public boolean processCommand(@NotNull String command, @NotNull JsonObject arguments) {
float parseFloat;
myobfuscated.qj2.a aVar;
BidPayload bidPayload;
Intrinsics.checkNotNullParameter(command, "command");
Intrinsics.checkNotNullParameter(arguments, "arguments");
Handler handler = new Handler(Looper.getMainLooper());
String str = null;
switch (command.hashCode()) {
case -1912374177:
if (command.equals(SUCCESSFUL_VIEW)) {
myobfuscated.qj2.a aVar2 = this.bus;
if (aVar2 != null) {
aVar2.onNext(SUCCESSFUL_VIEW, null, this.placement.getReferenceId());
}
if (this.placement.isIncentivized() && myobfuscated.fj2.a.INSTANCE.isReportIncentivizedEnabled() && !this.sendReportIncentivized.getAndSet(true)) {
this.executor.execute(new myobfuscated.tq1.h(this, 16));
}
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case -1422950858:
if (command.equals(ACTION)) {
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case -735200587:
if (command.equals(ACTION_WITH_VALUE)) {
myobfuscated.wj2.h hVar = myobfuscated.wj2.h.INSTANCE;
String contentStringValue = hVar.getContentStringValue(arguments, "event");
String contentStringValue2 = hVar.getContentStringValue(arguments, "value");
if (Intrinsics.c(contentStringValue, "videoViewed")) {
if (contentStringValue2 != null) {
try {
parseFloat = Float.parseFloat(contentStringValue2);
} catch (NumberFormatException unused) {
Log.e(TAG, "value for videoViewed is null !");
}
aVar = this.bus;
if (aVar != null && parseFloat > 0.0f && !this.adViewed) {
this.adViewed = true;
if (aVar != null) {
aVar.onNext("adViewed", null, this.placement.getReferenceId());
}
bidPayload = this.bidPayload;
if (bidPayload != null) {
myobfuscated.lj2.e eVar = new myobfuscated.lj2.e(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List<String> impression = bidPayload.getImpression();
if (impression != null) {
for (String str2 : impression) {
eVar.sendTpat(str2, this.executor);
}
}
}
}
}
parseFloat = 0.0f;
aVar = this.bus;
if (aVar != null) {
this.adViewed = true;
if (aVar != null) {
}
bidPayload = this.bidPayload;
if (bidPayload != null) {
}
}
}
if (Intrinsics.c(contentStringValue, VIDEO_LENGTH)) {
handler.post(new myobfuscated.ej2.i(this, 2));
}
handler.post(new myobfuscated.e81.a(this, 26));
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case -660787472:
if (command.equals(CONSENT_ACTION)) {
String contentStringValue3 = myobfuscated.wj2.h.INSTANCE.getContentStringValue(arguments, "event");
PrivacyConsent privacyConsent = PrivacyConsent.OPT_OUT;
myobfuscated.rj2.a.INSTANCE.updateGdprConsent(Intrinsics.c(contentStringValue3, privacyConsent.getValue()) ? privacyConsent.getValue() : PrivacyConsent.OPT_IN.getValue(), "vungle_modal", null);
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case -511324706:
if (command.equals("openPrivacy")) {
String contentStringValue4 = myobfuscated.wj2.h.INSTANCE.getContentStringValue(arguments, "url");
if (contentStringValue4 == null || contentStringValue4.length() == 0 || !myobfuscated.wj2.e.INSTANCE.isValidUrl(contentStringValue4)) {
if (contentStringValue4 == null) {
contentStringValue4 = "nonePrivacyUrl";
}
new PrivacyUrlError(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;
}
Context context = this.adWidget.getContext();
Intrinsics.checkNotNullExpressionValue(context, "adWidget.context");
if (!myobfuscated.wj2.d.launch(null, contentStringValue4, context, true, new myobfuscated.uj2.d(this.bus, this.placement.getReferenceId()), null)) {
new PrivacyUrlError(contentStringValue4).logErrorNoReturnValue$vungle_ads_release();
}
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case -418575596:
break;
case -348095344:
if (command.equals(USE_CUSTOM_PRIVACY)) {
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 3417674:
break;
case 3566511:
if (command.equals("tpat")) {
String contentStringValue5 = myobfuscated.wj2.h.INSTANCE.getContentStringValue(arguments, "event");
if (contentStringValue5 == null || contentStringValue5.length() == 0) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(129, "Empty tpat key", this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return true;
}
myobfuscated.lj2.e eVar2 = new myobfuscated.lj2.e(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List<String> tpatUrls$default = myobfuscated.kj2.a.getTpatUrls$default(this.advertisement, contentStringValue5, null, 2, null);
if (tpatUrls$default != null) {
for (String str3 : tpatUrls$default) {
eVar2.sendTpat(str3, this.executor);
}
}
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 94756344:
if (command.equals(CLOSE)) {
closeView();
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 96784904:
if (command.equals(ERROR)) {
myobfuscated.wj2.h hVar2 = myobfuscated.wj2.h.INSTANCE;
String contentStringValue6 = hVar2.getContentStringValue(arguments, "code");
boolean parseBoolean = Boolean.parseBoolean(hVar2.getContentStringValue(arguments, "fatal"));
String contentStringValue7 = hVar2.getContentStringValue(arguments, "errorMessage");
AnalyticsClient.INSTANCE.logError$vungle_ads_release(parseBoolean ? 317 : 301, myobfuscated.b02.b.n(contentStringValue6, " : ", contentStringValue7), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
l.INSTANCE.runOnUiThread(new m(this, parseBoolean, contentStringValue6, contentStringValue7));
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 133423073:
if (command.equals(SET_ORIENTATION_PROPERTIES)) {
String contentStringValue8 = myobfuscated.wj2.h.INSTANCE.getContentStringValue(arguments, "forceOrientation");
if (contentStringValue8 != null && contentStringValue8.length() != 0) {
Locale locale = Locale.ENGLISH;
String v = myobfuscated.b0.b.v(locale, "ENGLISH", contentStringValue8, locale, "this as java.lang.String).toLowerCase(locale)");
if (Intrinsics.c(v, "landscape")) {
this.adWidget.setOrientation(6);
} else if (Intrinsics.c(v, DtbDeviceDataRetriever.ORIENTATION_PORTRAIT)) {
this.adWidget.setOrientation(7);
}
}
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 1614272768:
if (command.equals(USE_CUSTOM_CLOSE)) {
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
case 1850430989:
if (command.equals(CREATIVE_HEARTBEAT)) {
if (this.heartbeatEnabled) {
handler.post(new myobfuscated.ej2.d(this, 4));
}
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
return true;
default:
AnalyticsClient.INSTANCE.logError$vungle_ads_release(311, "Unknown MRAID Command: ".concat(command), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
Log.w(TAG, "processCommand# Unknown MRAID Command: ".concat(command));
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(myobfuscated.qj2.a aVar) {
this.bus = aVar;
}
public final void setEventListener(myobfuscated.qj2.a aVar) {
this.bus = aVar;
}
public final void setHeartbeatEnabled$vungle_ads_release(boolean z) {
this.heartbeatEnabled = z;
}
public final void setPresenterDelegate$vungle_ads_release(myobfuscated.qj2.e eVar) {
this.presenterDelegate = eVar;
}
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 (myobfuscated.fj2.a.INSTANCE.adLoadOptimizationEnabled()) {
recordPlayAssetMetric();
}
}
public final void stop() {
Log.d(TAG, "stop()");
this.adWidget.pauseWeb();
setAdVisibility(false);
}
}