TikTok.apk(点击下载) / C40175Fq8.java


package X;

import android.app.Activity;
import android.app.Application;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import com.bytedance.covode.number.Covode;
import com.kakao.usermgmt.StringSet;

/* renamed from: X.Fq8  reason: case insensitive filesystem */
public final class C40175Fq8 implements Application.ActivityLifecycleCallbacks {
    public final /* synthetic */ C40169Fq2 LIZ;

    static {
        Covode.recordClassIndex(37173);
    }

    public C40175Fq8(C40169Fq2 fq2) {
        this.LIZ = fq2;
    }

    public /* synthetic */ C40175Fq8(C40169Fq2 fq2, byte b) {
        this(fq2);
    }

    public final void onActivityCreated(Activity activity, Bundle bundle) {
        try {
            this.LIZ.LJIILLIIL().LJIIJ.LIZ("onActivityCreated");
            Intent intent = activity.getIntent();
            if (intent != null) {
                Uri data = intent.getData();
                if (data == null || !data.isHierarchical()) {
                    this.LIZ.LJII().LIZ(activity, bundle);
                    return;
                }
                this.LIZ.LJIILJJIL();
                String LIZ2 = C40161Fpu.LIZ(intent, "android.intent.extra.REFERRER_NAME");
                boolean z = true;
                String str = ("android-app://com.google.android.googlequicksearchbox/https/www.google.com".equals(LIZ2) || "https://www.google.com".equals(LIZ2) || "android-app://com.google.appcrawler".equals(LIZ2)) ? "gs" : "auto";
                String queryParameter = data.getQueryParameter("referrer");
                if (bundle != null) {
                    z = false;
                }
                this.LIZ.LJIILL().LIZ(new RunnableC40182FqF(this, z, data, str, queryParameter));
                this.LIZ.LJII().LIZ(activity, bundle);
            }
        } catch (Exception e) {
            this.LIZ.LJIILLIIL().LIZJ.LIZ("Throwable caught in onActivityCreated", e);
        } finally {
            this.LIZ.LJII().LIZ(activity, bundle);
        }
    }

    public final void onActivityDestroyed(Activity activity) {
        C40171Fq4 LJII = this.LIZ.LJII();
        synchronized (LJII.LJIIIZ) {
            try {
                if (activity == LJII.LJ) {
                    LJII.LJ = null;
                }
            } finally {
            }
        }
        if (LJII.LJIJ().LJII().booleanValue()) {
            LJII.LIZLLL.remove(activity);
        }
    }

    public final void onActivityPaused(Activity activity) {
        C40171Fq4 LJII = this.LIZ.LJII();
        if (LJII.LJIJ().LIZ(C65111PhM.LJLJI)) {
            synchronized (LJII.LJIIIZ) {
                try {
                    LJII.LJIIIIZZ = false;
                    LJII.LJFF = true;
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
        long LIZIZ = LJII.LJIIJJI().LIZIZ();
        if (!LJII.LJIJ().LIZ(C65111PhM.LJLILLLLZI) || LJII.LJIJ().LJII().booleanValue()) {
            C40484Fv7 LIZ2 = LJII.LIZ(activity);
            LJII.LIZIZ = LJII.LIZ;
            LJII.LIZ = null;
            LJII.LJIILL().LIZ(new RunnableC40480Fv3(LJII, LIZ2, LIZIZ));
        } else {
            LJII.LIZ = null;
            LJII.LJIILL().LIZ(new RunnableC40481Fv4(LJII, LIZIZ));
        }
        C40174Fq7 LJIIIZ = this.LIZ.LJIIIZ();
        LJIIIZ.LJIILL().LIZ(new RunnableC40397Fti(LJIIIZ, LJIIIZ.LJIIJJI().LIZIZ()));
    }

    public final void onActivityResumed(Activity activity) {
        C40174Fq7 LJIIIZ = this.LIZ.LJIIIZ();
        LJIIIZ.LJIILL().LIZ(new RunnableC40398Ftj(LJIIIZ, LJIIIZ.LJIIJJI().LIZIZ()));
        C40171Fq4 LJII = this.LIZ.LJII();
        if (LJII.LJIJ().LIZ(C65111PhM.LJLJI)) {
            synchronized (LJII.LJIIIZ) {
                try {
                    LJII.LJIIIIZZ = true;
                    if (activity != LJII.LJ) {
                        synchronized (LJII.LJIIIZ) {
                            try {
                                LJII.LJ = activity;
                                LJII.LJFF = false;
                            } catch (Throwable th) {
                                throw th;
                            }
                        }
                        if (LJII.LJIJ().LIZ(C65111PhM.LJLILLLLZI) && LJII.LJIJ().LJII().booleanValue()) {
                            LJII.LJI = null;
                            LJII.LJIILL().LIZ(new RunnableC40483Fv6(LJII));
                        }
                    }
                } finally {
                }
            }
        }
        if (!LJII.LJIJ().LIZ(C65111PhM.LJLILLLLZI) || LJII.LJIJ().LJII().booleanValue()) {
            LJII.LIZ(activity, LJII.LIZ(activity), false);
            C40176Fq9 LIZLLL = LJII.LIZLLL();
            LIZLLL.LJIILL().LIZ(new RunnableC40486Fv9(LIZLLL, LIZLLL.LJIIJJI().LIZIZ()));
            return;
        }
        LJII.LIZ = LJII.LJI;
        LJII.LJIILL().LIZ(new RunnableC40482Fv5(LJII));
    }

    public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
        C40484Fv7 fv7;
        C40171Fq4 LJII = this.LIZ.LJII();
        if (LJII.LJIJ().LJII().booleanValue() && bundle != null && (fv7 = LJII.LIZLLL.get(activity)) != null) {
            Bundle bundle2 = new Bundle();
            bundle2.putLong("id", fv7.LIZJ);
            bundle2.putString(StringSet.name, fv7.LIZ);
            bundle2.putString("referrer_name", fv7.LIZIZ);
            bundle.putBundle("com.google.app_measurement.screen_service", bundle2);
        }
    }

    public final void onActivityStarted(Activity activity) {
    }

    public final void onActivityStopped(Activity activity) {
    }
}