package o;

import android.app.Activity;
import android.app.FragmentManager;
import android.os.Build;
import o.FragmentC1351h20;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.f20, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1159f20 {
    /* JADX WARN: Multi-variable type inference failed */
    public static void a(Activity activity, UK uk) {
        if (activity instanceof InterfaceC0898cL) {
            WK lifecycle = ((InterfaceC0898cL) activity).getLifecycle();
            if (lifecycle instanceof C1089eL) {
                ((C1089eL) lifecycle).f(uk);
            }
        }
    }

    public static void b(Activity activity) {
        if (Build.VERSION.SDK_INT >= 29) {
            FragmentC1351h20.a.Companion.getClass();
            activity.registerActivityLifecycleCallbacks(new FragmentC1351h20.a());
        }
        FragmentManager fragmentManager = activity.getFragmentManager();
        if (fragmentManager.findFragmentByTag("androidx.lifecycle.LifecycleDispatcher.report_fragment_tag") == null) {
            fragmentManager.beginTransaction().add(new FragmentC1351h20(), "androidx.lifecycle.LifecycleDispatcher.report_fragment_tag").commit();
            fragmentManager.executePendingTransactions();
        }
    }
}
