package o;

import android.view.View;
import android.view.Window;
import android.view.WindowInsetsController;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public class Nl0 extends AbstractC0662Zn {
    public final WindowInsetsController m;
    public Window n;

    public Nl0(WindowInsetsController windowInsetsController, WT wt) {
        this.m = windowInsetsController;
    }

    @Override // o.AbstractC0662Zn
    public final void G(boolean z) {
        Window window = this.n;
        if (z) {
            if (window != null) {
                View decorView = window.getDecorView();
                decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() | 16);
            }
            this.m.setSystemBarsAppearance(16, 16);
            return;
        }
        if (window != null) {
            View decorView2 = window.getDecorView();
            decorView2.setSystemUiVisibility(decorView2.getSystemUiVisibility() & (-17));
        }
        this.m.setSystemBarsAppearance(0, 16);
    }

    @Override // o.AbstractC0662Zn
    public final void H(boolean z) {
        Window window = this.n;
        if (z) {
            if (window != null) {
                View decorView = window.getDecorView();
                decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() | 8192);
            }
            this.m.setSystemBarsAppearance(8, 8);
            return;
        }
        if (window != null) {
            View decorView2 = window.getDecorView();
            decorView2.setSystemUiVisibility(decorView2.getSystemUiVisibility() & (-8193));
        }
        this.m.setSystemBarsAppearance(0, 8);
    }
}
