正在查看: FileWipe Pro v3.0.0 应用的 AppLovinFullscreenActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 AppLovinFullscreenActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.adview;
import android.R;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.window.OnBackInvokedCallback;
import android.window.OnBackInvokedDispatcher;
import androidx.core.app.NotificationCompat;
import com.applovin.impl.a2;
import com.applovin.impl.a7;
import com.applovin.impl.adview.activity.FullscreenAdService;
import com.applovin.impl.c0;
import com.applovin.impl.d;
import com.applovin.impl.e;
import com.applovin.impl.g;
import com.applovin.impl.h2;
import com.applovin.impl.i1;
import com.applovin.impl.k0;
import com.applovin.impl.l4;
import com.applovin.impl.n4;
import com.applovin.impl.r1;
import com.applovin.impl.r7;
import com.applovin.impl.sdk.ad.AppLovinAdImpl;
import com.applovin.impl.sdk.k;
import com.applovin.impl.sdk.o;
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.y1;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;
public class AppLovinFullscreenActivity extends Activity implements i1 {
private static final Set f2021i = Collections.newSetFromMap(new WeakHashMap());
private static final Object f2022j = new Object();
public static h2 parentInterstitialWrapper;
private k f2023a;
private r1 f2024b;
private final AtomicBoolean f2025c = new AtomicBoolean(true);
private com.applovin.impl.adview.activity.a f2026d;
private b f2027e;
private boolean f2028f;
private c0 f2029g;
private long f2030h;
public static class b implements OnBackInvokedCallback {
private final Runnable f2032a;
public b(Runnable runnable) {
this.f2032a = runnable;
}
public void onBackInvoked() {
this.f2032a.run();
}
}
@Override
public void dismiss(String str) {
OnBackInvokedDispatcher onBackInvokedDispatcher;
if (k0.j() && this.f2027e != null) {
onBackInvokedDispatcher = getOnBackInvokedDispatcher();
onBackInvokedDispatcher.unregisterOnBackInvokedCallback(this.f2027e);
this.f2027e = null;
}
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.a(str);
} else {
finish();
}
}
@Override
public void onBackPressed() {
c();
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.a(configuration);
}
}
@Override
public void onCreate(Bundle bundle) {
OnBackInvokedDispatcher onBackInvokedDispatcher;
super.onCreate(bundle);
if (bundle != null && parentInterstitialWrapper == null) {
o.j("AppLovinFullscreenActivity", "Dismissing ad. Activity was destroyed while in background.");
dismiss("activity_destroyed_while_in_background");
return;
}
try {
requestWindowFeature(1);
} catch (Throwable th) {
o.c("AppLovinFullscreenActivity", "Failed to request window feature", th);
}
getWindow().setFlags(1024, 1024);
getWindow().addFlags(C.DEFAULT_MUXED_BUFFER_SIZE);
getWindow().addFlags(NotificationCompat.FLAG_HIGH_PRIORITY);
View findViewById = findViewById(R.id.content);
findViewById.setBackgroundColor(-16777216);
if (TextUtils.isEmpty(getIntent().getStringExtra("com.applovin.interstitial.sdk_key"))) {
h2 h2Var = parentInterstitialWrapper;
if (h2Var != null && h2Var.f() != null) {
h2.a(parentInterstitialWrapper.f(), parentInterstitialWrapper.c(), "Empty SDK key", (Throwable) null, this);
}
finish();
return;
}
k a10 = AppLovinSdk.getInstance(this).a();
this.f2023a = a10;
this.f2028f = ((Boolean) a10.a(l4.f2973q2)).booleanValue();
findViewById.setFitsSystemWindows(true);
if (k0.b()) {
r7.a(findViewById, this.f2023a);
}
h2 h2Var2 = parentInterstitialWrapper;
if (h2Var2 != null && h2Var2.f() != null) {
com.applovin.impl.sdk.ad.b f10 = parentInterstitialWrapper.f();
if (f10.C0()) {
g.a(f10, this, this.f2023a);
}
}
d.a(this.f2028f, this);
if (k0.j() && ((Boolean) this.f2023a.a(l4.E5)).booleanValue()) {
this.f2027e = new b(new ad.d(3, this));
onBackInvokedDispatcher = getOnBackInvokedDispatcher();
onBackInvokedDispatcher.registerOnBackInvokedCallback(0, this.f2027e);
}
a();
b();
Integer num = (Integer) this.f2023a.a(l4.f2888d6);
if (num.intValue() > 0) {
synchronized (f2022j) {
Set set = f2021i;
set.add(this);
a7.a("AppLovinFullscreenActivity", set.size(), num.intValue(), this.f2023a.E());
}
}
h2 h2Var3 = parentInterstitialWrapper;
if (h2Var3 != null) {
r1.a(h2Var3.f(), parentInterstitialWrapper.b(), parentInterstitialWrapper.c(), parentInterstitialWrapper.d(), parentInterstitialWrapper.h(), this.f2023a, this, new a());
return;
}
Intent intent = new Intent(this, (Class<?>) FullscreenAdService.class);
com.applovin.impl.adview.activity.a aVar = new com.applovin.impl.adview.activity.a(this, this.f2023a);
this.f2026d = aVar;
bindService(intent, aVar, 1);
if (k0.h()) {
String str = this.f2023a.n0().getExtraParameters().get("disable_set_data_dir_suffix");
if (StringUtils.isValidString(str) && Boolean.parseBoolean(str)) {
return;
}
try {
WebView.setDataDirectorySuffix(String.valueOf(Process.myPid()));
} catch (Throwable unused) {
}
}
}
@Override
public void onDestroy() {
k kVar = this.f2023a;
if (kVar != null && ((Boolean) kVar.a(l4.X1)).booleanValue()) {
this.f2023a.p0().b(n4.J);
this.f2023a.p0().b(n4.L);
this.f2023a.p0().b(n4.M);
}
if (this.f2029g != null) {
this.f2023a.p0().b(n4.K);
this.f2029g.a();
this.f2029g = null;
}
com.applovin.impl.adview.activity.a aVar = this.f2026d;
if (aVar != null) {
try {
unbindService(aVar);
} catch (Throwable unused) {
}
}
r1 r1Var = this.f2024b;
if (r1Var != null) {
if (r1Var.h()) {
this.f2024b.s();
} else {
long c4 = this.f2024b.c();
if (c4 >= 0) {
if (c4 == 0) {
this.f2024b.d(true);
}
AppLovinSdkUtils.runOnUiThreadDelayed(new bd.b(3, this, parentInterstitialWrapper), c4);
} else {
a(this.f2024b, false, false);
}
}
}
parentInterstitialWrapper = null;
super.onDestroy();
}
@Override
public boolean onKeyDown(int i10, KeyEvent keyEvent) {
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.a(i10, keyEvent);
}
return super.onKeyDown(i10, keyEvent);
}
@Override
public void onPause() {
super.onPause();
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.t();
}
}
@Override
public void onResume() {
r1 r1Var;
try {
super.onResume();
if (this.f2025c.get() || (r1Var = this.f2024b) == null) {
return;
}
r1Var.u();
} catch (IllegalArgumentException e4) {
this.f2023a.O();
if (o.a()) {
this.f2023a.O().a("AppLovinFullscreenActivity", "Error was encountered in onResume().", e4);
}
this.f2023a.E().a("AppLovinFullscreenActivity", "onResume", e4);
dismiss("activity_on_resume_error");
}
}
@Override
public void onStop() {
super.onStop();
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.v();
}
}
@Override
public void onWindowFocusChanged(boolean z3) {
if (this.f2024b != null) {
if (!this.f2025c.getAndSet(false)) {
this.f2024b.b(z3);
}
if (z3) {
d.a(this.f2028f, this);
}
}
super.onWindowFocusChanged(z3);
}
public void setPresenter(r1 r1Var) {
this.f2024b = r1Var;
}
public class a implements r1.f {
public a() {
}
@Override
public void a(r1 r1Var) {
AppLovinFullscreenActivity.this.f2024b = r1Var;
r1Var.x();
}
@Override
public void a(String str, Throwable th) {
com.applovin.impl.sdk.ad.b f10 = AppLovinFullscreenActivity.parentInterstitialWrapper.f();
h2.a(f10, AppLovinFullscreenActivity.parentInterstitialWrapper.c(), str, th, AppLovinFullscreenActivity.this);
HashMap<String, String> hashMap = CollectionUtils.hashMap("source", "createAppLovinFullscreenActivity");
CollectionUtils.putStringIfValid("error_message", str, hashMap);
CollectionUtils.putStringIfValid("top_main_method", th.toString(), hashMap);
AppLovinFullscreenActivity.this.f2023a.g().a(y1.f4711s, f10, hashMap);
}
}
private void b() {
k kVar = this.f2023a;
if (kVar == null || !((Boolean) kVar.a(l4.Y1)).booleanValue()) {
return;
}
Long l = (Long) this.f2023a.a(l4.Z1);
this.f2029g = c0.a(l.longValue(), true, this.f2023a, new bd.b(2, this, l));
}
public void c() {
r1 r1Var = this.f2024b;
if (r1Var != null) {
r1Var.r();
}
if (a7.e(getApplicationContext())) {
super.onBackPressed();
}
}
public void a(h2 h2Var) {
boolean z3 = this.f2024b.z();
boolean z8 = false;
if (z3) {
boolean i10 = h2Var.i();
if (!i10) {
this.f2024b.d(false);
}
z8 = i10;
}
a(this.f2024b, z3, z8);
}
private void a(r1 r1Var, boolean z3, boolean z8) {
r1Var.a("activity_destroyed_by_app_relaunch");
if (this.f2023a != null) {
HashMap<String, String> hashMap = CollectionUtils.hashMap("source", "onDestroyAppLovinFullScreenActivity");
h2 h2Var = parentInterstitialWrapper;
com.applovin.impl.sdk.ad.b f10 = h2Var != null ? h2Var.f() : null;
hashMap.putAll(a2.a((AppLovinAdImpl) f10));
JSONObject jSONObject = new JSONObject();
JsonUtils.putBoolean(jSONObject, "reshow_attempted", z3);
JsonUtils.putBoolean(jSONObject, "reshow_success", z8);
if (f10 != null) {
JsonUtils.putInt(jSONObject, "reshow_count", f10.b0());
}
hashMap.put("details", jSONObject.toString());
this.f2023a.E().d(y1.f4698j0, hashMap);
}
r1Var.s();
}
private void a() {
h2 h2Var;
k kVar = this.f2023a;
if (kVar == null || !((Boolean) kVar.a(l4.X1)).booleanValue() || (h2Var = parentInterstitialWrapper) == null || h2Var.f() == null) {
return;
}
com.applovin.impl.sdk.ad.b f10 = parentInterstitialWrapper.f();
List j5 = f10.j();
if (CollectionUtils.isEmpty(j5)) {
return;
}
e eVar = (e) j5.get(0);
JSONObject jSONObject = new JSONObject();
JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_url", eVar.c());
JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_backup_url", eVar.a());
this.f2023a.p0().b(n4.L, jSONObject.toString());
this.f2023a.p0().b(n4.J, Long.valueOf(System.currentTimeMillis()));
this.f2023a.p0().b(n4.M, CollectionUtils.toJsonString(a2.a((AppLovinAdImpl) f10), JsonUtils.EMPTY_JSON));
}
public void a(Long l) {
this.f2030h = l.longValue() + this.f2030h;
this.f2023a.p0().b(n4.K, Long.valueOf(this.f2030h));
}
}