Currency Plus v2.10.8版本的 MD5 值为:8586f74edd9ace5aa261a19c9da51484
以下内容为反编译后的 e.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 cm.x;
import com.amazon.device.ads.DtbDeviceDataRetriever;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.vungle.ads.AdNotLoadedCantPlay;
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.protos.Sdk$SDKMetric;
import com.vungle.ads.internal.util.j;
import com.vungle.ads.internal.util.m;
import com.vungle.ads.j0;
import fi.a0;
import java.io.File;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import sg.g;
import sg.k;
import ti.l;
import ti.n;
import xg.c;
public final class e implements c.a, c.b {
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 a Companion = new a(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 xg.a adWidget;
private final sg.b advertisement;
private boolean backEnabled;
private final sg.e bidPayload;
private com.vungle.ads.internal.presenter.a bus;
private final fi.i clickCoordinateTracker$delegate;
private Executor executor;
private final fi.i executors$delegate;
private boolean heartbeatEnabled;
private final AtomicBoolean isDestroying;
private final ug.c omTracker;
private final fi.i pathProvider$delegate;
private final k placement;
private com.vungle.ads.internal.presenter.h presenterDelegate;
private final fi.i scheduler$delegate;
private final AtomicBoolean sendReportIncentivized;
private final fi.i suspendableTimer$delegate;
private String userId;
private final fi.i vungleApiClient$delegate;
private final com.vungle.ads.internal.ui.e vungleWebClient;
public static final class a {
private a() {
}
public a(ti.g gVar) {
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 extends n implements si.a<com.vungle.ads.internal.b> {
public b() {
super(0);
e.this = r1;
}
@Override
public final com.vungle.ads.internal.b invoke() {
Context context = e.this.adWidget.getContext();
l.e(context, "adWidget.context");
return new com.vungle.ads.internal.b(context, e.this.advertisement, e.this.executor);
}
}
public static final class c implements com.vungle.ads.internal.ui.c {
public c() {
e.this = r1;
}
@Override
public void onDeeplinkClick(boolean z10) {
List<String> tpatUrls = e.this.advertisement.getTpatUrls("deeplink.click", String.valueOf(z10));
com.vungle.ads.internal.network.f fVar = new com.vungle.ads.internal.network.f(e.this.getVungleApiClient$vungle_ads_release(), e.this.placement.getReferenceId(), e.this.advertisement.getCreativeId(), e.this.advertisement.eventId(), e.this.getExecutors().getIoExecutor(), e.this.getPathProvider());
if (tpatUrls != null) {
e eVar = e.this;
for (String str : tpatUrls) {
fVar.sendTpat(str, eVar.executor);
}
}
}
}
public static final class d implements com.vungle.ads.internal.network.b<Void> {
@Override
public void onFailure(com.vungle.ads.internal.network.a<Void> aVar, Throwable th2) {
Log.d(e.TAG, "send RI Failure");
}
@Override
public void onResponse(com.vungle.ads.internal.network.a<Void> aVar, com.vungle.ads.internal.network.d<Void> dVar) {
Log.d(e.TAG, "send RI success");
}
}
public static final class C0320e extends n implements si.a<com.vungle.ads.internal.util.f> {
public static final C0320e INSTANCE = new C0320e();
public C0320e() {
super(0);
}
@Override
public final com.vungle.ads.internal.util.f invoke() {
return new com.vungle.ads.internal.util.f();
}
}
public static final class f extends n implements si.a<com.vungle.ads.internal.network.h> {
final Context $context;
public f(Context context) {
super(0);
this.$context = context;
}
@Override
public final com.vungle.ads.internal.network.h invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(com.vungle.ads.internal.network.h.class);
}
}
public static final class g extends n implements si.a<qg.a> {
final Context $context;
public g(Context context) {
super(0);
this.$context = context;
}
@Override
public final qg.a invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(qg.a.class);
}
}
public static final class h extends n implements si.a<j> {
final Context $context;
public h(Context context) {
super(0);
this.$context = context;
}
@Override
public final j invoke() {
return ServiceLocator.Companion.getInstance(this.$context).getOrBuild$vungle_ads_release(j.class);
}
}
public static final class i extends n implements si.a<com.vungle.ads.internal.util.l> {
public static final class a extends n implements si.a<a0> {
final e this$0;
public a(e eVar) {
super(0);
this.this$0 = eVar;
}
@Override
public a0 invoke() {
invoke2();
return a0.f17744a;
}
public final void invoke2() {
com.vungle.ads.d.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 InternalError(VungleError.HEARTBEAT_ERROR, null, 2, null));
}
}
public i() {
super(0);
e.this = r1;
}
@Override
public final com.vungle.ads.internal.util.l invoke() {
return new com.vungle.ads.internal.util.l(e.HEARTBEAT_INTERVAL, true, null, new a(e.this), 4, null);
}
}
public e(xg.a aVar, sg.b bVar, k kVar, com.vungle.ads.internal.ui.e eVar, Executor executor, ug.c cVar, sg.e eVar2) {
l.f(aVar, "adWidget");
l.f(bVar, "advertisement");
l.f(kVar, xa.c.PLACEMENT);
l.f(eVar, "vungleWebClient");
l.f(executor, "executor");
l.f(cVar, "omTracker");
this.adWidget = aVar;
this.advertisement = bVar;
this.placement = kVar;
this.vungleWebClient = eVar;
this.executor = executor;
this.omTracker = cVar;
this.bidPayload = eVar2;
this.isDestroying = new AtomicBoolean(false);
this.sendReportIncentivized = new AtomicBoolean(false);
ServiceLocator.Companion companion = ServiceLocator.Companion;
Context context = aVar.getContext();
l.e(context, "adWidget.context");
fi.k kVar2 = fi.k.f17758a;
this.vungleApiClient$delegate = fi.j.a(kVar2, new f(context));
Context context2 = aVar.getContext();
l.e(context2, "adWidget.context");
this.executors$delegate = fi.j.a(kVar2, new g(context2));
Context context3 = aVar.getContext();
l.e(context3, "adWidget.context");
this.pathProvider$delegate = fi.j.a(kVar2, new h(context3));
this.scheduler$delegate = fi.j.b(C0320e.INSTANCE);
this.suspendableTimer$delegate = fi.j.b(new i());
this.clickCoordinateTracker$delegate = fi.j.b(new b());
}
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 qg.a getExecutors() {
return (qg.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 com.vungle.ads.internal.util.f getScheduler() {
return (com.vungle.ads.internal.util.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 z10, String str) {
Log.e(TAG, "handleWebViewException: " + vungleError.getLocalizedMessage() + ", fatal: " + z10 + ", errorMsg: " + str);
if (z10) {
makeBusError(vungleError);
closeView();
}
}
public static void handleWebViewException$default(e eVar, VungleError vungleError, boolean z10, String str, int i10, Object obj) {
if ((i10 & 4) != 0) {
str = null;
}
eVar.handleWebViewException(vungleError, z10, 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 sb2 = new StringBuilder();
sb2.append(file2 != null ? file2.getPath() : null);
File file3 = new File(ag.d.n(sb2, File.separator, "index.html"));
if (file3.exists()) {
xg.a aVar = this.adWidget;
aVar.showWebsite(sg.b.FILE_SCHEME + file3.getPath());
return true;
}
com.vungle.ads.d dVar = com.vungle.ads.d.INSTANCE;
dVar.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) {
com.vungle.ads.internal.presenter.a aVar = this.bus;
if (aVar != null) {
aVar.onError(vungleError, this.placement.getReferenceId());
}
}
public static final void m99prepare$lambda11(e eVar) {
l.f(eVar, "this$0");
eVar.backEnabled = true;
}
public static final void m100processCommand$lambda3(e eVar) {
l.f(eVar, "this$0");
eVar.vungleWebClient.notifyPropertiesChange(true);
}
public static final void m101processCommand$lambda4(e eVar) {
l.f(eVar, "this$0");
eVar.adWidget.setVisibility(0);
}
public static final void m102processCommand$lambda6(e eVar) {
l.f(eVar, "this$0");
String referenceId = eVar.placement.getReferenceId();
com.vungle.ads.internal.network.a<Void> ri2 = eVar.getVungleApiClient$vungle_ads_release().ri(new g.C0612g((List) null, (Boolean) null, (String) null, eVar.adStartTime, eVar.advertisement.appId(), referenceId, eVar.userId, 7, (ti.g) null));
if (ri2 == null) {
Log.e(TAG, "Invalid ri call.");
} else {
ri2.enqueue(new d());
}
}
public static final void m103processCommand$lambda7(e eVar, boolean z10, String str, String str2) {
l.f(eVar, "this$0");
eVar.handleWebViewException(new InternalError(VungleError.CREATIVE_ERROR, null, 2, null), z10, android.support.v4.media.a.o(str, " : ", str2));
}
public static final void m104processCommand$lambda8(e eVar) {
l.f(eVar, "this$0");
eVar.getSuspendableTimer$vungle_ads_release().reset();
}
private final void recordPlayAssetMetric() {
com.vungle.ads.d.INSTANCE.logMetric$vungle_ads_release(new j0(this.advertisement.getAssetsFullyDownloaded() ? Sdk$SDKMetric.b.LOCAL_ASSETS_USED : Sdk$SDKMetric.b.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 i10) {
com.vungle.ads.internal.presenter.a aVar;
Log.d(TAG, "detach()");
boolean z10 = (i10 & 1) != 0;
boolean z11 = (i10 & 2) != 0;
this.vungleWebClient.setWebViewObserver(null);
this.vungleWebClient.setMraidDelegate(null);
if (!z10 && z11 && !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 com.vungle.ads.internal.presenter.a getBus() {
return this.bus;
}
public final com.vungle.ads.internal.b getClickCoordinateTracker$vungle_ads_release() {
return (com.vungle.ads.internal.b) this.clickCoordinateTracker$delegate.getValue();
}
public final boolean getHeartbeatEnabled$vungle_ads_release() {
return this.heartbeatEnabled;
}
public final com.vungle.ads.internal.util.l getSuspendableTimer$vungle_ads_release() {
return (com.vungle.ads.internal.util.l) this.suspendableTimer$delegate.getValue();
}
public final String getUserId$vungle_ads_release() {
return this.userId;
}
public final com.vungle.ads.internal.network.h getVungleApiClient$vungle_ads_release() {
return (com.vungle.ads.internal.network.h) 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 z10) {
l.f(str, "errorDesc");
if (z10) {
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;
this.isDestroying.set(false);
this.adWidget.linkWebView(this.vungleWebClient);
com.vungle.ads.b adConfig = this.advertisement.getAdConfig();
if (adConfig != null && (settings = adConfig.getSettings()) > 0) {
this.backEnabled = (settings & 2) == 2;
}
com.vungle.ads.internal.c cVar = com.vungle.ads.internal.c.INSTANCE;
this.heartbeatEnabled = cVar.heartbeatEnabled();
com.vungle.ads.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 sb2 = new StringBuilder();
sb2.append(assetDirectory.getPath());
if (!loadMraid(new File(ag.d.n(sb2, File.separator, sg.b.KEY_TEMPLATE)))) {
reportErrorAndCloseAd(new AdNotLoadedCantPlay());
return;
}
this.adStartTime = Long.valueOf(System.currentTimeMillis());
com.vungle.ads.internal.presenter.h hVar = this.presenterDelegate;
this.userId = hVar != null ? hVar.getUserId() : null;
com.vungle.ads.internal.presenter.h hVar2 = this.presenterDelegate;
String str = (hVar2 == null || (str = hVar2.getAlertTitleText()) == null) ? "" : "";
com.vungle.ads.internal.presenter.h hVar3 = this.presenterDelegate;
String str2 = (hVar3 == null || (str2 = hVar3.getAlertBodyText()) == null) ? "" : "";
com.vungle.ads.internal.presenter.h hVar4 = this.presenterDelegate;
String str3 = (hVar4 == null || (str3 = hVar4.getAlertContinueButtonText()) == null) ? "" : "";
com.vungle.ads.internal.presenter.h hVar5 = this.presenterDelegate;
this.advertisement.setIncentivizedText(str, str2, str3, (hVar5 == null || (r8 = hVar5.getAlertCloseButtonText()) == null) ? "" : "");
boolean z10 = cVar.getGDPRIsCountryDataProtected() && l.a("unknown", wg.c.INSTANCE.getConsentStatus());
this.vungleWebClient.setConsentStatus(z10, cVar.getGDPRConsentTitle(), cVar.getGDPRConsentMessage(), cVar.getGDPRButtonAccept(), cVar.getGDPRButtonDeny());
if (z10) {
wg.c.INSTANCE.updateGdprConsent("opted_out_by_timeout", "vungle_modal", "");
}
int showCloseDelay = this.advertisement.getShowCloseDelay(Boolean.valueOf(this.placement.isIncentivized()));
if (showCloseDelay > 0) {
getScheduler().schedule(new com.vungle.ads.internal.presenter.d(this, 0), 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();
}
}
@Override
public boolean processCommand(String str, x xVar) {
float parseFloat;
com.vungle.ads.internal.presenter.a aVar;
sg.e eVar;
l.f(str, "command");
l.f(xVar, "arguments");
Handler handler = new Handler(Looper.getMainLooper());
String str2 = null;
switch (str.hashCode()) {
case -1912374177:
if (str.equals(SUCCESSFUL_VIEW)) {
com.vungle.ads.internal.presenter.a aVar2 = this.bus;
if (aVar2 != null) {
aVar2.onNext(SUCCESSFUL_VIEW, null, this.placement.getReferenceId());
}
if (this.placement.isIncentivized() && com.vungle.ads.internal.c.INSTANCE.isReportIncentivizedEnabled() && !this.sendReportIncentivized.getAndSet(true)) {
this.executor.execute(new com.vungle.ads.internal.presenter.d(this, 3));
}
return true;
}
com.vungle.ads.d.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.d.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)) {
com.vungle.ads.internal.util.h hVar = com.vungle.ads.internal.util.h.INSTANCE;
String contentStringValue = hVar.getContentStringValue(xVar, "event");
String contentStringValue2 = hVar.getContentStringValue(xVar, AppMeasurementSdk.ConditionalUserProperty.VALUE);
if (l.a(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());
}
eVar = this.bidPayload;
if (eVar != null) {
com.vungle.ads.internal.network.f fVar = new com.vungle.ads.internal.network.f(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List<String> impression = eVar.getImpression();
if (impression != null) {
for (String str3 : impression) {
fVar.sendTpat(str3, this.executor);
}
}
}
}
}
parseFloat = 0.0f;
aVar = this.bus;
if (aVar != null) {
this.adViewed = true;
if (aVar != null) {
}
eVar = this.bidPayload;
if (eVar != null) {
}
}
}
if (l.a(contentStringValue, VIDEO_LENGTH)) {
handler.post(new com.vungle.ads.internal.presenter.d(this, 1));
}
handler.post(new com.vungle.ads.internal.presenter.d(this, 2));
return true;
}
com.vungle.ads.d.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 = com.vungle.ads.internal.util.h.INSTANCE.getContentStringValue(xVar, "event");
wg.b bVar = wg.b.OPT_OUT;
wg.c.INSTANCE.updateGdprConsent(l.a(contentStringValue3, bVar.getValue()) ? bVar.getValue() : wg.b.OPT_IN.getValue(), "vungle_modal", null);
return true;
}
com.vungle.ads.d.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 = com.vungle.ads.internal.util.h.INSTANCE.getContentStringValue(xVar, "url");
if (contentStringValue4 == null || contentStringValue4.length() == 0 || !com.vungle.ads.internal.util.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();
l.e(context, "adWidget.context");
if (!com.vungle.ads.internal.util.d.launch(null, contentStringValue4, context, true, new com.vungle.ads.internal.ui.d(this.bus, this.placement.getReferenceId()), null)) {
new PrivacyUrlError(contentStringValue4).logErrorNoReturnValue$vungle_ads_release();
}
return true;
}
com.vungle.ads.d.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.d.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 = com.vungle.ads.internal.util.h.INSTANCE.getContentStringValue(xVar, "event");
if (contentStringValue5 == null || contentStringValue5.length() == 0) {
com.vungle.ads.d.INSTANCE.logError$vungle_ads_release(129, "Empty tpat key", this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return true;
}
com.vungle.ads.internal.network.f fVar2 = new com.vungle.ads.internal.network.f(getVungleApiClient$vungle_ads_release(), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), getPathProvider());
List<String> tpatUrls$default = sg.b.getTpatUrls$default(this.advertisement, contentStringValue5, null, 2, null);
if (tpatUrls$default != null) {
for (String str4 : tpatUrls$default) {
fVar2.sendTpat(str4, this.executor);
}
}
return true;
}
com.vungle.ads.d.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.d.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")) {
com.vungle.ads.internal.util.h hVar2 = com.vungle.ads.internal.util.h.INSTANCE;
String contentStringValue6 = hVar2.getContentStringValue(xVar, "code");
boolean parseBoolean = Boolean.parseBoolean(hVar2.getContentStringValue(xVar, "fatal"));
String contentStringValue7 = hVar2.getContentStringValue(xVar, "errorMessage");
com.vungle.ads.d.INSTANCE.logError$vungle_ads_release(parseBoolean ? 317 : 301, android.support.v4.media.a.o(contentStringValue6, " : ", contentStringValue7), this.placement.getReferenceId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
m.INSTANCE.runOnUiThread(new androidx.fragment.app.b(this, parseBoolean, contentStringValue6, contentStringValue7, 10));
return true;
}
com.vungle.ads.d.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 = com.vungle.ads.internal.util.h.INSTANCE.getContentStringValue(xVar, "forceOrientation");
if (contentStringValue8 != null && contentStringValue8.length() != 0) {
Locale locale = Locale.ENGLISH;
l.e(locale, "ENGLISH");
String lowerCase = contentStringValue8.toLowerCase(locale);
l.e(lowerCase, "this as java.lang.String).toLowerCase(locale)");
if (l.a(lowerCase, DtbDeviceDataRetriever.ORIENTATION_LANDSCAPE)) {
this.adWidget.setOrientation(6);
} else if (l.a(lowerCase, DtbDeviceDataRetriever.ORIENTATION_PORTRAIT)) {
this.adWidget.setOrientation(7);
}
}
return true;
}
com.vungle.ads.d.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.d.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 com.vungle.ads.internal.presenter.d(this, 4));
}
return true;
}
com.vungle.ads.d.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.d.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 l10) {
this.adStartTime = l10;
}
public final void setAdVisibility(boolean z10) {
this.vungleWebClient.setAdVisibility(z10);
}
public final void setBackEnabled$vungle_ads_release(boolean z10) {
this.backEnabled = z10;
}
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 z10) {
this.heartbeatEnabled = z10;
}
public final void setPresenterDelegate$vungle_ads_release(com.vungle.ads.internal.presenter.h hVar) {
this.presenterDelegate = hVar;
}
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 (com.vungle.ads.internal.c.INSTANCE.adLoadOptimizationEnabled()) {
recordPlayAssetMetric();
}
}
public final void stop() {
Log.d(TAG, "stop()");
this.adWidget.pauseWeb();
setAdVisibility(false);
}
}