APKPure.apk(点击下载) / SplashActivity.java


package com.apkpure.aegon.main.activity;

import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.android.volley.toolbox.ImageRequest;
import com.apkpure.aegon.R;
import com.apkpure.aegon.app.newcard.model.AppCardData;
import com.apkpure.aegon.application.AegonApplication;
import com.apkpure.aegon.application.RealApplicationLike;
import com.apkpure.aegon.plugin.topon.api1.IAdErrorDelegate;
import com.apkpure.aegon.plugin.topon.api1.IAdInfoDelegate;
import com.apkpure.aegon.plugin.topon.api1.IAdStatusInfoDelegate;
import com.apkpure.aegon.plugin.topon.api1.ISplashAdDelegate;
import com.apkpure.aegon.plugin.topon.api1.ISplashAdListener;
import com.apkpure.aegon.proto.projecta_config_svr.projecta_config_svr.nano.GetOpenScreenCfgRsp;
import com.apkpure.aegon.proto.projecta_config_svr.projecta_config_svr.nano.OpenScreenInfo;
import com.apkpure.aegon.widgets.textview.RoundTextView;
import com.apkpure.proto.nano.ConfigBaseProtos;
import com.google.android.gms.analytics.ecommerce.Promotion;
import com.google.android.gms.common.internal.ServiceSpecificExtraArgs;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.tencent.trpcprotocol.projecta.search_svr.search_svr.nano.ExpInfo;
import com.tencent.trpcprotocol.projecta.vl_recall_channel.vlrecallchannel.nano.GetBannerSlotCountryRsp;
import e.g.a.c.n.f;
import e.g.a.c.n.g;
import e.g.a.e.f.a0;
import e.g.a.e.f.a1;
import e.g.a.e.f.b0;
import e.g.a.e.f.b1;
import e.g.a.e.f.c1;
import e.g.a.e.f.c2;
import e.g.a.e.f.d0;
import e.g.a.e.f.d1;
import e.g.a.e.f.d2;
import e.g.a.e.f.e1;
import e.g.a.e.f.f0;
import e.g.a.e.f.g0;
import e.g.a.e.f.g1;
import e.g.a.e.f.h0;
import e.g.a.e.f.h1;
import e.g.a.e.f.i0;
import e.g.a.e.f.i1;
import e.g.a.e.f.i2;
import e.g.a.e.f.j0;
import e.g.a.e.f.j1;
import e.g.a.e.f.j2;
import e.g.a.e.f.k1;
import e.g.a.e.f.l0;
import e.g.a.e.f.l1;
import e.g.a.e.f.m0;
import e.g.a.e.f.m1;
import e.g.a.e.f.n0;
import e.g.a.e.f.n1;
import e.g.a.e.f.n2.k;
import e.g.a.e.f.o0;
import e.g.a.e.f.o1;
import e.g.a.e.f.p0;
import e.g.a.e.f.q0;
import e.g.a.e.f.q1;
import e.g.a.e.f.r1;
import e.g.a.e.f.s0;
import e.g.a.e.f.s1;
import e.g.a.e.f.t0;
import e.g.a.e.f.t1;
import e.g.a.e.f.u;
import e.g.a.e.f.u0;
import e.g.a.e.f.u1;
import e.g.a.e.f.v;
import e.g.a.e.f.v0;
import e.g.a.e.f.w;
import e.g.a.e.f.w0;
import e.g.a.e.f.x;
import e.g.a.e.f.x0;
import e.g.a.e.f.y;
import e.g.a.e.f.y0;
import e.g.a.e.f.z;
import e.g.a.e.f.z0;
import e.g.a.f.p;
import e.g.a.f.r;
import e.g.a.f.s;
import e.g.a.g0.d.m;
import e.g.a.h0.b.h;
import e.g.a.i0.f1;
import e.g.a.i0.k0;
import e.g.a.i0.p1;
import e.g.a.i0.r0;
import e.g.a.t.d.l;
import e.g.a.t.d.n;
import e.g.a.z.d;
import e.g.c.a.d;
import e.l.c.l.i;
import e.v.d.t.p;
import e.w.e.a.b.l.b;
import i.i.k.c0;
import i.i.k.e0;
import java.lang.reflect.Field;
import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.zip.CRC32;
import o.s.c.j;
import san.ae.addDownloadListener;

public class SplashActivity extends Activity implements ISplashAdListener {
    public static final s.e.a u = new s.e.c("SplashActivityLog");
    public static final String[] v = {"Me"};
    public static ExpInfo w;
    public static long x;
    public Context b;
    public CountDownTimer c;
    public OpenScreenInfo d;

    /* renamed from: e  reason: collision with root package name */
    public int f1733e = 1;

    /* renamed from: f  reason: collision with root package name */
    public long f1734f = -1;

    /* renamed from: g  reason: collision with root package name */
    public boolean f1735g = false;

    /* renamed from: h  reason: collision with root package name */
    public boolean f1736h = false;

    /* renamed from: i  reason: collision with root package name */
    public m f1737i = null;

    /* renamed from: j  reason: collision with root package name */
    public Handler f1738j = new Handler(Looper.getMainLooper());

    /* renamed from: k  reason: collision with root package name */
    public j2 f1739k = new j2();

    /* renamed from: l  reason: collision with root package name */
    public boolean f1740l = false;

    /* renamed from: m  reason: collision with root package name */
    public boolean f1741m = false;

    /* renamed from: n  reason: collision with root package name */
    public boolean f1742n = false;

    /* renamed from: o  reason: collision with root package name */
    public boolean f1743o = false;

    /* renamed from: p  reason: collision with root package name */
    public boolean f1744p = true;

    /* renamed from: q  reason: collision with root package name */
    public e.g.a.h0.b.o.a f1745q = new e.g.a.h0.b.o.a();

    /* renamed from: r  reason: collision with root package name */
    public boolean f1746r = false;

    /* renamed from: s  reason: collision with root package name */
    public String f1747s;

    /* renamed from: t  reason: collision with root package name */
    public boolean f1748t;

    public class a implements j2.a {
        public a(SplashActivity splashActivity) {
        }
    }

    public class b extends e.g.a.i.i0.c {
        public final /* synthetic */ ImageView d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ long f1749e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ boolean f1750f;

        public b(ImageView imageView, long j2, boolean z) {
            this.d = imageView;
            this.f1749e = j2;
            this.f1750f = z;
        }

        @Override // e.g.a.i.i0.c
        public e.g.a.h0.b.o.a a() {
            if (SplashActivity.this.f1746r) {
                return new e.g.a.h0.b.o.a();
            }
            e.g.a.h0.b.o.a b = e.g.a.h0.b.o.a.b(this.d);
            b.scene = 2118;
            b.modelType = 1128;
            b.moduleName = "open_screen_card";
            SplashActivity splashActivity = SplashActivity.this;
            e.g.a.h0.b.o.a aVar = splashActivity.f1745q;
            aVar.scene = 2118;
            aVar.modelType = 1128;
            aVar.moduleName = "open_screen_card";
            aVar.adType = splashActivity.f1733e;
            aVar.recommendId = splashActivity.d.recommendId;
            return b;
        }

        @Override // e.g.a.i.i0.c
        public void b(View view) {
            if (this.d.isEnabled()) {
                this.d.setEnabled(false);
                String str = SplashActivity.this.d.h5JumpUrl;
                if (str != null && !str.isEmpty()) {
                    SplashActivity splashActivity = SplashActivity.this;
                    l.a aVar = new l.a(splashActivity.d.h5JumpUrl);
                    aVar.f7142a = true;
                    l.b(splashActivity, aVar, Boolean.FALSE);
                    String l2 = f1.l(SplashActivity.this.d.h5JumpUrl, "page");
                    j.d(l2, "getUriQueryParameter(url, \"page\")");
                    if (!TextUtils.equals(l2, "mini-game-play-game")) {
                        SplashActivity.this.finish();
                    }
                    if (SplashActivity.this.f1746r) {
                        e.f.a.e.c.i0("AppAdClick", AppCardData.KEY_SCENE, 0, 1, this.f1749e);
                    } else if (!this.f1750f) {
                        h.l(this.d, null);
                    }
                }
            }
        }
    }

    public class c extends CountDownTimer {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ RoundTextView f1752a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(long j2, long j3, RoundTextView roundTextView) {
            super(j2, j3);
            this.f1752a = roundTextView;
        }

        public void onFinish() {
            s.e.a aVar = SplashActivity.u;
            s.e.a aVar2 = SplashActivity.u;
            StringBuilder Z = e.d.a.a.a.Z("timer onFinish ");
            Z.append(SplashActivity.this.f1734f);
            i.i.g.c.d0(((s.e.c) aVar2).f16991a, Z.toString());
            StringBuilder Z2 = e.d.a.a.a.Z("0 ");
            Z2.append(SplashActivity.this.getString(R.string.arg_RES_2131821826));
            this.f1752a.setText(String.format("%s", Z2.toString()));
            SplashActivity.this.k();
        }

        public void onTick(long j2) {
            this.f1752a.setText(String.format("%s", (j2 / 1000) + " " + SplashActivity.this.getString(R.string.arg_RES_2131821826)));
            SplashActivity.this.f1734f = (long) (((int) j2) / ImageRequest.DEFAULT_IMAGE_TIMEOUT_MS);
            s.e.a aVar = SplashActivity.u;
            s.e.a aVar2 = SplashActivity.u;
            StringBuilder Z = e.d.a.a.a.Z("timer onTick ");
            Z.append(SplashActivity.this.f1734f);
            i.i.g.c.d0(((s.e.c) aVar2).f16991a, Z.toString());
        }
    }

    public void a(Intent intent) {
        if (intent != null) {
            Bundle F = e.g.a.s.l.a.F(intent);
            if (F == null || F.get("preActivityTagName") == null) {
                intent.putExtra("preActivityTagName", this.f1745q.scene);
            }
            if (F == null || F.get("preActivityPositionTagName") == null) {
                intent.putExtra("preActivityPositionTagName", this.f1745q.position);
            }
            if (F == null || F.get("preActivitySmallPositionTagName") == null) {
                intent.putExtra("preActivitySmallPositionTagName", this.f1745q.smallPosition);
            }
            if (F == null || F.get("preActivityModelTypeName") == null || !intent.hasExtra("preActivityModelTypeName")) {
                intent.putExtra("preActivityModelTypeName", this.f1745q.modelType);
            }
            if (F == null || F.get("preActivityModuleName") == null || !intent.hasExtra("preActivityModuleName")) {
                intent.putExtra("preActivityModuleName", this.f1745q.moduleName);
            }
            if (F == null || F.get("preActivityAdType") == null || !intent.hasExtra("preActivityAdType")) {
                intent.putExtra("preActivityAdType", this.f1745q.adType);
            }
            if (F == null || F.get("preActivityRecommendId") == null || !intent.hasExtra("preActivityRecommendId")) {
                intent.putExtra("preActivityRecommendId", this.f1745q.recommendId);
            }
            if (F == null || F.get("preActivitySearchId") == null) {
                intent.putExtra("preActivitySearchId", this.f1745q.searchId);
            }
            if (F == null || F.get("preActivitySearchResultNum") == null) {
                intent.putExtra("preActivitySearchResultNum", this.f1745q.searchResultNum);
            }
            if (F == null || F.get("preActivitySearchSortType") == null) {
                intent.putExtra("preActivitySearchSortType", this.f1745q.searchSortType);
            }
            if (F == null || F.get("preActivitySearchType") == null) {
                intent.putExtra("preActivitySearchType", this.f1745q.searchType);
            }
            if (F == null || F.get("preActivitySearchInputKeyword") == null) {
                intent.putExtra("preActivitySearchInputKeyword", this.f1745q.searchInputKeyword);
            }
            if (F == null || F.get("preActivitySearchRequestKeyword") == null) {
                intent.putExtra("preActivitySearchRequestKeyword", this.f1745q.searchRequestKeyword);
            }
        }
    }

    public void attachBaseContext(Context context) {
        r.a().b(s.START_SPLASH);
        super.attachBaseContext(r0.a(context, d.c()));
    }

    public final void b() {
        IAdStatusInfoDelegate checkAdStatus;
        IAdInfoDelegate aTTopAdInfo;
        Object obj;
        if (!this.f1744p) {
            e.f.a.g.a.a("SplashActivityTopOnAd", "activity is in background. ignore show ad", new Object[0]);
            return;
        }
        setContentView(R.layout.arg_RES_2131492957);
        ViewGroup viewGroup = (ViewGroup) findViewById(R.id.arg_RES_2131298505);
        g gVar = g.b;
        j.e(this, "activity");
        if (!g.j()) {
            e.f.a.g.a.c("SplashAdHelper", "splash ad not ready", new Object[0]);
        } else if (g.f5030q) {
            e.f.a.g.a.c("SplashAdHelper", "ad is showing", new Object[0]);
        } else {
            g.f5030q = true;
            if (viewGroup == null) {
                View findViewById = findViewById(16908290);
                ViewGroup viewGroup2 = findViewById instanceof ViewGroup ? (ViewGroup) findViewById : null;
                if (viewGroup2 == null) {
                    viewGroup = null;
                } else {
                    Iterator<View> it = ((c0) i.i.a.w(viewGroup2)).iterator();
                    while (true) {
                        e0 e0Var = (e0) it;
                        if (!e0Var.hasNext()) {
                            obj = null;
                            break;
                        }
                        obj = e0Var.next();
                        if (j.a(((View) obj).getTag(), "adContainer")) {
                            break;
                        }
                    }
                    View view = (View) obj;
                    if (view instanceof ViewGroup) {
                        viewGroup = (ViewGroup) view;
                    } else {
                        if (view != null) {
                            viewGroup2.removeView(view);
                        }
                        FrameLayout frameLayout = new FrameLayout(this);
                        frameLayout.setTag("adContainer");
                        frameLayout.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
                        frameLayout.setFitsSystemWindows(true);
                        viewGroup2.addView(frameLayout);
                        viewGroup = frameLayout;
                    }
                }
            }
            if (viewGroup != null) {
                g.f5019f = System.currentTimeMillis();
                g.f5020g++;
                Object value = g.f5022i.getValue();
                j.d(value, "<get-sp>(...)");
                SharedPreferences.Editor edit = ((SharedPreferences) value).edit();
                j.d(edit, "editor");
                edit.putLong("lastShowTime", g.f5019f);
                edit.putInt("todayShownNum", g.f5020g);
                edit.apply();
                ISplashAdDelegate iSplashAdDelegate = g.d;
                Integer valueOf = (iSplashAdDelegate == null || (checkAdStatus = iSplashAdDelegate.checkAdStatus()) == null || (aTTopAdInfo = checkAdStatus.getATTopAdInfo()) == null) ? null : Integer.valueOf(aTTopAdInfo.getNetworkFirmId());
                if (valueOf == null || valueOf.intValue() != 59 || !j.a(Build.BRAND, "Amazon") || Build.VERSION.SDK_INT != 30) {
                    ISplashAdDelegate iSplashAdDelegate2 = g.d;
                    if (!(iSplashAdDelegate2 != null && iSplashAdDelegate2.isAdReady()) || (valueOf != null && valueOf.intValue() == 100635)) {
                        setContentView(new View(this));
                        k();
                    }
                    ISplashAdDelegate iSplashAdDelegate3 = g.d;
                    if (iSplashAdDelegate3 != null && iSplashAdDelegate3.isAdReady()) {
                        ISplashAdDelegate iSplashAdDelegate4 = g.d;
                        if (iSplashAdDelegate4 != null) {
                            iSplashAdDelegate4.show(this, viewGroup);
                        }
                    } else {
                        e.v.d.m mVar = g.f5028o;
                        if (mVar != null) {
                            e.v.d.t.a IncentiveDownloadUtils = mVar.IncentiveDownloadUtils();
                            if (IncentiveDownloadUtils == null || !(IncentiveDownloadUtils.getSanAd() instanceof p) || !IncentiveDownloadUtils.isAdReady()) {
                                addDownloadListener.removeDownloadListener("#Show Error, ad type is not splash Ad.");
                            } else {
                                IncentiveDownloadUtils.setAdActionListener(mVar.getDownloadingList());
                                ((p) IncentiveDownloadUtils.getSanAd()).show(this);
                                IncentiveDownloadUtils.onImpression();
                            }
                        }
                    }
                }
            }
        }
        View findViewById2 = findViewById(16908290);
        e(findViewById2, 3);
        h.m(findViewById2, null);
        e.w.c.e.b.l.y1(findViewById2, e.w.e.a.b.n.c.REPORT_NONE);
        e.w.c.e.b.l.x1(findViewById2, e.w.e.a.b.n.b.REPORT_NONE);
        this.f1742n = true;
        this.f1741m = false;
    }

    public final void c(boolean z) {
        j2 j2Var = this.f1739k;
        Context applicationContext = getApplicationContext();
        a aVar = new a(this);
        Objects.requireNonNull(j2Var);
        k.g("KeepLiveOpen", true, new o1(applicationContext));
        k.g("MiKeepAliveOpen", true, new c1(applicationContext));
        k.g("ApkPureSpareHosts", true, new d0(applicationContext));
        k.g("OpenApkPureSpareHosts", true, b1.f5362a);
        k.g("EnablePopUpTechReport", true, new b0(applicationContext));
        k.g("PopUpTechReportPercent", true, new o0(applicationContext));
        k.g("IgnoreKeepLiveOpenVersions", true, new y(applicationContext));
        k.g("AliveHeartBeatOpen", true, new l0(applicationContext));
        k.g("downloadLogReportSample", true, new e.g.a.e.f.c0(applicationContext));
        k.g("logReportSampleEs", true, new i0(applicationContext));
        k.g("logReportSampleBeacon", true, new q1(applicationContext));
        k.g("report_beacon_type", true, new g1(applicationContext));
        k.g("needReportKey", true, new w(applicationContext));
        k.g("canEditContent", true, new y0(applicationContext));
        k.g("cmdList", true, new e1(applicationContext));
        k.g("logUrl", true, new k1(applicationContext));
        k.g("downloadLogReportHost", true, new e.g.a.e.f.r0(applicationContext));
        k.g("urlRequestConfigJson", false, new l1(applicationContext));
        k.g("iconConfig", false, new h1(applicationContext));
        k.g("resHubRefreshDuration", true, new x(applicationContext));
        k.g("quitMiniGameCenterDialogCount", false, new a1(applicationContext));
        k.g("quitMiniGameDetailDialogCount", false, new m1(applicationContext));
        k.g("switchMainTabMiniGamePopup", false, new z0(applicationContext));
        k.g("miniGameCenterShortcutHintCount", false, new q0(applicationContext));
        k.g("miniGameDetailShortcutHintCount", false, new x0(applicationContext));
        k.g("key_user_come_back_pop_up", false, new t0(applicationContext));
        k.h(new String[]{"hasOpenTopOnAds", "hasGp"}, true, new e.g.a.c.n.c(new f(), applicationContext, aVar, e.f.a.e.c.P("com.android.vending", applicationContext)));
        k.g("MiniGameOpen", true, new v(applicationContext));
        k.g("MiniGameParamAssembleOpen", true, e.g.a.e.f.e0.f5389a);
        k.g("downloadSuccNum", true, new u1(applicationContext));
        k.g("downloadFailedNum", true, new j1(applicationContext));
        k.g("OfferRedirectOpen", true, new m0(applicationContext));
        k.g("OfferRedirectWhiteListOpen", true, new z(applicationContext));
        k.g("OfferRedirectWhiteList", true, new f0(applicationContext));
        k.g("ReferrerInstallTimeOpen", true, new s0(applicationContext));
        k.g("asyncReqCrawlerTask", true, new u0(applicationContext));
        k.g("splashAdsType", true, new w0(applicationContext));
        k.g("splashTaboolaAdsShowNum", true, new s1(applicationContext));
        k.g("splashTaboolaAdsInterval", true, new d1(applicationContext));
        k.g("splashTaboolaAdsCountDownTime", true, new n0(applicationContext));
        k.g("splashTaboolaAdsWaitTime", true, new h0(applicationContext, aVar));
        k.h(new String[]{"taboolaBannerSwitch", "taboolaBannerDetailSwitch", "taboolaBannerDownloadSwitch", "taboolaBannerInstallSwitch", "taboolaDetailForbidPkgs", "taboolaBannerLoadCount"}, true, new v0(applicationContext));
        k.g("p2pDownloadSwitch", true, g0.f5394a);
        k.g("cellularTipsSize", true, new j0(applicationContext));
        k.g("offerDownloadThreadPool", true, e.g.a.e.f.f1.f5393a);
        k.g("ApkPatchReportTestOpen", true, r1.f5433a);
        k.g("patchUpdateSwitch", true, new i1(applicationContext));
        k.g("patchUpdateBlackList", true, new a0(applicationContext));
        k.g("patchUpdateBrandBlackList", true, new t1(applicationContext));
        k.g("InstallerType", true, new u(applicationContext));
        k.g("pingHost", true, new n1(applicationContext));
        k.g("webViewDownload", true, new p0(applicationContext));
        d2 f2 = d2.f(this);
        x = System.currentTimeMillis();
        f2.m(e.g.a.t.a.e0.f7102a);
        this.f1735g = true;
        if (z) {
            h();
        }
    }

    public final void d(View view, String str, String str2) {
        if (!this.f1746r) {
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            if (str == null) {
                str = "";
            }
            linkedHashMap.put("package_name", str);
            linkedHashMap.put("recommend_id", str2);
            h.s(view, "app", linkedHashMap, false);
        }
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent motionEvent) {
        b.C0315b.f12266a.c(this, motionEvent, false, true);
        boolean dispatchTouchEvent = super.dispatchTouchEvent(motionEvent);
        b.C0315b.f12266a.c(this, motionEvent, dispatchTouchEvent, false);
        return dispatchTouchEvent;
    }

    public final void e(View view, int i2) {
        if (!this.f1746r) {
            this.f1745q.scene = 2118;
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            linkedHashMap.put(AppCardData.KEY_SCENE, 2118L);
            linkedHashMap.put("pv_id", "page_open_screen");
            linkedHashMap.put("is_ad", Integer.valueOf(i2));
            h.s(view, AppCardData.KEY_SCENE, linkedHashMap, false);
            h.o("imp", view, linkedHashMap);
        }
    }

    public final void f(Context context, String str) {
        e.g.a.f.p pVar = RealApplicationLike.operatorRecorder;
        pVar.b();
        synchronized (pVar.b) {
            pVar.b.clear();
        }
        if (!context.getSharedPreferences("app_shell_settings", 0).getBoolean("first_open", false)) {
            HashMap hashMap = new HashMap();
            if (str != null && !str.isEmpty()) {
                hashMap.put("package_name", str);
            }
            h.p("first_open", hashMap);
            i.i.g.c.Y(context, "first_open", true);
            e.g.a.a0.b.m mVar = e.g.a.a0.b.m.f4817a;
            e.g.a.a0.b.m.f4822i = true;
        }
        if (!context.getSharedPreferences("app_shell_settings", 0).getBoolean("first_open_3190947_8195", false)) {
            h.p("first_open_3190947_8195", new HashMap());
            i.i.g.c.Y(context, "first_open_3190947_8195", true);
        }
    }

    public final void g() {
        e.g.a.c.m.w wVar = new e.g.a.c.m.w();
        e.g.a.t.a.d0 d0Var = new e.g.a.t.a.d0(this);
        j.e(d0Var, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
        p.a.z zVar = p.a.l0.f16468a;
        p.a.b0 a2 = k.g.c.a(p.a.z1.m.c);
        k.g.c.T(a2, null, null, new e.g.a.c.m.x(wVar, d0Var, a2, null), 3, null);
    }

    public final synchronized void h() {
        if (this.f1735g) {
            if (this.f1736h) {
                if (this.f1737i != null) {
                    k();
                } else {
                    i();
                }
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:30:0x00c8  */
    public final void i() {
        boolean z;
        r.a().b(s.SPLASH_GET_CONFIG);
        Context context = this.b;
        j.e(context, "context");
        GetOpenScreenCfgRsp getOpenScreenCfgRsp = e.g.a.t.a.p0.d;
        OpenScreenInfo openScreenInfo = null;
        int i2 = 0;
        if (getOpenScreenCfgRsp == null) {
            SharedPreferences sharedPreferences = context.getSharedPreferences("splash_config", 0);
            j.d(sharedPreferences, "context.getSharedPrefere…IG, Context.MODE_PRIVATE)");
            String string = sharedPreferences.getString("splash_config_data", null);
            if (!TextUtils.isEmpty(string)) {
                try {
                    getOpenScreenCfgRsp = GetOpenScreenCfgRsp.parseFrom(e.g.a.i0.x.b(string));
                } catch (InvalidProtocolBufferNanoException e2) {
                    e2.printStackTrace();
                }
            }
            getOpenScreenCfgRsp = null;
        }
        if (getOpenScreenCfgRsp != null) {
            Context context2 = this.b;
            j.e(context2, "context");
            if (getOpenScreenCfgRsp != null) {
                double currentTimeMillis = (double) System.currentTimeMillis();
                Double.isNaN(currentTimeMillis);
                Double.isNaN(currentTimeMillis);
                double d2 = currentTimeMillis / 1000.0d;
                if (!Double.isNaN(d2)) {
                    long round = Math.round(d2);
                    Integer num = 0;
                    SharedPreferences sharedPreferences2 = context2.getSharedPreferences("splash_config", 0);
                    j.d(sharedPreferences2, "context.getSharedPrefere…IG, Context.MODE_PRIVATE)");
                    String string2 = sharedPreferences2.getString("splash_showed_record", null);
                    if (string2 != null) {
                        Object f2 = e.g.a.r.c.a.f(string2, new e.g.a.t.a.o0().b);
                        j.d(f2, "objectFromJson(splashSho…p<String, Int>>(){}.type)");
                        LinkedHashMap linkedHashMap = (LinkedHashMap) f2;
                        Integer num2 = (Integer) linkedHashMap.get("splash_showed_times");
                        if (num2 == null) {
                            num2 = num;
                        }
                        int intValue = num2.intValue();
                        Integer num3 = (Integer) linkedHashMap.get("splash_last_showed_time");
                        if (num3 != null) {
                            num = num3;
                        }
                        int intValue2 = num.intValue();
                        long currentTimeMillis2 = System.currentTimeMillis() / ((long) ImageRequest.DEFAULT_IMAGE_TIMEOUT_MS);
                        if (intValue >= getOpenScreenCfgRsp.limitDay || currentTimeMillis2 - ((long) intValue2) < getOpenScreenCfgRsp.interval * ((long) 60)) {
                            z = true;
                            if (!z) {
                                OpenScreenInfo[] openScreenInfoArr = getOpenScreenCfgRsp.openScreenCfg;
                                j.d(openScreenInfoArr, "getOpenScreenCfgRsp.openScreenCfg");
                                int length = openScreenInfoArr.length;
                                while (true) {
                                    if (i2 >= length) {
                                        break;
                                    }
                                    OpenScreenInfo openScreenInfo2 = openScreenInfoArr[i2];
                                    i2++;
                                    if (openScreenInfo2.startTime <= round && openScreenInfo2.endTime >= round) {
                                        e.g.a.t.a.p0 p0Var = e.g.a.t.a.p0.f7108a;
                                        String str = openScreenInfo2.logo;
                                        j.d(str, "openScreenInfo.logo");
                                        if (e.d.a.a.a.I0(p0Var.d(context2, str))) {
                                            openScreenInfo = openScreenInfo2;
                                            break;
                                        }
                                        String str2 = openScreenInfo2.logo;
                                        j.d(str2, "openScreenInfo.logo");
                                        p0Var.b(context2, str2);
                                    }
                                }
                            }
                        }
                    }
                    z = false;
                    if (!z) {
                    }
                } else {
                    throw new IllegalArgumentException("Cannot round NaN value.");
                }
            }
            this.d = openScreenInfo;
            this.f1733e = 2;
        }
        String F = i.i.g.c.F(this.b, "splashAdsType");
        if (this.d != null) {
            n();
        } else if (F == null || F.equals("")) {
            l();
        } else if (TextUtils.equals("all", F)) {
            l();
        } else if (TextUtils.equals("taboola_api_ads", F)) {
            g();
        } else {
            m();
        }
    }

    public final void j(long j2, RoundTextView roundTextView) {
        if (0 == j2) {
            i.i.g.c.d0(((s.e.c) u).f16991a, "no count down time");
            k();
        } else if (this.c == null) {
            c cVar = new c(Math.abs(j2 * 1000), 1000, roundTextView);
            this.c = cVar;
            cVar.start();
        }
    }

    public void k() {
        s.e.a aVar = u;
        if (isFinishing()) {
            i.i.g.c.d0(((s.e.c) aVar).f16991a, "activity finished");
            return;
        }
        g gVar = g.b;
        j.e(this, "callback");
        g.c.remove(this);
        i.i.g.c.d0(((s.e.c) aVar).f16991a, "jump to mainTabActivity");
        String d2 = e.g.a.h0.a.j.a().d();
        if (TextUtils.isEmpty(d2)) {
            d2 = e.g.a.h0.a.j.a().c();
        }
        if (TextUtils.isEmpty(d2)) {
            d2 = e.g.a.i0.d0.g();
        }
        if (!TextUtils.isEmpty(d2)) {
            d2 f2 = d2.f(this);
            ConfigBaseProtos.ConfigBaseResponse c2 = f2.c(f2.c);
            long j2 = c2 != null ? c2.logPercentage : -1;
            CRC32 crc32 = new CRC32();
            crc32.update(d2.getBytes());
            new e.g.a.r.d.a(this).k("is_upload_log", crc32.getValue() % 100 < j2);
        }
        Uri data = getIntent().getData();
        if (data == null || !data.toString().startsWith("https://m.apkpure.com/") || !data.toString().contains("from=details")) {
            e.g.a.i0.n0.X(this, getIntent());
            overridePendingTransition(R.anim.arg_RES_2130772022, R.anim.arg_RES_2130772061);
            e.g.a.s.f.o(this, getString(R.string.arg_RES_2131821775), "", 0);
            finish();
            this.f1734f = -1;
            return;
        }
        i2.e(c2.DOWNLOAD_H5_NORMAL);
        this.f1745q = e.g.a.h0.b.o.a.d();
        l.a aVar2 = new l.a(data.toString());
        aVar2.f7142a = true;
        l.b(this, aVar2, Boolean.FALSE);
        finish();
    }

    public final void l() {
        int i2;
        int i3;
        int i4;
        int i5;
        Context context = this.b;
        j.e(context, "context");
        String F = i.i.g.c.F(context, "tablooa_show_num");
        j.d(F, "alreadyShowNumStr");
        boolean z = false;
        try {
            i2 = Integer.parseInt(F);
        } catch (NumberFormatException unused) {
            i2 = 0;
        }
        String F2 = i.i.g.c.F(context, "splashTaboolaAdsShowNum");
        j.d(F2, "needShowNumStr");
        try {
            i3 = Integer.parseInt(F2);
        } catch (NumberFormatException unused2) {
            i3 = 0;
        }
        if (i2 < i3) {
            String F3 = i.i.g.c.F(context, "splashTaboolaAdsInterval");
            j.d(F3, "needShowTimeStr");
            try {
                i4 = Integer.parseInt(F3);
            } catch (NumberFormatException unused3) {
                i4 = 0;
            }
            String F4 = i.i.g.c.F(context, "tablooa_show_time");
            long j2 = (long) 60;
            long currentTimeMillis = ((System.currentTimeMillis() / ((long) ImageRequest.DEFAULT_IMAGE_TIMEOUT_MS)) / j2) / j2;
            j.d(F4, "alreadyNeedShowTimeStr");
            try {
                i5 = Integer.parseInt(F4);
            } catch (NumberFormatException unused4) {
                i5 = 0;
            }
            if (currentTimeMillis - ((long) i5) >= ((long) i4)) {
                z = true;
            }
        }
        this.f1746r = z;
        if (!z) {
            m();
        } else {
            g();
        }
    }

    public final void m() {
        if (!this.f1742n) {
            e.f.a.g.a.c("SplashActivityTopOnAd", "try show topOn splash ad", new Object[0]);
            this.f1740l = true;
            if (g.a()) {
                b();
                e.f.a.g.a.c("SplashActivityTopOnAd", "show ad", new Object[0]);
            } else if (g.l() || g.f5026m || !g.m() || g.o()) {
                k();
                e.f.a.g.a.c("SplashActivityTopOnAd", "start MainActivityDirectly, loadFailed=%s, loadTimeout=%s,loading=%s, reachShowLimit=%s", Boolean.valueOf(g.l()), Boolean.valueOf(g.f5026m), Boolean.valueOf(g.m()), Boolean.valueOf(g.o()));
                return;
            } else {
                e.f.a.g.a.c("SplashActivityTopOnAd", "ad loading wait", new Object[0]);
            }
            r.a().b(s.SPLASH_SHOW_AD);
        }
    }

    public final void n() {
        String str;
        LinkedHashMap linkedHashMap;
        int i2;
        int i3;
        String str2;
        s.e.a aVar = u;
        if (this.d == null) {
            k();
            return;
        }
        StringBuilder Z = e.d.a.a.a.Z("start show splash: ");
        Z.append(this.d);
        s.e.c cVar = (s.e.c) aVar;
        i.i.g.c.d0(cVar.f16991a, Z.toString());
        k.g.c.y0(this, false);
        View inflate = LayoutInflater.from(this.b).inflate(R.layout.arg_RES_2131492957, (ViewGroup) null);
        setContentView(inflate);
        e(inflate, this.f1733e);
        View findViewById = inflate.findViewById(R.id.arg_RES_2131297683);
        OpenScreenInfo openScreenInfo = this.d;
        int i4 = openScreenInfo.id;
        String str3 = openScreenInfo.h5JumpUrl;
        if (!this.f1746r) {
            e.g.a.h0.b.o.a aVar2 = this.f1745q;
            aVar2.modelType = 1128;
            aVar2.moduleName = "open_screen_card";
            LinkedHashMap linkedHashMap2 = new LinkedHashMap();
            linkedHashMap2.put("model_type", 1128);
            linkedHashMap2.put("module_name", "open_screen_card");
            linkedHashMap2.put("open_screen_id", String.valueOf(i4));
            linkedHashMap2.put("link_url", str3);
            h.s(findViewById, "card", linkedHashMap2, false);
        }
        View findViewById2 = inflate.findViewById(R.id.arg_RES_2131298505);
        OpenScreenInfo openScreenInfo2 = this.d;
        d(findViewById2, openScreenInfo2.packageName, openScreenInfo2.recommendId);
        boolean a2 = e.g.a.u.h.a(this.d.h5JumpUrl);
        String str4 = "";
        OpenScreenInfo openScreenInfo3 = this.d;
        if (a2) {
            String str5 = openScreenInfo3.h5JumpUrl;
            String str6 = openScreenInfo3.recommendId;
            j.e(findViewById2, Promotion.ACTION_VIEW);
            j.e(str5, "linkUrl");
            j.e(str6, "recommendId");
            int i5 = AegonApplication.f1165e;
            String str7 = e.g.a.s.l.a.b0(RealApplicationLike.getContext()) ? "custom_tab" : "webview";
            h.t(findViewById2, "mini_game_app", false);
            HashMap hashMap = new HashMap();
            hashMap.put("technical_framework", str7);
            String l2 = f1.l(str5, "page");
            j.d(l2, "getUriQueryParameter(url, \"page\")");
            if (TextUtils.equals(l2, "mini-game-play-game")) {
                str2 = f1.l(str5, "gameid");
                j.d(str2, "{\n                String…, \"gameid\")\n            }");
            } else {
                str2 = str4;
            }
            hashMap.put("game_id", str2);
            String l3 = f1.l(str5, "page");
            j.d(l3, "getUriQueryParameter(url, \"page\")");
            e.d.a.a.a.r0(TextUtils.equals(l3, "mini-game") ? 1 : TextUtils.equals(l3, "mini-game-play-game") ? 2 : 0, hashMap, "minigame_jump_source", "recommend_id", str6);
            hashMap.put("link_url", str5);
            h.u(findViewById2, hashMap);
        } else {
            d(findViewById2, openScreenInfo3.packageName, openScreenInfo3.recommendId);
        }
        ImageView imageView = (ImageView) findViewById(R.id.arg_RES_2131298506);
        FrameLayout frameLayout = (FrameLayout) findViewById(R.id.arg_RES_2131298505);
        if (imageView != null) {
            imageView.setVisibility(0);
            long currentTimeMillis = System.currentTimeMillis();
            String str8 = this.f1747s;
            if (str8 != null) {
                if (TextUtils.isEmpty(str8)) {
                    imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
                } else {
                    try {
                        frameLayout.setBackgroundColor(Color.parseColor(str8));
                    } catch (Exception e2) {
                        e2.printStackTrace();
                    }
                }
            }
            if (this.f1746r) {
                str = this.d.logo;
            } else {
                Context context = this.b;
                String str9 = this.d.logo;
                j.e(context, "context");
                j.e(str9, "imageUrl");
                StringBuilder sb = new StringBuilder();
                sb.append((Object) context.getCacheDir().getPath());
                sb.append("/splash/");
                String e3 = k0.e(str9);
                j.d(e3, "getMd5HexString(imageUrl)");
                sb.append(e3);
                str = sb.toString();
            }
            e.f.a.e.c.Y(this, str, imageView, (e.h.a.q.g) new e.h.a.q.g().m());
            imageView.setOnClickListener(new b(imageView, currentTimeMillis, a2));
            if (a2) {
                h.s(imageView, "mini_game_app", null, false);
            } else if (!this.f1746r) {
                h.s(imageView, "splash_image", null, false);
            }
            RoundTextView roundTextView = (RoundTextView) findViewById(R.id.arg_RES_2131296983);
            if (roundTextView != null) {
                roundTextView.setOnClickListener(new e.g.a.t.a.c0(this, currentTimeMillis, a2, roundTextView));
                roundTextView.setVisibility(0);
                if (((float) (getResources().getDisplayMetrics().widthPixels / getResources().getDisplayMetrics().heightPixels)) > 0.5625f) {
                    FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) roundTextView.getLayoutParams();
                    int a3 = p1.a(this.b, 16.0f);
                    layoutParams.setMargins(a3, a3, a3, a3);
                    roundTextView.setLayoutParams(layoutParams);
                }
                String str10 = this.d.packageName;
                if (!this.f1746r) {
                    LinkedHashMap linkedHashMap3 = new LinkedHashMap(1);
                    if (str10 != null) {
                        str4 = str10;
                    }
                    linkedHashMap3.put("package_name", str4);
                    h.s(roundTextView, "jump_button", linkedHashMap3, false);
                }
                this.f1734f = ((long) this.d.countDownTime) + 1;
                if (this.f1746r) {
                    j.e(this, "context");
                    String F = i.i.g.c.F(this, "tablooa_show_num");
                    j.d(F, "showNumStr");
                    try {
                        i3 = Integer.parseInt(F);
                        i2 = 1;
                    } catch (NumberFormatException unused) {
                        i2 = 1;
                        i3 = 0;
                    }
                    i.i.g.c.X(this, "tablooa_show_num", String.valueOf(i3 + i2));
                    long j2 = (long) 60;
                    i.i.g.c.X(this, "tablooa_show_time", String.valueOf(((System.currentTimeMillis() / ((long) ImageRequest.DEFAULT_IMAGE_TIMEOUT_MS)) / j2) / j2));
                    e.f.a.e.c.i0("AppAdExhibit", AppCardData.KEY_SCENE, 0, -1, 0);
                } else {
                    Context context2 = this.b;
                    j.e(context2, "context");
                    SharedPreferences sharedPreferences = context2.getSharedPreferences("splash_config", 0);
                    j.d(sharedPreferences, "context.getSharedPrefere…IG, Context.MODE_PRIVATE)");
                    String string = sharedPreferences.getString("splash_showed_record", null);
                    if (string == null) {
                        linkedHashMap = new LinkedHashMap();
                    } else {
                        Object f2 = e.g.a.r.c.a.f(string, new e.g.a.t.a.q0().b);
                        j.d(f2, "{\n            JsonUtils.…ong>>(){}.type)\n        }");
                        linkedHashMap = (LinkedHashMap) f2;
                    }
                    Long l4 = (Long) linkedHashMap.get("splash_showed_times");
                    if (l4 == null) {
                        l4 = 0L;
                    }
                    linkedHashMap.put("splash_showed_times", Long.valueOf(l4.longValue() + 1));
                    linkedHashMap.put("splash_last_showed_time", Long.valueOf(System.currentTimeMillis() / ((long) ImageRequest.DEFAULT_IMAGE_TIMEOUT_MS)));
                    SharedPreferences.Editor edit = sharedPreferences.edit();
                    edit.putString("splash_showed_record", e.g.a.r.c.a.h(linkedHashMap));
                    edit.apply();
                }
                j(this.f1734f, roundTextView);
                i.i.g.c.d0(cVar.f16991a, "show splash end");
                r.a().b(s.SPLASH_SHOW_AD);
            }
        }
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onAdClick(IAdInfoDelegate iAdInfoDelegate) {
        this.f1743o = true;
        this.f1741m = true;
        this.f1742n = false;
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onAdDismiss(IAdInfoDelegate iAdInfoDelegate, int i2) {
        if (this.f1744p && !this.f1743o) {
            k();
        }
        this.f1741m = true;
        this.f1742n = false;
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onAdLoadTimeout() {
        e.f.a.g.a.a("SplashActivityTopOnAd", "onAdLoadTimeout", new Object[0]);
        if (this.f1740l) {
            k();
        }
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onAdLoaded(boolean z) {
        e.f.a.g.a.a("SplashActivityTopOnAd", "onAdLoaded, timeout=%s", Boolean.valueOf(z));
        if (this.f1740l && !this.f1741m && g.a()) {
            b();
        }
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onAdShow(IAdInfoDelegate iAdInfoDelegate) {
        this.f1741m = false;
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        b.C0315b.f12266a.b(this, configuration);
    }

    /* JADX WARNING: Removed duplicated region for block: B:40:0x0134 A[RETURN] */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x0135  */
    public void onCreate(Bundle bundle) {
        boolean z;
        Uri data;
        s.e.a aVar = u;
        e.g.a.f.p pVar = RealApplicationLike.operatorRecorder;
        synchronized (pVar.b) {
            if (!pVar.b.isEmpty()) {
                List<p.a> list = pVar.b;
                list.get(list.size() - 1).d(System.currentTimeMillis());
            }
        }
        setTitle("");
        i.i.g.c.d0(((s.e.c) aVar).f16991a, "SplashActivity onCreate:" + ((Object) getTitle()));
        super.onCreate(bundle);
        requestWindowFeature(1);
        String[] strArr = v;
        e.g.a.t.a.f0 f0Var = e.g.a.t.a.f0.b;
        j.e(strArr, "pages");
        j.e(f0Var, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
        p.a.z zVar = p.a.l0.f16468a;
        p.a.b0 a2 = k.g.c.a(p.a.z1.m.c);
        k.g.c.T(a2, null, null, new e.g.a.v.f(strArr, a2, f0Var, null), 3, null);
        s.e.a aVar2 = i2.f5402a;
        synchronized (i2.class) {
            i2.c = true;
            i2.b = 1;
            i2.a();
        }
        e.g.a.u.t.h hVar = e.g.a.u.t.h.f7316a;
        j.e(this, "activity");
        Intent intent = getIntent();
        if (!(intent == null || (data = intent.getData()) == null)) {
            String queryParameter = data.getQueryParameter("page");
            if (TextUtils.equals(queryParameter, "mini-game-center")) {
                try {
                    Intent intent2 = new Intent();
                    intent2.putExtra("small_position", 2);
                    intent2.addFlags(268468224);
                    intent2.putExtra("mini_game_detail", data.toString());
                    e.g.a.i0.n0.X(this, intent2);
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
                i2.e(c2.MINI_GAME_CENTER);
                finish();
            } else if (TextUtils.equals(queryParameter, "mini-game-play-game-shortcut")) {
                Map<String, Integer> map = f1.f6510a;
                String str = "";
                try {
                    String queryParameter2 = data.getQueryParameter("gameid");
                    if (queryParameter2 != null) {
                        str = queryParameter2;
                    }
                } catch (Exception e3) {
                    e3.printStackTrace();
                }
                j.d(str, "getUriQueryParameter(uri, \"gameid\")");
                j.e(this, "mActivity");
                j.e(str, "gameId");
                p.a.z zVar2 = p.a.l0.f16468a;
                p.a.b0 a3 = k.g.c.a(p.a.z1.m.c.plus(k.g.c.b(null, 1, null)));
                Long L = o.y.l.L(str);
                if (L != null) {
                    k.g.c.T(a3, null, null, new n(L.longValue(), this, a3, null), 3, null);
                }
                i2.e(c2.MINI_GAME_DETAIL);
            }
            z = true;
            if (z) {
                Intent intent3 = getIntent();
                if (!isTaskRoot() && intent3 != null) {
                    String action = intent3.getAction();
                    if (intent3.hasCategory("android.intent.category.LAUNCHER") && "android.intent.action.MAIN".equals(action)) {
                        finish();
                        return;
                    }
                }
                if (intent3 == null || intent3.getData() == null || !intent3.getData().getBooleanQueryParameter("is_from_push", false)) {
                    String b2 = i2.b();
                    c2 c2Var = c2.MICRO_DOWNLOAD_H5_NORMAL;
                    if (!b2.equals(String.valueOf(21))) {
                        String b3 = i2.b();
                        c2 c2Var2 = c2.MICRO_DOWNLOAD_H5_FAST;
                        if (!b3.equals(String.valueOf(25))) {
                            String b4 = i2.b();
                            c2 c2Var3 = c2.MICRO_DOWNLOAD_FAST;
                            if (!b4.equals(String.valueOf(22))) {
                                i2.e(c2.APP_LAUNCHER);
                            }
                        }
                    }
                    i.i.g.c.d0(((s.e.c) aVar).f16991a, "splash Activity initDTPage");
                    try {
                        h.x(this, "page_open_screen", "page_open_screen", null);
                    } catch (Exception e4) {
                        i.a().c(e4);
                    }
                    e(new View(this), 1);
                    this.b = this;
                    g gVar = g.b;
                    j.e(this, "callback");
                    g.c.add(this);
                    e.g.a.t.a.s0 s0Var = e.g.a.t.a.s0.f7110a;
                    j.e(this, "activity");
                    e.g.a.t.a.s0.d = null;
                    e.g.a.t.a.s0.f7114h = false;
                    e.g.a.t.a.s0.f7115i = false;
                    e.g.a.t.a.s0.f7116j = false;
                    s0Var.h(new e.g.a.t.a.b0(this));
                    c(true);
                    e.g.a.i0.i0.j(this, getClass().getSimpleName());
                    e.g.a.i0.g0.o(this, "splash", null);
                    r.a().b(s.SPLASH_CREATE);
                    e.g.a.c.m.l.e().b();
                    e.g.a.c.m.l e5 = e.g.a.c.m.l.e();
                    Objects.requireNonNull(e5);
                    d.a aVar3 = new d.a();
                    aVar3.f("get_banner_slot_country");
                    aVar3.g("GET");
                    aVar3.c(GetBannerSlotCountryRsp.class, new e.g.a.c.m.m(e5));
                    aVar3.b(e.g.a.c.m.n.b);
                    aVar3.e();
                    return;
                }
                e.g.a.s.l.a.G0(this, intent3);
                c(false);
                finish();
                return;
            }
            return;
        }
        z = false;
        if (z) {
        }
    }

    public void onDestroy() {
        super.onDestroy();
        CountDownTimer countDownTimer = this.c;
        if (countDownTimer != null) {
            countDownTimer.cancel();
        }
        i.i.g.c.d0(((s.e.c) u).f16991a, "splash activity销毁");
        e.g.a.t.a.s0 s0Var = e.g.a.t.a.s0.f7110a;
        e.g.a.g0.d.b0 b0Var = e.g.a.t.a.s0.f7111e;
        if (b0Var != null) {
            b0Var.c();
        }
        if (this.f1741m) {
            h.n(findViewById(16908290));
        }
    }

    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        if (4 == i2 || 3 == i2) {
            return true;
        }
        return super.onKeyDown(i2, keyEvent);
    }

    @Override // com.apkpure.aegon.plugin.topon.api1.ISplashAdListener
    public void onNoAdError(IAdErrorDelegate iAdErrorDelegate) {
        e.f.a.g.a.a("SplashActivityTopOnAd", "onNoAdError: %s", iAdErrorDelegate);
        if (this.f1740l) {
            k();
        }
    }

    public void onPause() {
        super.onPause();
        this.f1744p = false;
        CountDownTimer countDownTimer = this.c;
        if (countDownTimer != null) {
            countDownTimer.cancel();
            this.c = null;
        }
        if (Build.VERSION.SDK_INT <= 28) {
            try {
                Field declaredField = ActivityManager.class.getDeclaredField("IActivityManagerSingleton");
                declaredField.setAccessible(true);
                Object obj = declaredField.get(null);
                if (obj != null) {
                    Class<? super Object> superclass = obj.getClass().getSuperclass();
                    if (superclass != null) {
                        Field declaredField2 = superclass.getDeclaredField("mInstance");
                        declaredField2.setAccessible(true);
                        Object obj2 = declaredField2.get(obj);
                        Class<?> cls = Class.forName("android.app.IActivityManager");
                        declaredField2.set(obj, Proxy.newProxyInstance(cls.getClassLoader(), new Class[]{cls}, new e.g.a.i0.f0(obj2)));
                        e.g.a.i0.q0.e("ExceptionCatchUtil", "hook reportSizeConfigurations done");
                    }
                }
            } catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException e2) {
                e2.printStackTrace();
            }
        }
    }

    public void onResume() {
        s.e.a aVar = u;
        this.f1744p = true;
        try {
            super.onResume();
        } catch (Exception e2) {
            ((s.e.c) aVar).e("SplashActivity onResume {}", e2.getMessage(), e2);
        }
        StringBuilder Z = e.d.a.a.a.Z("onResume : leftTime ");
        Z.append(this.f1734f);
        i.i.g.c.d0(((s.e.c) aVar).f16991a, Z.toString());
        if (this.f1737i == null) {
            RoundTextView roundTextView = (RoundTextView) findViewById(R.id.arg_RES_2131296983);
            if (roundTextView != null && !this.f1740l) {
                j(this.f1734f, roundTextView);
                roundTextView.setVisibility(0);
            } else if (this.f1740l) {
                if (!g.f5030q && (this.f1741m || g.f5026m || g.l())) {
                    k();
                } else if (!this.f1742n) {
                    m();
                }
            }
            e.g.a.i0.g0.q(this, "splash", "SplashActivity");
        }
    }

    public void onStop() {
        super.onStop();
        CountDownTimer countDownTimer = this.c;
        if (countDownTimer != null) {
            countDownTimer.cancel();
            this.c = null;
        }
    }

    public void startActivities(Intent[] intentArr) {
        if (intentArr.length > 0) {
            a(intentArr[intentArr.length - 1]);
        }
        super.startActivities(intentArr);
    }

    public void startActivity(Intent intent) {
        a(intent);
        super.startActivity(intent);
    }
}