正在查看: CallApp v2.226 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl.adview;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import com.amazon.aps.shared.util.APSSharedUtil;
import com.amazonaws.services.s3.util.Mimetypes;
import com.applovin.adview.AppLovinAdView;
import com.applovin.adview.AppLovinAdViewDisplayErrorCode;
import com.applovin.adview.AppLovinAdViewEventListener;
import com.applovin.adview.AppLovinFullscreenActivity;
import com.applovin.communicator.AppLovinCommunicator;
import com.applovin.communicator.AppLovinCommunicatorMessage;
import com.applovin.communicator.AppLovinCommunicatorSubscriber;
import com.applovin.impl.a8;
import com.applovin.impl.adview.k;
import com.applovin.impl.f2;
import com.applovin.impl.f6;
import com.applovin.impl.g1;
import com.applovin.impl.h4;
import com.applovin.impl.l2;
import com.applovin.impl.l4;
import com.applovin.impl.n2;
import com.applovin.impl.n4;
import com.applovin.impl.q7;
import com.applovin.impl.r5;
import com.applovin.impl.s3;
import com.applovin.impl.sdk.AppLovinAdServiceImpl;
import com.applovin.impl.sdk.ad.b;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.u3;
import com.applovin.impl.v1;
import com.applovin.impl.x1;
import com.applovin.impl.y1;
import com.applovin.impl.z6;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdSize;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.json.JSONObject;
import s.v;
public class a implements AppLovinCommunicatorSubscriber {
private volatile AppLovinAdLoadListener A;
private volatile AppLovinAdDisplayListener B;
private volatile AppLovinAdViewEventListener C;
private volatile AppLovinAdClickListener D;
private Context f8401a;
private ViewGroup f8402b;
private com.applovin.impl.sdk.j f8403c;
private AppLovinAdServiceImpl f8404d;
private com.applovin.impl.sdk.n f8405e;
private AppLovinCommunicator f8406f;
private b f8407g;
private AppLovinAdSize f8409i;
private String f8410j;
private v f8411k;
private com.applovin.impl.adview.c f8412l;
private e f8413m;
private com.applovin.impl.adview.b f8414n;
private WebView f8415o;
private k f8416p;
private Runnable f8417q;
private Runnable f8418r;
private final Map f8408h = androidx.fragment.app.n.u();
private volatile com.applovin.impl.sdk.ad.b f8419s = null;
private volatile AppLovinAd f8420t = null;
private f f8421u = null;
private f f8422v = null;
private final AtomicReference f8423w = new AtomicReference();
private final AtomicBoolean f8424x = new AtomicBoolean();
private volatile boolean f8425y = false;
private volatile boolean f8426z = false;
public interface b {
void a(a aVar);
}
public class c implements Runnable {
private c() {
}
@Override
public void run() {
if (a.this.f8414n != null) {
a.this.f8414n.setVisibility(8);
}
}
}
public class d implements Runnable {
public class C0058a implements k.a {
public C0058a() {
}
@Override
public void a() {
a.this.f8414n.addView(a.this.f8416p, new ViewGroup.LayoutParams(-1, -1));
}
@Override
public void onFailure() {
com.applovin.impl.sdk.n unused = a.this.f8405e;
if (com.applovin.impl.sdk.n.a()) {
a.this.f8405e.b("AppLovinAdView", "Watermark failed to render.");
}
}
}
private d() {
}
@Override
public void run() {
if (a.this.f8419s != null) {
if (a.this.f8414n == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to render advertisement for ad #" + a.this.f8419s.getAdIdNumber() + ". Please make sure you are not calling AppLovinAdView.destroy() prematurely.");
l2.a(a.this.C, a.this.f8419s, (AppLovinAdView) null, AppLovinAdViewDisplayErrorCode.WEBVIEW_NOT_FOUND);
return;
}
a.this.t();
com.applovin.impl.sdk.n unused = a.this.f8405e;
if (com.applovin.impl.sdk.n.a()) {
a.this.f8405e.a("AppLovinAdView", "Rendering advertisement ad for #" + a.this.f8419s.getAdIdNumber() + APSSharedUtil.TRUNCATE_SEPARATOR);
}
a.b(a.this.f8414n, a.this.f8419s.getSize(), a.this.f8419s.v0());
if (a.this.f8416p != null) {
q7.c(a.this.f8416p);
a.this.f8416p = null;
}
x1 x1Var = new x1(a.this.f8408h, a.this.f8403c);
if (x1Var.c()) {
a.this.f8416p = new k(x1Var, a.this.f8401a);
a.this.f8416p.a(new C0058a());
}
a.this.f8414n.setAdHtmlLoaded(false);
a.this.f8414n.a(a.this.f8419s);
if (a.this.f8419s.getSize() == AppLovinAdSize.INTERSTITIAL || a.this.f8426z) {
return;
}
a.this.f8419s.setHasShown(true);
}
}
}
public static class e implements AppLovinAdLoadListener {
private final a f8430a;
public e(a aVar, com.applovin.impl.sdk.j jVar) {
if (aVar == null) {
throw new IllegalArgumentException("No view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
this.f8430a = aVar;
}
private a a() {
return this.f8430a;
}
@Override
public void adReceived(AppLovinAd appLovinAd) {
a a8 = a();
if (a8 != null) {
a8.b(appLovinAd);
} else {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Ad view has been garbage collected by the time an ad was received");
}
}
@Override
public void failedToReceiveAd(int i8) {
a a8 = a();
if (a8 != null) {
a8.b(i8);
}
}
}
private void B() {
if (this.f8405e != null && com.applovin.impl.sdk.n.a() && com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "Destroying...");
}
a8.b(this.f8414n);
this.f8414n = null;
a8.b(this.f8415o);
this.f8415o = null;
this.f8411k = null;
this.A = null;
this.B = null;
this.D = null;
this.C = null;
this.f8426z = true;
}
private void v() {
if (this.f8419s.T0()) {
int a8 = this.f8403c.p().a();
if (com.applovin.impl.sdk.h.a(a8)) {
this.f8414n.a("javascript:al_muteSwitchOn();");
} else if (a8 == 2) {
this.f8414n.a("javascript:al_muteSwitchOff();");
}
}
}
public void A() {
if (!this.f8425y || this.f8426z) {
return;
}
this.f8426z = true;
}
public void C() {
if (this.f8425y) {
AppLovinAd appLovinAd = (AppLovinAd) this.f8423w.getAndSet(null);
if (appLovinAd != null) {
c(appLovinAd);
}
this.f8426z = false;
}
}
@Override
public String getCommunicatorId() {
return "a";
}
@Override
public void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage) {
if ("crash_applovin_ad_webview".equals(appLovinCommunicatorMessage.getTopic())) {
a(new o(this, 4));
}
}
public void w() {
if (this.f8421u != null || this.f8422v != null) {
a();
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "Ad: " + this.f8419s + " closed.");
}
a(this.f8418r);
l2.b(this.B, this.f8419s);
this.f8419s = null;
}
public void x() {
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "AdView fully watched...");
}
b bVar = this.f8407g;
if (bVar != null) {
bVar.a(this);
}
}
public void y() {
if (this.f8419s != null && this.f8419s.u0()) {
com.applovin.impl.g.a(this.f8414n, this.f8403c);
} else if (com.applovin.impl.q.a(this.f8414n)) {
this.f8403c.E().c(v1.f10796r);
}
}
public void z() {
if (this.f8425y) {
l2.b(this.B, this.f8419s);
if (this.f8419s != null && this.f8419s.isOpenMeasurementEnabled() && z6.a(this.f8419s.getSize())) {
this.f8419s.getAdEventTracker().f();
}
if (this.f8414n == null || this.f8421u == null) {
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "onDetachedFromWindowCalled without an expanded ad present");
}
} else {
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "onDetachedFromWindowCalled with expanded ad present");
}
c();
}
}
}
public static void b(View view, AppLovinAdSize appLovinAdSize, boolean z8) {
if (view == null) {
return;
}
DisplayMetrics displayMetrics = view.getResources().getDisplayMetrics();
String label = appLovinAdSize.getLabel();
AppLovinAdSize appLovinAdSize2 = AppLovinAdSize.INTERSTITIAL;
int i8 = -1;
int applyDimension = (label.equals(appLovinAdSize2.getLabel()) || z8) ? -1 : appLovinAdSize.getWidth() == -1 ? displayMetrics.widthPixels : (int) TypedValue.applyDimension(1, appLovinAdSize.getWidth(), displayMetrics);
if (!appLovinAdSize.getLabel().equals(appLovinAdSize2.getLabel()) && !z8) {
i8 = appLovinAdSize.getHeight() == -1 ? displayMetrics.heightPixels : (int) TypedValue.applyDimension(1, appLovinAdSize.getHeight(), displayMetrics);
}
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(-2, -2);
}
layoutParams.width = applyDimension;
layoutParams.height = i8;
if (layoutParams instanceof RelativeLayout.LayoutParams) {
((RelativeLayout.LayoutParams) layoutParams).addRule(13);
}
view.setLayoutParams(layoutParams);
}
private void c() {
a(new o(this, 2));
}
public void m() {
this.f8414n.loadDataWithBaseURL("/", "<html></html>", Mimetypes.MIMETYPE_HTML, null, "");
}
public void n() {
com.applovin.impl.adview.b bVar;
d();
if (this.f8402b == null || (bVar = this.f8414n) == null || bVar.getParent() != null) {
return;
}
this.f8402b.addView(this.f8414n);
b(this.f8414n, this.f8419s.getSize(), this.f8419s.v0());
if (this.f8419s.isOpenMeasurementEnabled()) {
this.f8419s.getAdEventTracker().a((View) this.f8414n);
}
}
public void o() {
if (this.f8414n != null && this.f8421u != null) {
a();
}
B();
}
public void p() {
if (this.f8421u != null) {
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "Detaching expanded ad: " + this.f8421u.b());
}
this.f8422v = this.f8421u;
this.f8421u = null;
a(this.f8409i);
}
}
public void q() {
com.applovin.impl.sdk.ad.a b6;
f fVar = this.f8422v;
if (fVar == null && this.f8421u == null) {
return;
}
if (fVar != null) {
b6 = fVar.b();
this.f8422v.dismiss();
this.f8422v = null;
} else {
b6 = this.f8421u.b();
this.f8421u.dismiss();
this.f8421u = null;
}
l2.a(this.C, b6, (AppLovinAdView) this.f8402b);
}
public void r() {
f().loadUrl("chrome://crash");
}
public void t() {
com.applovin.impl.sdk.ad.b bVar = this.f8419s;
n2 n2Var = new n2();
n2Var.a().a(bVar).a(i());
if (!z6.a(bVar.getSize())) {
n2Var.a().a("Fullscreen Ad Properties").b(bVar);
}
n2Var.a(this.f8403c);
n2Var.a();
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", n2Var.toString());
}
}
public AppLovinAdViewEventListener e() {
return this.C;
}
public com.applovin.impl.adview.b f() {
return this.f8414n;
}
public com.applovin.impl.sdk.ad.b g() {
return this.f8419s;
}
public v h() {
return this.f8411k;
}
public AppLovinAdView i() {
return (AppLovinAdView) this.f8402b;
}
public com.applovin.impl.sdk.j j() {
return this.f8403c;
}
public AppLovinAdSize k() {
return this.f8409i;
}
public String l() {
return this.f8410j;
}
public void s() {
if (this.f8403c == null || this.f8413m == null || this.f8401a == null || !this.f8425y) {
com.applovin.impl.sdk.n.i("AppLovinAdView", "Unable to load next ad: AppLovinAdView is not initialized.");
} else {
this.f8404d.loadNextAd(this.f8410j, this.f8409i, this.f8413m);
}
}
public void u() {
if ((this.f8401a instanceof g1) && this.f8419s != null && this.f8419s.P() == b.EnumC0072b.DISMISS) {
((g1) this.f8401a).dismiss();
}
}
private void d() {
a(new o(this, 0));
}
public void c(AppLovinAd appLovinAd) {
a(appLovinAd, (String) null);
}
public void c(WebView webView) {
a(webView, (String) null);
}
public void a(AppLovinAdLoadListener appLovinAdLoadListener) {
this.A = appLovinAdLoadListener;
}
public void a(AppLovinAdDisplayListener appLovinAdDisplayListener) {
this.B = appLovinAdDisplayListener;
}
public void a(AppLovinAdViewEventListener appLovinAdViewEventListener) {
this.C = appLovinAdViewEventListener;
}
public void a(AppLovinAdClickListener appLovinAdClickListener) {
this.D = appLovinAdClickListener;
}
private void a(AppLovinAdView appLovinAdView, com.applovin.impl.sdk.j jVar, AppLovinAdSize appLovinAdSize, String str, Context context) {
if (appLovinAdView == null) {
throw new IllegalArgumentException("No parent view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (appLovinAdSize != null) {
this.f8403c = jVar;
this.f8404d = jVar.k();
this.f8405e = jVar.I();
this.f8406f = AppLovinCommunicator.getInstance(context);
this.f8409i = appLovinAdSize;
this.f8410j = str;
if (!(context instanceof AppLovinFullscreenActivity)) {
context = context.getApplicationContext();
}
this.f8401a = context;
this.f8402b = appLovinAdView;
this.f8412l = new com.applovin.impl.adview.c(this, jVar);
this.f8418r = new c();
this.f8417q = new d();
this.f8413m = new e(this, jVar);
a(appLovinAdSize);
return;
}
throw new IllegalArgumentException("No ad size specified");
}
public void b() {
a(new o(this, 3));
}
public void b(WebView webView) {
this.f8419s.getAdEventTracker().c(webView);
k kVar = this.f8416p;
if (kVar != null && kVar.a()) {
s3 adEventTracker = this.f8419s.getAdEventTracker();
k kVar2 = this.f8416p;
adEventTracker.b(webView, Collections.singletonList(new u3(kVar2, FriendlyObstructionPurpose.NOT_VISIBLE, kVar2.getIdentifier())));
} else {
this.f8419s.getAdEventTracker().a((View) webView);
}
this.f8419s.getAdEventTracker().h();
this.f8419s.getAdEventTracker().g();
}
public void a(AppLovinAdSize appLovinAdSize) {
try {
com.applovin.impl.adview.b bVar = new com.applovin.impl.adview.b(this.f8412l, this.f8403c, this.f8401a);
this.f8414n = bVar;
bVar.setBackgroundColor(0);
this.f8414n.setWillNotCacheDrawing(false);
this.f8402b.setBackgroundColor(0);
this.f8402b.addView(this.f8414n);
a(this.f8414n, appLovinAdSize);
if (!this.f8425y) {
a(this.f8418r);
}
a(new o(this, 5));
this.f8425y = true;
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Failed to initialize AdWebView", th);
this.f8403c.A().a("AppLovinAdView", "initAdWebView", th);
this.f8424x.set(true);
}
}
public void b(MotionEvent motionEvent) {
a aVar;
if (this.f8421u == null && (this.f8419s instanceof com.applovin.impl.sdk.ad.a) && this.f8414n != null) {
com.applovin.impl.sdk.ad.a aVar2 = (com.applovin.impl.sdk.ad.a) this.f8419s;
Context context = this.f8401a;
Activity b6 = context instanceof Activity ? (Activity) context : q7.b(this.f8414n, this.f8403c);
if (b6 != null && !b6.isFinishing()) {
ViewGroup viewGroup = this.f8402b;
if (viewGroup != null) {
viewGroup.removeView(this.f8414n);
}
f fVar = new f(aVar2, this.f8414n, b6, this.f8403c);
this.f8421u = fVar;
fVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
a.this.a(dialogInterface);
}
});
this.f8421u.show();
l2.c(this.C, this.f8419s, (AppLovinAdView) this.f8402b);
if (this.f8419s.isOpenMeasurementEnabled()) {
this.f8419s.getAdEventTracker().a((View) this.f8421u.c());
return;
}
return;
}
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to expand ad. No Activity found.");
Uri j8 = aVar2.j();
if (j8 != null) {
aVar = this;
this.f8404d.trackAndLaunchClick(aVar2, i(), aVar, j8, motionEvent, null);
} else {
aVar = this;
}
aVar.f8414n.a("javascript:al_onFailedExpand();");
}
}
private static void a(View view, AppLovinAdSize appLovinAdSize) {
b(view, appLovinAdSize, false);
}
public void a(AppLovinAdView appLovinAdView, Context context, AppLovinAdSize appLovinAdSize, String str, AppLovinSdk appLovinSdk, AttributeSet attributeSet) {
if (appLovinAdView == null) {
throw new IllegalArgumentException("No parent view specified");
}
if (context == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to build AppLovinAdView: no context provided. Please use a different constructor for this view.");
return;
}
if (appLovinAdSize == null && (appLovinAdSize = com.applovin.impl.q.a(attributeSet)) == null) {
appLovinAdSize = AppLovinAdSize.BANNER;
}
AppLovinAdSize appLovinAdSize2 = appLovinAdSize;
if (appLovinSdk == null) {
appLovinSdk = AppLovinSdk.getInstance(context);
}
if (appLovinSdk != null) {
a(appLovinAdView, appLovinSdk.a(), appLovinAdSize2, str, context);
if (com.applovin.impl.q.b(attributeSet)) {
s();
}
}
}
public void b(AppLovinAd appLovinAd) {
if (appLovinAd != null) {
if (!this.f8426z) {
c(appLovinAd);
} else {
this.f8423w.set(appLovinAd);
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "Ad view has paused when an ad was received, ad saved for later");
}
}
a((Runnable) new ab.a(19, this, appLovinAd));
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.b("AppLovinAdView", "No provided when to the view controller");
}
b(-1);
}
public void a(String str, Object obj) {
this.f8408h.put(str, obj);
}
public void a(AppLovinAd appLovinAd, String str) {
if (appLovinAd != null) {
z6.b(appLovinAd, this.f8403c);
if (this.f8425y) {
com.applovin.impl.sdk.ad.b bVar = (com.applovin.impl.sdk.ad.b) z6.a(appLovinAd, this.f8403c);
if (bVar == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to retrieve the loaded ad: " + appLovinAd);
l2.a(this.B, "Unable to retrieve the loaded ad");
return;
}
if (bVar == this.f8419s) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Attempting to show ad again: " + bVar);
if (((Boolean) this.f8403c.a(l4.f9313z1)).booleanValue()) {
if (this.B instanceof f2) {
l2.a(this.B, "Attempting to show ad again");
return;
} else {
if (!z6.c(this.f8403c)) {
this.f8403c.g().a(y1.f11012o0, bVar, CollectionUtils.hashMap("source", "attemptingAdReRender"));
return;
}
throw new IllegalStateException("Attempting to show ad again");
}
}
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f8405e.a("AppLovinAdView", "Rendering ad #" + bVar.getAdIdNumber() + " (" + bVar.getSize() + ")");
}
l2.b(this.B, this.f8419s);
if (this.f8419s != null && this.f8419s.isOpenMeasurementEnabled()) {
this.f8419s.getAdEventTracker().f();
}
this.f8423w.set(null);
this.f8420t = null;
this.f8419s = bVar;
if (this.f8419s.z0()) {
this.f8411k = this.f8403c.x().a(this);
this.f8403c.x().b(this.f8419s.A(), this.f8411k);
}
if (!this.f8426z && z6.a(this.f8409i)) {
this.f8403c.k().trackImpression(bVar);
}
if (this.f8421u != null) {
c();
}
a(this.f8417q);
return;
}
com.applovin.impl.sdk.n.i("AppLovinAdView", "Unable to render ad: AppLovinAdView is not initialized.");
return;
}
throw new IllegalArgumentException("No ad specified");
}
public void b(int i8) {
if (!this.f8426z) {
a(this.f8418r);
}
a((Runnable) new ab.b(this, i8, 1));
}
public void b(Uri uri) {
if (this.f8419s != null && this.f8419s.B0() && this.f8415o == null) {
String queryParameter = uri.getQueryParameter("tracking_id");
if (TextUtils.isEmpty(queryParameter)) {
this.f8403c.I();
if (com.applovin.impl.sdk.n.a()) {
this.f8403c.I().b("AppLovinAdView", "Invalid tracking id. Cannot initialize GA");
return;
}
return;
}
WebView webView = new WebView(this.f8401a);
this.f8415o = webView;
webView.setWebViewClient(new h4());
this.f8415o.getSettings().setJavaScriptEnabled(true);
this.f8415o.loadDataWithBaseURL((String) this.f8403c.a(l4.f9253q6), "<html><head><link rel=\"icon\" href=\"data:,\"><G-SCRIPT_TAG></head><body></body></html>".replace("<G-SCRIPT_TAG>", "<script src='https://www.googletagmanager.com/gtag/js?id=<G-TRACKING_ID>'></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '<G-TRACKING_ID>')</script>".replace("<G-TRACKING_ID>", queryParameter)), Mimetypes.MIMETYPE_HTML, "UTF-8", null);
}
}
public void a(WebView webView, String str) {
if (this.f8419s == null) {
return;
}
a(new t(webView, 2));
if (!((Boolean) this.f8403c.a(l4.M5)).booleanValue() || (str != null && str.startsWith(this.f8419s.h()))) {
try {
if (this.f8419s != this.f8420t) {
this.f8420t = this.f8419s;
v();
this.f8414n.setAdHtmlLoaded(true);
if (this.B != null) {
this.f8403c.w().d(this.f8419s);
this.f8403c.g().a(y1.f11009n, this.f8419s);
l2.a(this.B, this.f8419s);
if (this.f8419s.U0()) {
String str2 = (String) this.f8403c.i0().a(n4.L, "");
JSONObject jSONObject = new JSONObject();
JsonUtils.putString(jSONObject, "template_browser_package_name", str2);
this.f8414n.a("javascript:al_onAdViewRendered(" + jSONObject + ");");
} else {
this.f8414n.a("javascript:al_onAdViewRendered();");
}
}
if ((this.f8419s instanceof com.applovin.impl.sdk.ad.a) && this.f8419s.isOpenMeasurementEnabled()) {
this.f8403c.j0().a(new f6(this.f8403c, "StartOMSDK", new ab.a(18, this, webView)), r5.b.OTHER, 500L);
}
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Exception while notifying ad display listener", th);
com.applovin.impl.sdk.j jVar = this.f8403c;
if (jVar != null) {
jVar.A().a("AppLovinAdView", "onAdHtmlLoaded", th);
}
}
}
}
public void a(MotionEvent motionEvent) {
a((Runnable) new ab.a(17, this, motionEvent));
}
public void a(DialogInterface dialogInterface) {
a();
}
public void a() {
a(new o(this, 1));
}
public void a(com.applovin.impl.sdk.ad.b bVar, AppLovinAdView appLovinAdView, Uri uri, MotionEvent motionEvent, Bundle bundle) {
a aVar;
com.applovin.impl.sdk.ad.b bVar2;
if (appLovinAdView != null) {
aVar = this;
bVar2 = bVar;
this.f8404d.trackAndLaunchClick(bVar2, appLovinAdView, aVar, uri, motionEvent, bundle);
} else {
aVar = this;
bVar2 = bVar;
if (com.applovin.impl.sdk.n.a()) {
aVar.f8405e.b("AppLovinAdView", "Unable to process ad click - AppLovinAdView destroyed prematurely");
}
}
l2.a(aVar.D, bVar2);
}
public void a(AppLovinAd appLovinAd) {
if (this.f8424x.compareAndSet(true, false)) {
a(this.f8409i);
}
try {
if (this.A != null) {
this.A.adReceived(appLovinAd);
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Exception while running ad load callback: " + th.getMessage());
com.applovin.impl.sdk.j jVar = this.f8403c;
if (jVar != null) {
jVar.A().a("AppLovinAdView", "notifyAdLoadedCallback", th);
}
}
}
public void a(int i8) {
try {
if (this.A != null) {
this.A.failedToReceiveAd(i8);
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Exception while running app load callback", th);
com.applovin.impl.sdk.j jVar = this.f8403c;
if (jVar != null) {
jVar.A().a("AppLovinAdView", "notifyAdLoadFailedCallback", th);
}
}
}
private void a(Runnable runnable) {
AppLovinSdkUtils.runOnUiThread(runnable);
}
public void a(b bVar) {
this.f8407g = bVar;
}
public void a(Uri uri) {
if (this.f8419s == null || !this.f8419s.B0()) {
return;
}
if (this.f8415o == null) {
this.f8403c.I();
if (com.applovin.impl.sdk.n.a()) {
this.f8403c.I().a("AppLovinAdView", "GA is not initialized. Cannot fire GA event");
return;
}
return;
}
String queryParameter = uri.getQueryParameter("event_name");
String queryParameter2 = uri.getQueryParameter("event_params_json");
if (TextUtils.isEmpty(queryParameter)) {
this.f8403c.I();
if (com.applovin.impl.sdk.n.a()) {
this.f8403c.I().a("AppLovinAdView", "Invalid GA event name. Cannot fire GA event");
return;
}
return;
}
a(new androidx.fragment.app.c(this, 11, queryParameter2, queryParameter));
}
public void a(String str, String str2) {
String m8;
if (StringUtils.isValidString(str)) {
m8 = com.mobilefuse.sdk.assetsmanager.a.o("gtag('event', '", str2, "', ", str, ");");
} else {
m8 = com.mobilefuse.sdk.assetsmanager.a.m("gtag('event', '", str2, "')");
}
a8.a(this.f8415o, m8);
}
}