导航菜单

页面标题

页面副标题

Jurassic World v1.83.4 - AppLovinFullscreenActivity.java 源代码

正在查看: Jurassic World v1.83.4 应用的 AppLovinFullscreenActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.applovin.adview;

import android.R;
import android.app.Activity;
import android.content.Intent;
import android.content.ServiceConnection;
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 androidx.core.view.ViewCompat;
import com.applovin.impl.adview.activity.FullscreenAdService;
import com.applovin.impl.ma;
import com.applovin.impl.p9;
import com.applovin.impl.r;
import com.applovin.impl.s;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
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.sj;
import com.applovin.impl.t6;
import com.applovin.impl.tb;
import com.applovin.impl.u9;
import com.applovin.impl.uj;
import com.applovin.impl.yp;
import com.applovin.impl.z3;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkSettings;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;

public class AppLovinFullscreenActivity extends Activity implements t6 {
    public static tb parentInterstitialWrapper;

    private j f103a;
    private p9 b;
    private final AtomicBoolean c = new AtomicBoolean(true);
    private com.applovin.impl.adview.activity.a d;
    private b f;
    private boolean g;

    private static class b implements OnBackInvokedCallback {

        private final Runnable f105a;

        protected b(Runnable runnable) {
            this.f105a = runnable;
        }

        @Override
        public void onBackInvoked() {
            this.f105a.run();
        }
    }

    public void b() {
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.u();
        }
        if (yp.e(getApplicationContext())) {
            super.onBackPressed();
        }
    }

    public void dismiss() {
        if (z3.l() && this.f != null) {
            getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(this.f);
            this.f = null;
        }
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.f();
        } else {
            finish();
        }
    }

    @Override
    public void onBackPressed() {
        b();
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.a(configuration);
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null && parentInterstitialWrapper == null) {
            n.j("AppLovinFullscreenActivity", "Dismissing ad. Activity was destroyed while in background.");
            dismiss();
            return;
        }
        try {
            requestWindowFeature(1);
        } catch (Throwable th) {
            n.c("AppLovinFullscreenActivity", "Failed to request window feature", th);
        }
        getWindow().setFlags(1024, 1024);
        getWindow().addFlags(16777216);
        getWindow().addFlags(128);
        View findViewById = findViewById(R.id.content);
        findViewById.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
        String stringExtra = getIntent().getStringExtra("com.applovin.interstitial.sdk_key");
        if (TextUtils.isEmpty(stringExtra)) {
            tb tbVar = parentInterstitialWrapper;
            if (tbVar != null && tbVar.f() != null) {
                tb.a(parentInterstitialWrapper.f(), parentInterstitialWrapper.c(), "Empty SDK key", (Throwable) null, this);
            }
            finish();
            return;
        }
        j a2 = AppLovinSdk.getInstance(stringExtra, new AppLovinSdkSettings(this), this).a();
        this.f103a = a2;
        this.g = ((Boolean) a2.a(sj.J2)).booleanValue();
        findViewById.setFitsSystemWindows(true);
        r.a(this.g, this);
        if (z3.l() && ((Boolean) this.f103a.a(sj.V5)).booleanValue()) {
            this.f = new b(new Runnable() {
                @Override
                public final void run() {
                    AppLovinFullscreenActivity.this.b();
                }
            });
            getOnBackInvokedDispatcher().registerOnBackInvokedCallback(0, this.f);
        }
        a();
        tb tbVar2 = parentInterstitialWrapper;
        if (tbVar2 != null) {
            p9.a(tbVar2.f(), parentInterstitialWrapper.b(), parentInterstitialWrapper.c(), parentInterstitialWrapper.d(), parentInterstitialWrapper.h(), this.f103a, 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.f103a);
        this.d = aVar;
        bindService(intent, (ServiceConnection) aVar, 1);
        if (z3.j()) {
            String str = (String) this.f103a.g0().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
    protected void onDestroy() {
        j jVar = this.f103a;
        if (jVar != null && ((Boolean) jVar.a(sj.s2)).booleanValue()) {
            this.f103a.i0().b(uj.L);
            this.f103a.i0().b(uj.M);
            this.f103a.i0().b(uj.N);
        }
        com.applovin.impl.adview.activity.a aVar = this.d;
        if (aVar != null) {
            try {
                unbindService(aVar);
            } catch (Throwable unused) {
            }
        }
        p9 p9Var = this.b;
        if (p9Var != null) {
            if (p9Var.B()) {
                parentInterstitialWrapper.j();
            }
            if (!this.b.k()) {
                this.b.f();
            }
            this.b.v();
        }
        parentInterstitialWrapper = null;
        super.onDestroy();
    }

    @Override
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.a(i, keyEvent);
        }
        return super.onKeyDown(i, keyEvent);
    }

    @Override
    protected void onPause() {
        super.onPause();
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.w();
        }
    }

    @Override
    protected void onResume() {
        p9 p9Var;
        try {
            super.onResume();
            if (this.c.get() || (p9Var = this.b) == null) {
                return;
            }
            p9Var.x();
        } catch (IllegalArgumentException e) {
            this.f103a.J();
            if (n.a()) {
                this.f103a.J().a("AppLovinFullscreenActivity", "Error was encountered in onResume().", e);
            }
            this.f103a.E().a("AppLovinFullscreenActivity", "onResume", e);
            dismiss();
        }
    }

    @Override
    protected void onStop() {
        super.onStop();
        p9 p9Var = this.b;
        if (p9Var != null) {
            p9Var.y();
        }
    }

    @Override
    public void onWindowFocusChanged(boolean z) {
        if (this.b != null) {
            if (!this.c.getAndSet(false) || (this.b instanceof u9)) {
                this.b.c(z);
            }
            if (z) {
                r.a(this.g, this);
            }
        }
        super.onWindowFocusChanged(z);
    }

    private void a() {
        tb tbVar;
        j jVar = this.f103a;
        if (jVar == null || !((Boolean) jVar.a(sj.s2)).booleanValue() || (tbVar = parentInterstitialWrapper) == null || tbVar.f() == null) {
            return;
        }
        com.applovin.impl.sdk.ad.b f = parentInterstitialWrapper.f();
        List g = f.g();
        if (CollectionUtils.isEmpty(g)) {
            return;
        }
        s sVar = (s) g.get(0);
        JSONObject jSONObject = new JSONObject();
        JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_url", sVar.c());
        JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_backup_url", sVar.a());
        this.f103a.i0().b(uj.M, jSONObject.toString());
        this.f103a.i0().b(uj.L, Long.valueOf(System.currentTimeMillis()));
        this.f103a.i0().b(uj.N, CollectionUtils.toJsonString(ma.a(f), "{}"));
    }

    class a implements p9.d {
        a() {
        }

        public void a(p9 p9Var) {
            AppLovinFullscreenActivity.this.b = p9Var;
            p9Var.A();
        }

        public void a(String str, Throwable th) {
            tb.a(AppLovinFullscreenActivity.parentInterstitialWrapper.f(), AppLovinFullscreenActivity.parentInterstitialWrapper.c(), str, th, AppLovinFullscreenActivity.this);
        }
    }

    public void setPresenter(p9 p9Var) {
        this.b = p9Var;
    }
}