package o;

import android.R;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.ComponentActivity;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Hj, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC0191Hj {
    public static final ViewGroup.LayoutParams a = new ViewGroup.LayoutParams(-2, -2);

    public static void a(ComponentActivity componentActivity, C0554Vj c0554Vj) {
        View childAt = ((ViewGroup) componentActivity.getWindow().getDecorView().findViewById(R.id.content)).getChildAt(0);
        C0088Dk c0088Dk = childAt instanceof C0088Dk ? (C0088Dk) childAt : null;
        if (c0088Dk != null) {
            c0088Dk.setParentCompositionContext(null);
            c0088Dk.setContent(c0554Vj);
            return;
        }
        C0088Dk c0088Dk2 = new C0088Dk(componentActivity);
        c0088Dk2.setParentCompositionContext(null);
        c0088Dk2.setContent(c0554Vj);
        View decorView = componentActivity.getWindow().getDecorView();
        if (AbstractC2461sm0.p(decorView) == null) {
            AbstractC2461sm0.D(decorView, componentActivity);
        }
        if (AbstractC0940cn0.s(decorView) == null) {
            AbstractC0940cn0.G(decorView, componentActivity);
        }
        if (AbstractC2841wm0.u(decorView) == null) {
            AbstractC2841wm0.C(decorView, componentActivity);
        }
        componentActivity.setContentView(c0088Dk2, a);
    }
}
