package o;

import android.app.Activity;
import android.app.Application;
import android.os.Bundle;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.r1, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2297r1 implements Application.ActivityLifecycleCallbacks {
    public Object l;
    public Activity m;
    public final int n;

    /* renamed from: o, reason: collision with root package name */
    public boolean f695o = false;
    public boolean p = false;
    public boolean q = false;

    public C2297r1(Activity activity) {
        this.m = activity;
        this.n = activity.hashCode();
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityDestroyed(Activity activity) {
        if (this.m == activity) {
            this.m = null;
            this.p = true;
        }
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityPaused(Activity activity) {
        if (!this.p || this.q || this.f695o) {
            return;
        }
        Object obj = this.l;
        try {
            Object obj2 = AbstractC2392s1.c.get(activity);
            if (obj2 == obj && activity.hashCode() == this.n) {
                AbstractC2392s1.g.postAtFrontOfQueue(new RunnableC0890cD(4, AbstractC2392s1.b.get(activity), obj2));
                this.q = true;
                this.l = null;
            }
        } catch (Throwable unused) {
        }
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityStarted(Activity activity) {
        if (this.m == activity) {
            this.f695o = true;
        }
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityResumed(Activity activity) {
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityStopped(Activity activity) {
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivityCreated(Activity activity, Bundle bundle) {
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
    }
}
