package androidx.lifecycle;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import java.util.concurrent.atomic.AtomicBoolean;

/* renamed from: androidx.lifecycle.j */
/* loaded from: classes.dex */
public class C0429j {

    /* renamed from: a */
    public static AtomicBoolean f1638a = new AtomicBoolean(false);

    /* renamed from: androidx.lifecycle.j$a */
    /* loaded from: classes.dex */
    public static class C0430a extends C0406d {
        @Override // androidx.lifecycle.C0406d, android.app.Application.ActivityLifecycleCallbacks
        public void onActivityCreated(Activity activity, Bundle bundle) {
            FragmentC0449w.m3653g(activity);
        }

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

        @Override // androidx.lifecycle.C0406d, android.app.Application.ActivityLifecycleCallbacks
        public void onActivityStopped(Activity activity) {
        }
    }

    /* renamed from: a */
    public static void m3695a(Context context) {
        if (f1638a.getAndSet(true)) {
            return;
        }
        ((Application) context.getApplicationContext()).registerActivityLifecycleCallbacks(new C0430a());
    }
}