package o;

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

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class QY extends AbstractC0229Iv {
    final /* synthetic */ RY this$0;

    /* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
    public static final class a extends AbstractC0229Iv {
        final /* synthetic */ RY this$0;

        public a(RY ry) {
            this.this$0 = ry;
        }

        @Override // android.app.Application.ActivityLifecycleCallbacks
        public void onActivityPostResumed(Activity activity) {
            this.this$0.a();
        }

        @Override // android.app.Application.ActivityLifecycleCallbacks
        public void onActivityPostStarted(Activity activity) {
            RY ry = this.this$0;
            int i = ry.l + 1;
            ry.l = i;
            if (i == 1 && ry.f313o) {
                ry.q.f(UK.ON_START);
                ry.f313o = false;
            }
        }
    }

    public QY(RY ry) {
        this.this$0 = ry;
    }

    @Override // o.AbstractC0229Iv, android.app.Application.ActivityLifecycleCallbacks
    public void onActivityCreated(Activity activity, Bundle bundle) {
        if (Build.VERSION.SDK_INT < 29) {
            int i = FragmentC1351h20.m;
            ((FragmentC1351h20) activity.getFragmentManager().findFragmentByTag("androidx.lifecycle.LifecycleDispatcher.report_fragment_tag")).l = this.this$0.s;
        }
    }

    @Override // o.AbstractC0229Iv, android.app.Application.ActivityLifecycleCallbacks
    public void onActivityPaused(Activity activity) {
        RY ry = this.this$0;
        int i = ry.m - 1;
        ry.m = i;
        if (i == 0) {
            ry.p.postDelayed(ry.r, 700L);
        }
    }

    @Override // android.app.Application.ActivityLifecycleCallbacks
    public void onActivityPreCreated(Activity activity, Bundle bundle) {
        R8.l(activity, new a(this.this$0));
    }

    @Override // o.AbstractC0229Iv, android.app.Application.ActivityLifecycleCallbacks
    public void onActivityStopped(Activity activity) {
        RY ry = this.this$0;
        int i = ry.l - 1;
        ry.l = i;
        if (i == 0 && ry.n) {
            ry.q.f(UK.ON_STOP);
            ry.f313o = true;
        }
    }
}
