package o;

import android.os.Build;
import android.view.View;
import android.view.WindowInsets;
import java.util.WeakHashMap;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Fj0 implements View.OnApplyWindowInsetsListener {
    public Kl0 a = null;
    public final /* synthetic */ View b;
    public final /* synthetic */ InterfaceC2904xT c;

    public Fj0(View view, InterfaceC2904xT interfaceC2904xT) {
        this.b = view;
        this.c = interfaceC2904xT;
    }

    @Override // android.view.View.OnApplyWindowInsetsListener
    public WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) {
        Kl0 kl0G = Kl0.g(view, windowInsets);
        int i = Build.VERSION.SDK_INT;
        InterfaceC2904xT interfaceC2904xT = this.c;
        if (i < 30) {
            Gj0.a(windowInsets, this.b);
            if (kl0G.equals(this.a)) {
                return interfaceC2904xT.i(view, kl0G).f();
            }
        }
        this.a = kl0G;
        Kl0 kl0I = interfaceC2904xT.i(view, kl0G);
        if (i >= 30) {
            return kl0I.f();
        }
        WeakHashMap weakHashMap = Oj0.a;
        Ej0.c(view);
        return kl0I.f();
    }
}
