正在查看: Zepto v25.1.4 应用的 C0411p5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Zepto v25.1.4 应用的 C0411p5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.inmobi.media;
import android.R;
import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.URLUtil;
import android.widget.FrameLayout;
import com.swmansion.reanimated.layoutReanimation.Snapshot;
import in.juspay.hyper.constants.LogSubCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.npci.upi.security.pinactivitycomponent.CLConstants;
public final class C0411p5 {
public final S9 f52896a;
public final int f52897b;
public C0264e9 f52898c;
public A4 f52899d;
public C0411p5(int i2, S9 mRenderView) {
Intrinsics.checkNotNullParameter(mRenderView, "mRenderView");
this.f52896a = mRenderView;
this.f52897b = i2;
}
public static final void a(C0411p5 this$0, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.e(str);
} catch (Exception e2) {
this$0.f52896a.a(str2, "Unexpected error", "expand");
Z5.a((byte) 1, "InMobi", "Failed to expand ad; SDK encountered an unexpected error");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling expand() request; ")));
}
}
}
public static final void b(C0411p5 this$0, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.f52896a.getLandingPageHandler().a("open", str, str2, true);
}
public static final void c(C0411p5 this$0, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.getLandingPageHandler().e("openEmbedded", str, str2);
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "openEmbedded");
Z5.a((byte) 1, "InMobi", "Failed to open URL; SDK encountered unexpected error");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling openEmbedded() request from creative; ")));
}
}
}
public static final void d(C0411p5 this$0, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.f52896a.getLandingPageHandler().a("openWithoutTracker", str, str2, true);
}
public static final void e(C0411p5 this$0, String str, String str2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
S9 s9 = this$0.f52896a;
int length = str2.length() - 1;
int i2 = 0;
boolean z = false;
while (i2 <= length) {
boolean z2 = Intrinsics.h(str2.charAt(!z ? i2 : length), 32) <= 0;
if (z) {
if (!z2) {
break;
} else {
length--;
}
} else if (z2) {
i2++;
} else {
z = true;
}
}
s9.b(str, str2.subSequence(i2, length + 1).toString());
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "playVideo");
Z5.a((byte) 1, "InMobi", "Error playing video; SDK encountered an unexpected error");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling playVideo() request from creative; ")));
}
}
}
@JavascriptInterface
public final void asyncPing(@Nullable String str, @NotNull String url) {
Intrinsics.checkNotNullParameter(url, "url");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "asyncPing called: ", url));
}
if (!URLUtil.isValidUrl(url)) {
this.f52896a.a(str, "Invalid url", "asyncPing");
return;
}
try {
G8 g8 = new G8(url, this.f52899d);
g8.x = false;
g8.t = false;
g8.u = false;
g8.a(new Z0(new C0200a1(g8, new C0398o5(this))));
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "asyncPing");
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered internal error in handling asyncPing() request from creative; ")));
}
}
}
@JavascriptInterface
public final void cancelSaveContent(@Nullable String str, @NotNull String mediaId) {
Intrinsics.checkNotNullParameter(mediaId, "mediaId");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "cancelSaveContent called. mediaId:", mediaId));
}
}
@JavascriptInterface
public final void close(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "close called");
}
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new ye(this, str, 1));
}
@JavascriptInterface
public final void closeAll(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "closeAll is called");
}
S9 s9 = this.f52896a;
A4 a42 = s9.f52083j;
if (a42 != null) {
String str3 = S9.O0;
((B4) a42).a(str3, G9.a(s9, str3, "TAG", "closeAll "));
}
K k2 = s9.d0;
if (k2 != null) {
k2.b();
}
Activity activity = (Activity) s9.f52086m.get();
if (activity != null) {
activity.finish();
}
}
@JavascriptInterface
public final void closeCustomExpand(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "closeCustomExpand called.");
}
if (this.f52897b != 1) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
StringBuilder a2 = A5.a(str3, "access$getTAG$p(...)", "closeCustomExpand called in incorrect Ad type: ");
a2.append(this.f52897b);
((B4) a42).b(str3, a2.toString());
return;
}
return;
}
if (this.f52896a != null) {
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new af(this, 0));
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).b(str4, "Found a null instance of render view!");
}
}
@JavascriptInterface
public final void customExpand(@Nullable final String str, @Nullable final String str2, final int i2, final float f2, boolean z, final boolean z2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "customExpand called");
}
if (this.f52897b != 1) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
StringBuilder a2 = A5.a(str4, "access$getTAG$p(...)", "customExpand called in incorrect Ad type: ");
a2.append(this.f52897b);
((B4) a42).b(str4, a2.toString());
return;
}
return;
}
if (str2 != null) {
int length = str2.length() - 1;
int i3 = 0;
boolean z3 = false;
while (i3 <= length) {
boolean z4 = Intrinsics.h(str2.charAt(!z3 ? i3 : length), 32) <= 0;
if (z3) {
if (!z4) {
break;
} else {
length--;
}
} else if (z4) {
i3++;
} else {
z3 = true;
}
}
if (str2.subSequence(i3, length + 1).toString().length() != 0) {
if (i2 < 0 || i2 >= EnumC0383n3.values().length) {
this.f52896a.a(str, "Invalid inputType", "customExpand");
return;
} else if (f2 < 0.0f || f2 > 1.0f) {
this.f52896a.a(str, "Invalid screenPercentage", "customExpand");
return;
} else {
this.f52896a.getLandingPageHandler().a("clickStartCalled", MapsKt.j(new Pair("trigger", this.f52896a.getLandingPageHandler().a(str2))));
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new Runnable() {
@Override
public final void run() {
C0411p5.a(C0411p5.this, str2, i2, str, f2, z2);
}
});
return;
}
}
}
this.f52896a.a(str, "Invalid " + i2, "customExpand");
}
@JavascriptInterface
public final void disableBackButton(@Nullable String str, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "disableBackButton called");
}
S9 s9 = this.f52896a;
if (s9 != null) {
s9.setDisableBackButton(z);
return;
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
}
@JavascriptInterface
public final void disableCloseRegion(@Nullable String str, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "disableCloseRegion called");
}
if (this.f52896a != null) {
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new ze(this, z, str, 0));
return;
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
}
@JavascriptInterface
public final void expand(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "expand called");
}
if (this.f52897b != 1) {
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
if (!s9.k()) {
this.f52896a.a("expand");
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).a(str5, AbstractC0540z5.a(str5, "access$getTAG$p(...)", "expand called. Url:", str2));
}
S9 s92 = this.f52896a;
if (s92.E != oc.f52885c) {
s92.a(str, "Creative is not visible. Ignoring request.", "expand");
return;
}
if (str2 != null && str2.length() > 0 && !StringsKt.L(str2, "http", false)) {
this.f52896a.a(str, "Invalid URL", "expand");
return;
}
if (URLUtil.isValidUrl(str2)) {
this.f52896a.i();
}
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new xe(this, str2, str, 3));
}
}
@JavascriptInterface
public final void fireAdFailed(@Nullable String str) {
try {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "fireAdFailed called.");
}
S9 s9 = this.f52896a;
Z9 z9 = s9.T;
if (z9 != null) {
Map a2 = z9.a();
long j2 = z9.f52314b;
ScheduledExecutorService scheduledExecutorService = Vb.f52153a;
a2.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j2));
C0266eb c0266eb = C0266eb.f52475a;
C0266eb.b("FireAdFailed", a2, EnumC0336jb.f52717a);
}
s9.getListener().g(s9);
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "fireAdFailed");
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling fireAdFailed() signal from creative; ")));
}
}
}
@JavascriptInterface
public final void fireAdReady(@Nullable String str) {
try {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "fireAdReady called.");
}
this.f52896a.h();
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "fireAdReady");
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling fireAdReady() signal from creative; ")));
}
}
}
@JavascriptInterface
public final void fireComplete(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "fireComplete is called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String str4 = S9.O0;
((B4) a43).c(str4, G9.a(s9, str4, "TAG", "completeFromInterActive "));
}
A2 a2 = s9.H0;
if (a2 != null && !a2.f51512g.get()) {
a2.f51509d.f51628i = 1;
Intrinsics.e(a2.f51508c);
}
A4 a44 = s9.f52083j;
if (a44 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a44).a(TAG, "completeFromInterActive");
}
}
@JavascriptInterface
public final void fireSkip(@Nullable String str) {
A4 a4;
A4 a42 = this.f52899d;
if (a42 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a42).a(str2, "fireSkip is called");
}
if (this.f52896a == null && (a4 = this.f52899d) != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).b(str3, "Found a null instance of render view!");
}
S9 s9 = this.f52896a;
A4 a43 = s9.f52083j;
if (a43 != null) {
String str4 = S9.O0;
((B4) a43).c(str4, G9.a(s9, str4, "TAG", "skipFromInterActive "));
}
A2 a2 = s9.H0;
if (a2 != null && !a2.f51512g.get()) {
a2.f51509d.f51627h = 1;
Intrinsics.e(a2.f51508c);
}
A4 a44 = s9.f52083j;
if (a44 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a44).a(TAG, "skipFromInterActive");
}
}
@JavascriptInterface
@Nullable
public final String getAdContext(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getAdContext is called");
}
K adPodHandler = this.f52896a.getAdPodHandler();
if (adPodHandler != null) {
return ((AbstractC0496w0) adPodHandler).K();
}
return null;
}
@JavascriptInterface
public final void getBlob(@Nullable String str, @Nullable String str2) {
F1 f1;
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "getBlob is called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).a(TAG, "getBlob");
}
if (str == null || str2 == null || (f1 = s9.W) == null) {
return;
}
((AbstractC0496w0) f1).a(str, str2, s9, s9.getImpressionId());
}
@JavascriptInterface
@NotNull
public final String getCurrentPosition(@Nullable String str) {
S9 s9;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getCurrentPosition called");
}
S9 s92 = this.f52896a;
if (s92 == null) {
A4 a42 = this.f52899d;
if (a42 == null) {
return "";
}
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return "";
}
synchronized (s92.getCurrentPositionMonitor()) {
this.f52896a.B = true;
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new af(this, 2));
while (true) {
s9 = this.f52896a;
if (s9.B) {
try {
s9.getCurrentPositionMonitor().wait();
} catch (InterruptedException unused) {
}
} else {
Unit unit = Unit.f62275a;
}
}
}
return s9.getCurrentPosition();
}
@JavascriptInterface
public final int getCurrentRenderingIndex(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getCurrentRenderingIndex is called");
}
return this.f52896a.getCurrentRenderingPodAdIndex();
}
@JavascriptInterface
@NotNull
public final String getDefaultPosition(@Nullable String str) {
S9 s9;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getDefaultPosition called");
}
S9 s92 = this.f52896a;
if (s92 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
String jSONObject = new JSONObject().toString();
Intrinsics.checkNotNullExpressionValue(jSONObject, "toString(...)");
return jSONObject;
}
synchronized (s92.getDefaultPositionMonitor()) {
this.f52896a.A = true;
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new af(this, 1));
while (true) {
s9 = this.f52896a;
if (s9.A) {
try {
s9.getDefaultPositionMonitor().wait();
} catch (InterruptedException unused) {
}
} else {
Unit unit = Unit.f62275a;
}
}
}
return s9.getDefaultPosition();
}
@JavascriptInterface
public final int getDeviceVolume(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getDeviceVolume called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
return -1;
}
try {
C0528y6 mediaProcessor = s9.getMediaProcessor();
if (mediaProcessor != null) {
return mediaProcessor.a();
}
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "getDeviceVolume");
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a43).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getDeviceVolume() request from creative; ")));
}
}
return -1;
}
@JavascriptInterface
@NotNull
public final String getExpandProperties(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getExpandedProperties called");
}
S9 s9 = this.f52896a;
if (s9 != null) {
I3 expandProperties = s9.getExpandProperties();
Intrinsics.e(expandProperties);
return expandProperties.f51752b;
}
A4 a42 = this.f52899d;
if (a42 == null) {
return "";
}
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return "";
}
@JavascriptInterface
public final int getMaxDeviceVolume(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getMaxDeviceVolume called");
}
try {
return C0216b3.f52356a.m();
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "getMaxDeviceVolume");
A4 a42 = this.f52899d;
if (a42 == null) {
return 0;
}
String str3 = AbstractC0424q5.f52929a;
((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getMaxDeviceVolume() request from creative; ")));
return 0;
}
}
@JavascriptInterface
@NotNull
public final String getMaxSize(@Nullable String str) {
int i2;
int i3;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getMaxSize called");
}
JSONObject jSONObject = new JSONObject();
try {
Activity fullScreenActivity = this.f52896a.getFullScreenActivity();
if (fullScreenActivity == null) {
Context containerContext = this.f52896a.getContainerContext();
if ((containerContext instanceof Activity ? (Activity) containerContext : null) == null) {
return getScreenSize(str);
}
Context containerContext2 = this.f52896a.getContainerContext();
Intrinsics.f(containerContext2, "null cannot be cast to non-null type android.app.Activity");
fullScreenActivity = (Activity) containerContext2;
}
FrameLayout frameLayout = (FrameLayout) fullScreenActivity.findViewById(R.id.content);
int a2 = AbstractC0342k3.a(frameLayout.getWidth());
int a3 = AbstractC0342k3.a(frameLayout.getHeight());
if (this.f52896a.getFullScreenActivity() != null && (a2 == 0 || a3 == 0)) {
ViewTreeObserverOnGlobalLayoutListenerC0385n5 viewTreeObserverOnGlobalLayoutListenerC0385n5 = new ViewTreeObserverOnGlobalLayoutListenerC0385n5(frameLayout, this.f52899d);
frameLayout.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserverOnGlobalLayoutListenerC0385n5);
Boolean bool = Boolean.FALSE;
synchronized (bool) {
try {
bool.wait();
} catch (InterruptedException unused) {
}
i2 = viewTreeObserverOnGlobalLayoutListenerC0385n5.f52861c;
i3 = viewTreeObserverOnGlobalLayoutListenerC0385n5.f52862d;
Unit unit = Unit.f62275a;
}
a3 = i3;
a2 = i2;
}
try {
jSONObject.put(Snapshot.WIDTH, a2);
jSONObject.put(Snapshot.HEIGHT, a3);
} catch (JSONException e2) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).a(str3, "Error while creating max size Json.", e2);
}
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "getMaxSize called:" + jSONObject);
}
} catch (Exception e3) {
this.f52896a.a(str, "Unexpected error", "getMaxSize");
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e3, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getMaxSize() request from creative; ")));
}
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
return jSONObject2;
}
@JavascriptInterface
@NotNull
public final String getOrientation(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getOrientation called");
}
byte g2 = AbstractC0342k3.g();
return g2 == 1 ? "0" : g2 == 3 ? "90" : g2 == 2 ? "180" : g2 == 4 ? "270" : "-1";
}
@JavascriptInterface
@NotNull
public final String getOrientationProperties(@Nullable String str) {
C0264e9 c0264e9 = this.f52898c;
String str2 = c0264e9 != null ? c0264e9.f52472d : null;
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a4).a(str3, AbstractC0540z5.a(str3, "access$getTAG$p(...)", "getOrientationProperties called: ", str2));
}
Intrinsics.e(str2);
return str2;
}
@JavascriptInterface
@NotNull
public final String getPlacementType(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getPlacementType called");
}
return 1 == this.f52897b ? "interstitial" : "inline";
}
@JavascriptInterface
@NotNull
public final String getPlatform(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 == null) {
return LogSubCategory.LifeCycle.ANDROID;
}
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getPlatform. Platform:android");
return LogSubCategory.LifeCycle.ANDROID;
}
@JavascriptInterface
@NotNull
public final String getPlatformVersion(@Nullable String str) {
String valueOf = String.valueOf(Build.VERSION.SDK_INT);
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "getPlatformVersion. Version:", valueOf));
}
return valueOf;
}
@JavascriptInterface
@NotNull
public final String getRenderableAdIndexes(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getRenderableAdIndexes is called");
}
JSONArray renderableAdIndexes = this.f52896a.getRenderableAdIndexes();
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).a(str3, "renderableAdIndexes called:" + renderableAdIndexes);
}
String jSONArray = renderableAdIndexes.toString();
Intrinsics.checkNotNullExpressionValue(jSONArray, "toString(...)");
return jSONArray;
}
@JavascriptInterface
@NotNull
public final String getResizeProperties(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getResizeProperties called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
return "";
}
C0363la resizeProperties = s9.getResizeProperties();
if (resizeProperties == null) {
return "";
}
JSONObject a2 = new C0372m5().a(resizeProperties);
String jSONObject = a2 != null ? a2.toString() : null;
return jSONObject == null ? "" : jSONObject;
}
@JavascriptInterface
@Nullable
public final String getSafeArea(@Nullable String str) {
S9 s9 = this.f52896a;
if (!s9.D0) {
return null;
}
Integer navBarTypeViaSettings = s9.getNavBarTypeViaSettings();
if (navBarTypeViaSettings == null) {
navBarTypeViaSettings = this.f52896a.getNavBarTypeViaInsets();
}
JSONObject jSONObject = this.f52896a.getSafeArea().get(navBarTypeViaSettings);
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getSafeArea called:" + jSONObject);
}
if (jSONObject != null) {
return jSONObject.toString();
}
return null;
}
@JavascriptInterface
@NotNull
public final String getScreenSize(@Nullable String str) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(Snapshot.WIDTH, AbstractC0342k3.h().f52773a);
jSONObject.put(Snapshot.HEIGHT, AbstractC0342k3.h().f52774b);
} catch (JSONException unused) {
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "getScreenSize");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered unexpected error while getting screen dimensions; ")));
}
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a42).a(str3, AbstractC0540z5.a(str3, "access$getTAG$p(...)", "getScreenSize called:", jSONObject2));
}
return jSONObject2;
}
@JavascriptInterface
@NotNull
public final String getSdkVersion(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 == null) {
return "10.7.8";
}
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getSdkVersion called. Version:10.7.8");
return "10.7.8";
}
@JavascriptInterface
public final long getShowTimeStamp(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getShowTimeStamp is called");
}
long showTimeStamp = this.f52896a.getShowTimeStamp();
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).a(str3, "getShowTimeStamp is " + showTimeStamp);
}
return showTimeStamp;
}
@JavascriptInterface
@NotNull
public final String getState(@Nullable String str) {
String viewState = this.f52896a.getViewState();
Locale locale = Locale.ENGLISH;
String w = androidx.fragment.app.a.w(locale, "ENGLISH", viewState, locale, "this as java.lang.String).toLowerCase(locale)");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).c(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "getState called:", w));
}
return w;
}
@JavascriptInterface
@NotNull
public final String getVersion(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 == null) {
return "2.0";
}
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "getVersion called. Version:2.0");
return "2.0";
}
@JavascriptInterface
public final void impressionFired(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "impressionFired is called");
}
S9 s9 = this.f52896a;
A4 a42 = s9.f52083j;
if (a42 != null) {
String str3 = S9.O0;
((B4) a42).a(str3, G9.a(s9, str3, "TAG", "onImpressionFired "));
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String str4 = S9.O0;
((B4) a43).a(str4, G9.a(s9, str4, "TAG", "recordContextualData "));
}
A2 a2 = s9.H0;
if (a2 != null) {
a2.a();
}
s9.getListener().a(s9.getTelemetryOnAdImpression());
}
@JavascriptInterface
public final void incentCompleted(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a4).a(str3, AbstractC0540z5.a(str3, "access$getTAG$p(...)", "incentCompleted called. IncentData:", str2));
}
if (str2 == null) {
try {
this.f52896a.getListener().b(new HashMap());
return;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "incentCompleted");
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a42).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
return;
}
return;
}
}
try {
JSONObject jSONObject = new JSONObject(str2);
HashMap hashMap = new HashMap();
Iterator<String> keys = jSONObject.keys();
Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
while (keys.hasNext()) {
String next = keys.next();
Intrinsics.f(next, "null cannot be cast to non-null type kotlin.String");
String str5 = next;
Object obj = jSONObject.get(str5);
Intrinsics.e(obj);
hashMap.put(str5, obj);
}
try {
try {
this.f52896a.getListener().b(hashMap);
} catch (Exception e3) {
this.f52896a.a(str, "Unexpected error", "incentCompleted");
A4 a43 = this.f52899d;
if (a43 != null) {
String str6 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str6, "access$getTAG$p(...)");
((B4) a43).b(str6, "SDK encountered unexpected error in handling onUserInteraction() signal from creative; " + e3.getMessage());
}
}
} catch (Exception e4) {
this.f52896a.a(str, "Unexpected error", "incentCompleted");
A4 a44 = this.f52899d;
if (a44 != null) {
String str7 = AbstractC0424q5.f52929a;
((B4) a44).b(str7, Cc.a(e4, A5.a(str7, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
}
}
} catch (JSONException unused) {
this.f52896a.getListener().b(new HashMap());
}
}
@JavascriptInterface
public final boolean isBackButtonDisabled(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "isBackButtonDisabled called");
}
S9 s9 = this.f52896a;
if (s9 != null) {
return s9.G;
}
A4 a42 = this.f52899d;
if (a42 == null) {
return false;
}
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return false;
}
@JavascriptInterface
@NotNull
public final String isDeviceMuted(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "isDeviceMuted called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 == null) {
return "false";
}
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return "false";
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "JavaScript called: isDeviceMuted()");
}
boolean z = false;
try {
C0528y6 mediaProcessor = this.f52896a.getMediaProcessor();
Intrinsics.e(mediaProcessor);
A4 a44 = mediaProcessor.f53250b;
if (a44 != null) {
((B4) a44).c("MraidMediaProcessor", "isVolumeMuted");
}
Context d2 = Ha.d();
if (d2 != null) {
Object systemService = d2.getSystemService("audio");
AudioManager audioManager = systemService instanceof AudioManager ? (AudioManager) systemService : null;
if (audioManager != null) {
if (2 != audioManager.getRingerMode()) {
z = true;
}
}
}
} catch (Exception e2) {
A4 a45 = this.f52899d;
if (a45 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a45).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in checking if device is muted; ")));
}
}
return String.valueOf(z);
}
@JavascriptInterface
@NotNull
public final String isHeadphonePlugged(@Nullable String str) {
boolean z;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "isHeadphonePlugged called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 == null) {
return "false";
}
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return "false";
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "JavaScript called: isHeadphonePlugged()");
}
try {
Intrinsics.e(this.f52896a.getMediaProcessor());
z = C0528y6.b();
} catch (Exception e2) {
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in checking if headphones are plugged-in; ")));
}
z = false;
}
return String.valueOf(z);
}
@JavascriptInterface
public final boolean isViewable(@Nullable String str) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
S9 s9 = this.f52896a;
if (s9 != null) {
return s9.E == oc.f52885c;
}
A4 a4 = this.f52899d;
if (a4 != null) {
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).b(str2, "Found a null instance of render view!");
}
return false;
}
@JavascriptInterface
public final void loadAd(@Nullable String str, int i2) {
K k2;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "loadAd is called");
}
S9 s9 = this.f52896a;
A4 a42 = s9.f52083j;
if (a42 != null) {
String str3 = S9.O0;
((B4) a42).a(str3, G9.a(s9, str3, "TAG", "loadPodAd "));
}
if (s9.E == oc.f52885c && (k2 = s9.d0) != null) {
k2.a(i2, s9);
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).b(TAG, "Cannot load index pod ad as the current ad is not viewable");
}
s9.a(false);
}
@JavascriptInterface
public final void log(@Nullable String str, @NotNull String message) {
Intrinsics.checkNotNullParameter(message, "message");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).c(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "Log called. Message:", message));
}
S9 s9 = this.f52896a;
s9.getClass();
K9 k9 = S9.M0;
k9.getClass();
if (!((Boolean) S9.P0.getValue(k9, K9.f51816a[0])).booleanValue() || message == null) {
return;
}
s9.getListener().a(message);
}
@JavascriptInterface
public final void logTelemetryEvent(@Nullable String str, @Nullable String eventType, @Nullable String str2) {
Z9 z9;
if (eventType == null) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).b(str3, "eventType is null");
return;
}
return;
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).a(str4, "logTelemetryEvent is called: ".concat(eventType));
}
S9 s9 = this.f52896a;
s9.getClass();
Intrinsics.checkNotNullParameter(eventType, "eventType");
z9 = s9.T;
if (z9 != null) {
Intrinsics.checkNotNullParameter(eventType, "eventType");
if (z9.f52318f.get()) {
return;
}
if (z9.f52317e.decrementAndGet() <= 0) {
z9.f52318f.set(true);
Map a2 = z9.a();
long j2 = z9.f52314b;
ScheduledExecutorService scheduledExecutorService = Vb.f52153a;
a2.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j2));
C0266eb c0266eb = C0266eb.f52475a;
C0266eb.b("TemplateEventDropped", a2, EnumC0336jb.f52717a);
return;
}
if (str2 != null) {
try {
} catch (JSONException e2) {
Log.e(C0266eb.f52476b, "Error parsing JSON: " + e2);
}
}
LinkedHashMap j3 = MapsKt.j(new Pair("plType", String.valueOf(z9.f52313a.f52142a.m())), new Pair("markupType", z9.f52313a.f52143b), new Pair("networkType", C0216b3.q()));
if (str2 != null) {
j3.put(PaymentConstants.PAYLOAD, str2);
}
if (z9.f52313a.f52144c.length() > 0) {
j3.put("metadataBlob", z9.f52313a.f52144c);
}
C0266eb.b(eventType, j3, EnumC0336jb.f52718b);
}
return;
str2 = null;
LinkedHashMap j32 = MapsKt.j(new Pair("plType", String.valueOf(z9.f52313a.f52142a.m())), new Pair("markupType", z9.f52313a.f52143b), new Pair("networkType", C0216b3.q()));
if (str2 != null) {
}
if (z9.f52313a.f52144c.length() > 0) {
}
C0266eb.b(eventType, j32, EnumC0336jb.f52718b);
}
@JavascriptInterface
public final void onAudioStateChanged(@Nullable String str, int i2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "onAudioStateChanged is called: " + i2);
}
EnumC0298h1.f52581b.getClass();
EnumC0298h1 enumC0298h1 = (EnumC0298h1) EnumC0298h1.f52582c.get(i2);
if (enumC0298h1 == null) {
enumC0298h1 = EnumC0298h1.f52583d;
}
if (enumC0298h1 != EnumC0298h1.f52583d) {
this.f52896a.getListener().a(enumC0298h1);
}
}
@JavascriptInterface
public final void onOrientationChange(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, ">>> onOrientationChange() >>> This API is deprecated!");
}
}
@JavascriptInterface
public final void onUserAudioMuteInteraction(@Nullable String str, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "onAudioMuteInteraction is called: " + z);
}
this.f52896a.getListener().a(z);
}
@JavascriptInterface
public final void onUserInteraction(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "onUserInteraction called");
}
S9 s9 = this.f52896a;
if (s9 != null && !s9.k()) {
this.f52896a.a("onUserInteraction");
return;
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a42).a(str4, AbstractC0540z5.a(str4, "access$getTAG$p(...)", "onUserInteraction called. Params:", str2));
}
if (str2 == null) {
try {
this.f52896a.getListener().a(new HashMap());
return;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "onUserInteraction");
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
return;
}
return;
}
}
try {
JSONObject jSONObject = new JSONObject(str2);
HashMap hashMap = new HashMap();
Iterator<String> keys = jSONObject.keys();
Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
while (keys.hasNext()) {
String next = keys.next();
Intrinsics.f(next, "null cannot be cast to non-null type kotlin.String");
String str6 = next;
Object obj = jSONObject.get(str6);
Intrinsics.e(obj);
hashMap.put(str6, obj);
}
try {
try {
this.f52896a.getListener().a(hashMap);
} catch (Exception e3) {
this.f52896a.a(str, "Unexpected error", "onUserInteraction");
A4 a44 = this.f52899d;
if (a44 != null) {
String str7 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str7, "access$getTAG$p(...)");
((B4) a44).b(str7, "SDK encountered unexpected error in handling onUserInteraction() signal from creative; " + e3.getMessage());
}
}
} catch (Exception e4) {
this.f52896a.a(str, "Unexpected error", "onUserInteraction");
A4 a45 = this.f52899d;
if (a45 != null) {
String str8 = AbstractC0424q5.f52929a;
((B4) a45).b(str8, Cc.a(e4, A5.a(str8, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
}
}
} catch (JSONException unused) {
this.f52896a.getListener().a(new HashMap());
}
}
@JavascriptInterface
public final void open(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "open called");
}
String a2 = this.f52896a.getLandingPageHandler().a(str2);
this.f52896a.getLandingPageHandler().a("clickStartCalled", MapsKt.j(new Pair("trigger", a2)));
if (this.f52896a.k()) {
this.f52896a.i();
AbstractC0224bb.a(new xe(this, str, str2, 1));
} else {
this.f52896a.a("open");
this.f52896a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 8), new Pair("trigger", a2)));
}
}
@JavascriptInterface
public final void openEmbedded(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "openEmbedded called");
}
if (!this.f52896a.k()) {
this.f52896a.a("openEmbedded");
} else {
this.f52896a.i();
AbstractC0224bb.a(new xe(this, str, str2, 2));
}
}
@JavascriptInterface
public final void openExternal(@Nullable String str, @NotNull String url, @Nullable String str2) {
Intrinsics.checkNotNullParameter(url, "url");
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "open External");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
if (!s9.k()) {
this.f52896a.a("openExternal");
return;
}
this.f52896a.i();
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).a(str5, AbstractC0540z5.a(str5, "access$getTAG$p(...)", "openExternal called with url: ", url));
}
D5 landingPageHandler = this.f52896a.getLandingPageHandler();
landingPageHandler.getClass();
Intrinsics.checkNotNullParameter("openExternal", "api");
if (url != null) {
landingPageHandler.f(str, url, str2);
return;
}
if (str2 != null) {
landingPageHandler.f(str, str2, null);
return;
}
O9 o9 = landingPageHandler.f51599d;
if (o9 != null) {
Intrinsics.checkNotNullParameter("Empty url and fallback url", "message");
o9.f51977a.a(str, "Empty url and fallback url", "openExternal");
}
A4 a44 = landingPageHandler.f51602g;
if (a44 != null) {
Intrinsics.checkNotNullExpressionValue("D5", "TAG");
((B4) a44).b("D5", "Empty deeplink and fallback urls");
}
}
@JavascriptInterface
public final void openWithoutTracker(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "openWithoutTracker called");
}
String a2 = this.f52896a.getLandingPageHandler().a(str2);
this.f52896a.getLandingPageHandler().a("clickStartCalled", new HashMap());
S9 s9 = this.f52896a;
if (s9 != null) {
if (s9.k()) {
AbstractC0224bb.a(new xe(this, str, str2, 0));
return;
} else {
this.f52896a.a("openWithoutTracker");
this.f52896a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 8), new Pair("trigger", a2)));
return;
}
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
}
this.f52896a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 11), new Pair("trigger", a2)));
}
@JavascriptInterface
public final void ping(@Nullable String str, @Nullable String str2, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "ping called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
if (str2 != null) {
int length = str2.length() - 1;
int i2 = 0;
boolean z2 = false;
while (i2 <= length) {
boolean z3 = Intrinsics.h(str2.charAt(!z2 ? i2 : length), 32) <= 0;
if (z2) {
if (!z3) {
break;
} else {
length--;
}
} else if (z3) {
i2++;
} else {
z2 = true;
}
}
if (str2.subSequence(i2, length + 1).toString().length() != 0 && URLUtil.isValidUrl(str2)) {
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
((B4) a43).a(str5, "JavaScript called ping() URL: >>> " + str2 + " <<<");
}
try {
Y1.f52249a.a(str2, z, this.f52899d);
return;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "ping");
Z5.a((byte) 1, "InMobi", "Failed to fire ping; SDK encountered unexpected error");
A4 a44 = this.f52899d;
if (a44 != null) {
String str6 = AbstractC0424q5.f52929a;
((B4) a44).b(str6, Cc.a(e2, A5.a(str6, "access$getTAG$p(...)", "SDK encountered unexpected error in handling ping() request from creative; ")));
return;
}
return;
}
}
}
this.f52896a.a(str, "Invalid URL:" + str2, "ping");
}
@JavascriptInterface
public final void pingInWebView(@Nullable String str, @Nullable String str2, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "openInWebView called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
if (str2 != null) {
int length = str2.length() - 1;
int i2 = 0;
boolean z2 = false;
while (i2 <= length) {
boolean z3 = Intrinsics.h(str2.charAt(!z2 ? i2 : length), 32) <= 0;
if (z2) {
if (!z3) {
break;
} else {
length--;
}
} else if (z3) {
i2++;
} else {
z2 = true;
}
}
if (str2.subSequence(i2, length + 1).toString().length() != 0 && URLUtil.isValidUrl(str2)) {
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
((B4) a43).a(str5, "JavaScript called pingInWebView() URL: >>> " + str2 + " <<<");
}
try {
Y1.f52249a.b(str2, z, this.f52899d);
return;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "pingInWebView");
Z5.a((byte) 1, "InMobi", "Failed to fire ping; SDK encountered unexpected error");
A4 a44 = this.f52899d;
if (a44 != null) {
String str6 = AbstractC0424q5.f52929a;
((B4) a44).b(str6, Cc.a(e2, A5.a(str6, "access$getTAG$p(...)", "SDK encountered unexpected error in handling pingInWebView() request from creative; ")));
return;
}
return;
}
}
}
this.f52896a.a(str, "Invalid URL:" + str2, "pingInWebView");
}
@JavascriptInterface
public final void playVideo(@Nullable String str, @Nullable String str2) {
if (this.f52896a == null) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).b(str3, "Found a null instance of render view!");
return;
}
return;
}
if (str2 != null) {
int length = str2.length() - 1;
int i2 = 0;
boolean z = false;
while (i2 <= length) {
boolean z2 = Intrinsics.h(str2.charAt(!z ? i2 : length), 32) <= 0;
if (z) {
if (!z2) {
break;
} else {
length--;
}
} else if (z2) {
i2++;
} else {
z = true;
}
}
if (str2.subSequence(i2, length + 1).toString().length() != 0 && StringsKt.L(str2, "http", false) && (StringsKt.p(str2, "mp4", false) || StringsKt.p(str2, "avi", false) || StringsKt.p(str2, "m4v", false))) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).a(str4, "JavaScript called: playVideo (" + str2 + ')');
}
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new xe(this, str, str2, 4));
return;
}
}
this.f52896a.a(str, "Null or empty or invalid media playback URL supplied", "playVideo");
}
@JavascriptInterface
public final void registerBackButtonPressedEventListener(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "registerBackButtonPressedEventListener called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
try {
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).a(TAG, "registerBackButtonPressedEventListener " + s9);
}
s9.H = str;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "registerBackButtonPressedEventListener");
A4 a44 = this.f52899d;
if (a44 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a44).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerBackButtonPressedEventListener() request from creative; ")));
}
}
}
@JavascriptInterface
public final void registerDeviceMuteEventListener(@Nullable String jsCallbackNamespace) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
((B4) a4).a(str, "registerDeviceMuteEventListener called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a42).b(str2, "Found a null instance of render view!");
return;
}
return;
}
if (jsCallbackNamespace != null) {
try {
C0528y6 mediaProcessor = s9.getMediaProcessor();
if (mediaProcessor != null) {
Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
if (mediaProcessor.f53252d == null) {
C0331j6 c0331j6 = new C0331j6(new C0489v6(mediaProcessor, jsCallbackNamespace));
mediaProcessor.f53252d = c0331j6;
c0331j6.b();
}
}
} catch (Exception e2) {
this.f52896a.a(jsCallbackNamespace, "Unexpected error", "registerDeviceMuteEventListener");
A4 a43 = this.f52899d;
if (a43 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerDeviceMuteEventListener() request from creative; ")));
}
}
}
}
@JavascriptInterface
public final void registerDeviceVolumeChangeEventListener(@Nullable String jsCallbackNamespace) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
((B4) a4).a(str, "registerDeviceVolumeChangeEventListener called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a42).b(str2, "Found a null instance of render view!");
return;
}
return;
}
if (jsCallbackNamespace != null) {
try {
C0528y6 mediaProcessor = s9.getMediaProcessor();
if (mediaProcessor != null) {
Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
Context d2 = Ha.d();
if (d2 != null && mediaProcessor.f53253e == null) {
C0331j6 c0331j6 = new C0331j6(new C0502w6(mediaProcessor, jsCallbackNamespace, d2, new Handler(Looper.getMainLooper())));
mediaProcessor.f53253e = c0331j6;
c0331j6.b();
}
}
} catch (Exception e2) {
this.f52896a.a(jsCallbackNamespace, "Unexpected error", "registerDeviceVolumeChangeEventListener");
A4 a43 = this.f52899d;
if (a43 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerDeviceVolumeChangeEventListener() request from creative; ")));
}
}
}
}
@JavascriptInterface
public final void registerHeadphonePluggedEventListener(@Nullable String jsCallbackNamespace) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
((B4) a4).a(str, "registerHeadphonePluggedEventListener called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a42).b(str2, "Found a null instance of render view!");
return;
}
return;
}
if (jsCallbackNamespace != null) {
try {
C0528y6 mediaProcessor = s9.getMediaProcessor();
if (mediaProcessor != null) {
Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
if (mediaProcessor.f53254f == null) {
C0331j6 c0331j6 = new C0331j6(new C0476u6(mediaProcessor, jsCallbackNamespace));
mediaProcessor.f53254f = c0331j6;
c0331j6.b();
}
}
} catch (Exception e2) {
this.f52896a.a(jsCallbackNamespace, "Unexpected error", "registerHeadphonePluggedEventListener");
A4 a43 = this.f52899d;
if (a43 != null) {
String str3 = AbstractC0424q5.f52929a;
((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerHeadphonePluggedEventListener() request from creative; ")));
}
}
}
}
@JavascriptInterface
public final void resize(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "resize called");
}
if (this.f52897b != 1) {
if (this.f52896a != null) {
new Handler(Looper.getMainLooper()).post(new ye(this, str, 0));
return;
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
}
}
}
@JavascriptInterface
public final void saveBlob(@Nullable String str, @Nullable String str2) {
F1 f1;
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "saveBlob is called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).a(TAG, "saveBlob");
}
if (str2 == null || (f1 = s9.W) == null) {
return;
}
((AbstractC0496w0) f1).a(str2, s9.getImpressionId());
}
@JavascriptInterface
public final void saveContent(@Nullable String str, @Nullable String str2, @Nullable String str3) {
if (str2 != null && str2.length() != 0 && str3 != null && str3.length() != 0) {
try {
this.f52896a.b(str, str2, str3);
return;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "saveContent");
A4 a4 = this.f52899d;
if (a4 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a4).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling saveContent() request from creative; ")));
return;
}
return;
}
}
A4 a42 = this.f52899d;
if (a42 != null) {
String str5 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
((B4) a42).a(str5, "saveContent called with invalid parameters");
}
JSONObject jSONObject = new JSONObject();
if (str3 == null) {
str3 = "";
}
try {
jSONObject.put("url", str3);
jSONObject.put("reason", 8);
} catch (JSONException unused) {
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
String H = StringsKt.H(jSONObject2, "\"", "\\\"");
StringBuilder sb = new StringBuilder("sendSaveContentResult(\"saveContent_");
if (str2 == null) {
str2 = "";
}
sb.append(str2);
sb.append("\", 'failed', \"");
sb.append(H);
sb.append("\");");
this.f52896a.a(str, sb.toString());
}
@JavascriptInterface
public final void setAdContext(@Nullable String str, @NotNull String podAdContext) {
Intrinsics.checkNotNullParameter(podAdContext, "podAdContext");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "setAdContext is called ", podAdContext));
}
K adPodHandler = this.f52896a.getAdPodHandler();
if (adPodHandler != null) {
((AbstractC0496w0) adPodHandler).d(podAdContext);
}
}
@JavascriptInterface
public final void setCloseEndCardTracker(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "setCloseEndCardTracker is called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
try {
s9.setCloseEndCardTracker(str2);
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "getDownloadStatus");
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getDownloadStatus() request from creative; ")));
}
}
}
@JavascriptInterface
public final void setExpandProperties(@Nullable String str, @NotNull String expandPropertiesString) {
Intrinsics.checkNotNullParameter(expandPropertiesString, "expandPropertiesString");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "setExpandProperties called. Params:", expandPropertiesString));
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
if (Intrinsics.c("Expanded", s9.getViewState())) {
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).b(str4, "setExpandProperties can't be called on an already expanded ad.");
return;
}
return;
}
try {
this.f52896a.setExpandProperties(H3.a(expandPropertiesString));
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "setExpandProperties");
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in setExpandProperties(); ")));
}
}
}
@JavascriptInterface
public final void setOrientationProperties(@Nullable String str, @NotNull String orientationPropertiesString) {
Intrinsics.checkNotNullParameter(orientationPropertiesString, "orientationPropertiesString");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "setOrientationProperties called: ", orientationPropertiesString));
}
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new ye(this, orientationPropertiesString, 2));
}
@JavascriptInterface
public final void setResizeProperties(@Nullable String str, @NotNull String json) {
C0363la c0363la;
String str2;
Intrinsics.checkNotNullParameter(json, "resizePropertiesString");
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "setResizeProperties called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).b(str4, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).a(str5, AbstractC0540z5.a(str5, "access$getTAG$p(...)", "setResizeProperties called. Properties:", json));
}
C0363la resizeProperties = this.f52896a.getResizeProperties();
C0363la.Companion.getClass();
Intrinsics.checkNotNullParameter(json, "json");
try {
c0363la = (C0363la) new C0372m5().a(new JSONObject(json), C0363la.class);
} catch (JSONException unused) {
}
if (c0363la != null) {
if (c0363la.b() == null) {
if (resizeProperties == null || (str2 = resizeProperties.b()) == null) {
str2 = C0363la.DEFAULT_POSITION;
}
c0363la.a(str2);
}
c0363la.a(resizeProperties != null ? resizeProperties.a() : true);
if (c0363la == null) {
this.f52896a.a(str, "setResizeProperties", "All mandatory fields are not present");
}
this.f52896a.setResizeProperties(c0363la);
}
c0363la = null;
if (c0363la == null) {
}
this.f52896a.setResizeProperties(c0363la);
}
@JavascriptInterface
public final void showAd(@Nullable String str, int i2) {
K k2;
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "showAd is called");
}
S9 s9 = this.f52896a;
A4 a42 = s9.f52083j;
if (a42 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a42).a(TAG, "showPodAdAtIndex " + s9 + ' ' + i2);
}
if (s9.E == oc.f52885c && (k2 = s9.d0) != null) {
k2.a(i2, s9, s9.getFullScreenActivity());
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG2 = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
((B4) a43).b(TAG2, "Cannot show index pod ad as the current ad is not viewable");
}
s9.b(false);
}
@JavascriptInterface
public final void showAlert(@Nullable String str, @NotNull String alert) {
Intrinsics.checkNotNullParameter(alert, "alert");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "showAlert: ", alert));
}
}
@JavascriptInterface
public final void showEndCard(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "showEndCard is called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).a(TAG, "showEndCardFromInterActive");
}
r referenceContainer = s9.getReferenceContainer();
if (referenceContainer instanceof M6) {
((M6) referenceContainer).p();
}
}
@JavascriptInterface
public final void storePicture(@Nullable String str, @Nullable String str2) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).a(str3, "storePicture is deprecated and no-op. ");
}
}
@JavascriptInterface
public final void submitAdReport(@Nullable String str, @NotNull String adQualityUrl, @NotNull String enableUserAdReportScreenshot, @NotNull String templateInfo) {
Intrinsics.checkNotNullParameter(adQualityUrl, "adQualityUrl");
Intrinsics.checkNotNullParameter(enableUserAdReportScreenshot, "enableUserAdReportScreenshot");
Intrinsics.checkNotNullParameter(templateInfo, "templateInfo");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "submitAdReport called");
}
this.f52896a.a(adQualityUrl, templateInfo, Intrinsics.c(enableUserAdReportScreenshot, "1"));
}
@JavascriptInterface
@NotNull
public final String supports(@Nullable String str, @NotNull String feature) {
Intrinsics.checkNotNullParameter(feature, "feature");
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).a(str2, AbstractC0540z5.a(str2, "access$getTAG$p(...)", "Checking support for: ", feature));
}
return String.valueOf(this.f52896a.f(feature));
}
@JavascriptInterface
public final long timeSinceShow(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "timeSinceShow is called");
}
S9 s9 = this.f52896a;
A4 a42 = s9.f52083j;
if (a42 != null) {
String str3 = S9.O0;
((B4) a42).c(str3, G9.a(s9, str3, "TAG", "timeSincePodShow "));
}
K k2 = s9.d0;
if (k2 != null) {
return ((AbstractC0496w0) k2).A0();
}
return 0L;
}
@JavascriptInterface
public final void unregisterBackButtonPressedEventListener(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "unregisterBackButtonPressedEventListener called");
}
S9 s9 = this.f52896a;
if (s9 == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
try {
A4 a43 = s9.f52083j;
if (a43 != null) {
String TAG = S9.O0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
((B4) a43).a(TAG, "unregisterBackButtonPressedEventListener " + s9);
}
s9.H = null;
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "unregisterBackButtonPressedEventListener");
A4 a44 = this.f52899d;
if (a44 != null) {
String str4 = AbstractC0424q5.f52929a;
((B4) a44).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterBackButtonPressedEventListener() request from creative; ")));
}
}
}
@JavascriptInterface
public final void unregisterDeviceMuteEventListener(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "unregisterDeviceMuteEventListener called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "Unregister device mute event listener ...");
}
try {
C0528y6 mediaProcessor = this.f52896a.getMediaProcessor();
if (mediaProcessor != null) {
C0331j6 c0331j6 = mediaProcessor.f53252d;
if (c0331j6 != null) {
c0331j6.a();
}
mediaProcessor.f53252d = null;
}
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "unRegisterDeviceMuteEventListener");
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterDeviceMuteEventListener() request from creative; ")));
}
}
}
@JavascriptInterface
public final void unregisterDeviceVolumeChangeEventListener(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "unregisterDeviceVolumeChangeEventListener called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "Unregister device volume change listener ...");
}
try {
C0528y6 mediaProcessor = this.f52896a.getMediaProcessor();
if (mediaProcessor != null) {
C0331j6 c0331j6 = mediaProcessor.f53253e;
if (c0331j6 != null) {
c0331j6.a();
}
mediaProcessor.f53253e = null;
}
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "unregisterDeviceVolumeChangeEventListener");
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterDeviceVolumeChangeEventListener() request from creative; ")));
}
}
}
@JavascriptInterface
public final void unregisterHeadphonePluggedEventListener(@Nullable String str) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "unregisterHeadphonePluggedEventListener called");
}
if (this.f52896a == null) {
A4 a42 = this.f52899d;
if (a42 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a42).b(str3, "Found a null instance of render view!");
return;
}
return;
}
A4 a43 = this.f52899d;
if (a43 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a43).a(str4, "Unregister headphone plugged event listener ...");
}
try {
C0528y6 mediaProcessor = this.f52896a.getMediaProcessor();
if (mediaProcessor != null) {
C0331j6 c0331j6 = mediaProcessor.f53254f;
if (c0331j6 != null) {
c0331j6.a();
}
mediaProcessor.f53254f = null;
}
} catch (Exception e2) {
this.f52896a.a(str, "Unexpected error", "unregisterHeadphonePluggedEventListener");
A4 a44 = this.f52899d;
if (a44 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterHeadphonePluggedEventListener() request from creative; ")));
}
}
}
@JavascriptInterface
public final void useCustomClose(@Nullable String str, boolean z) {
A4 a4 = this.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
((B4) a4).a(str2, "useCustomClose called:" + z);
}
new Handler(this.f52896a.getContainerContext().getMainLooper()).post(new ze(this, z, str, 1));
}
@JavascriptInterface
public final void zoom(@NotNull String jsCallbackNamespace, int i2) {
Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
A4 a4 = this.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
((B4) a4).a(str, "zoom is called " + jsCallbackNamespace + ' ' + i2);
}
AbstractC0224bb.a(new androidx.core.content.res.b(this, i2, 6));
}
public static final void b(C0411p5 this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.n();
} catch (Exception e2) {
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
((B4) a4).b(str, Cc.a(e2, A5.a(str, "access$getTAG$p(...)", "SDK encountered unexpected error in getting/setting current position; ")));
}
}
}
public static final void a(C0411p5 this$0, String str, int i2, String str2, float f2, boolean z) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
if (this$0.f52896a.getEmbeddedBrowserJSCallbacks() == null) {
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str3 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
((B4) a4).b(str3, "Found a null instance of EmbeddedBrowserJSCallback instance to customExpand");
return;
}
return;
}
A4 a42 = this$0.f52899d;
if (a42 != null) {
String str4 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
((B4) a42).a(str4, "Custom expand called. Url: " + str);
}
EnumC0383n3 enumC0383n3 = EnumC0383n3.values()[i2];
if (enumC0383n3 == EnumC0383n3.f52853a) {
if (this$0.f52896a.getLandingPageHandler().a(str2, str) == 3) {
InterfaceC0396o3 embeddedBrowserJSCallbacks = this$0.f52896a.getEmbeddedBrowserJSCallbacks();
if (embeddedBrowserJSCallbacks != null) {
((C0329j4) embeddedBrowserJSCallbacks).a(str, enumC0383n3, f2, z, this$0.f52896a.getViewTouchTimestamp(), this$0.f52896a.m());
return;
}
return;
}
InterfaceC0396o3 embeddedBrowserJSCallbacks2 = this$0.f52896a.getEmbeddedBrowserJSCallbacks();
if (embeddedBrowserJSCallbacks2 != null) {
C0357l4.a(((C0329j4) embeddedBrowserJSCallbacks2).f52697a);
return;
}
return;
}
InterfaceC0396o3 embeddedBrowserJSCallbacks3 = this$0.f52896a.getEmbeddedBrowserJSCallbacks();
if (embeddedBrowserJSCallbacks3 != null) {
((C0329j4) embeddedBrowserJSCallbacks3).a(str, enumC0383n3, f2, z, this$0.f52896a.getViewTouchTimestamp(), this$0.f52896a.m());
}
} catch (Exception e2) {
this$0.f52896a.a(str2, "Unexpected error", "customExpand");
Z5.a((byte) 1, "InMobi", "Failed to custom expand ad; SDK encountered an unexpected error");
A4 a43 = this$0.f52899d;
if (a43 != null) {
String str5 = AbstractC0424q5.f52929a;
((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling customExpand() request; ")));
}
}
}
public static final void b(C0411p5 this$0, String str) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.l();
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "resize");
String str2 = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
Z5.a((byte) 1, str2, "Could not resize ad; SDK encountered an unexpected error");
A4 a4 = this$0.f52899d;
if (a4 != null) {
((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered an unexpected error in handling resize() request; ")));
}
}
}
public static final void c(C0411p5 this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.o();
} catch (Exception e2) {
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
((B4) a4).b(str, Cc.a(e2, A5.a(str, "access$getTAG$p(...)", "SDK encountered unexpected error in getting/setting default position; ")));
}
}
}
public static final void c(C0411p5 this$0, String json) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(json, "$orientationPropertiesString");
C0264e9 op = this$0.f52896a.getOrientationProperties();
if (op != null) {
Intrinsics.checkNotNullParameter(json, "json");
Intrinsics.checkNotNullParameter(op, "op");
C0264e9 c0264e9 = new C0264e9();
c0264e9.f52472d = json;
try {
JSONObject jSONObject = new JSONObject(json);
String optString = jSONObject.optString("forceOrientation", op.f52470b);
Intrinsics.checkNotNullExpressionValue(optString, "optString(...)");
Intrinsics.checkNotNullParameter(optString, "<set-?>");
c0264e9.f52470b = optString;
c0264e9.f52469a = jSONObject.optBoolean("allowOrientationChange", op.f52469a);
String optString2 = jSONObject.optString("direction", op.f52471c);
Intrinsics.checkNotNullExpressionValue(optString2, "optString(...)");
Intrinsics.checkNotNullParameter(optString2, "<set-?>");
c0264e9.f52471c = optString2;
if (!Intrinsics.c(c0264e9.f52470b, "portrait") && !Intrinsics.c(c0264e9.f52470b, "landscape")) {
Intrinsics.checkNotNullParameter("none", "<set-?>");
c0264e9.f52470b = "none";
}
if (!Intrinsics.c(c0264e9.f52471c, "left") && !Intrinsics.c(c0264e9.f52471c, "right")) {
Intrinsics.checkNotNullParameter("right", "<set-?>");
c0264e9.f52471c = "right";
}
} catch (JSONException unused) {
c0264e9 = null;
}
this$0.f52898c = c0264e9;
}
C0264e9 c0264e92 = this$0.f52898c;
if (c0264e92 != null) {
this$0.f52896a.setOrientationProperties(c0264e92);
}
}
public static final void b(C0411p5 this$0, boolean z, String str) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.e(z);
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "useCustomClose");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered internal error in handling useCustomClose() request from creative; ")));
}
}
}
public static final void a(C0411p5 this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (this$0.f52896a.getEmbeddedBrowserJSCallbacks() == null) {
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str = AbstractC0424q5.f52929a;
Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
((B4) a4).b(str, "Found a null instance of EmbeddedBrowserJSCallback instance to closeCustomExpand");
return;
}
return;
}
InterfaceC0396o3 embeddedBrowserJSCallbacks = this$0.f52896a.getEmbeddedBrowserJSCallbacks();
if (embeddedBrowserJSCallbacks != null) {
C0357l4.a(((C0329j4) embeddedBrowserJSCallbacks).f52697a);
}
}
public static final void a(C0411p5 this$0, String str) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
r referenceContainer = this$0.f52896a.getReferenceContainer();
if (referenceContainer != null) {
referenceContainer.a();
}
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "close");
Z5.a((byte) 1, "InMobi", "Failed to close ad; SDK encountered an unexpected error");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered an expected error in handling the close() request from creative; ")));
}
}
}
public static final void a(C0411p5 this$0, boolean z, String str) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
this$0.f52896a.d(z);
} catch (Exception e2) {
this$0.f52896a.a(str, "Unexpected error", "disableCloseRegion");
A4 a4 = this$0.f52899d;
if (a4 != null) {
String str2 = AbstractC0424q5.f52929a;
((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered unexpected error in handling disableCloseRegion() request from creative; ")));
}
}
}
public static final void a(C0411p5 this$0, int i2) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.f52896a.setInitialScale(i2);
}
}