package B;

import F1.InterfaceC0187p;
import android.os.Build;
import android.view.View;
import java.util.List;

/* JADX INFO: renamed from: B.j0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class RunnableC0068j0 extends F1.L implements Runnable, InterfaceC0187p, View.OnAttachStateChangeListener {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final g1 f314c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f315d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f316e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public F1.m0 f317f;

    public RunnableC0068j0(g1 g1Var) {
        super(!g1Var.f301t ? 1 : 0);
        this.f314c = g1Var;
    }

    @Override // F1.InterfaceC0187p
    public final F1.m0 a(View view, F1.m0 m0Var) {
        this.f317f = m0Var;
        g1 g1Var = this.f314c;
        g1Var.getClass();
        F1.h0 h0Var = m0Var.f1458a;
        g1Var.f299r.f(AbstractC0057e.J(h0Var.g(8)));
        if (this.f315d) {
            if (Build.VERSION.SDK_INT == 30) {
                view.post(this);
            }
        } else if (!this.f316e) {
            g1Var.f300s.f(AbstractC0057e.J(h0Var.g(8)));
            g1.b(g1Var, m0Var);
        }
        return g1Var.f301t ? F1.m0.f1457b : m0Var;
    }

    @Override // F1.L
    public final void k(F1.V v3) {
        this.f315d = false;
        this.f316e = false;
        F1.m0 m0Var = this.f317f;
        if (v3.f1408a.b() > 0 && m0Var != null) {
            g1 g1Var = this.f314c;
            g1Var.getClass();
            F1.h0 h0Var = m0Var.f1458a;
            g1Var.f300s.f(AbstractC0057e.J(h0Var.g(8)));
            g1Var.f299r.f(AbstractC0057e.J(h0Var.g(8)));
            g1.b(g1Var, m0Var);
        }
        this.f317f = null;
    }

    @Override // F1.L
    public final void l() {
        this.f315d = true;
        this.f316e = true;
    }

    @Override // F1.L
    public final F1.m0 m(F1.m0 m0Var, List list) {
        g1 g1Var = this.f314c;
        g1.b(g1Var, m0Var);
        return g1Var.f301t ? F1.m0.f1457b : m0Var;
    }

    @Override // F1.L
    public final T.p n(F1.V v3, T.p pVar) {
        this.f315d = false;
        return pVar;
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewAttachedToWindow(View view) {
        view.requestApplyInsets();
    }

    @Override // java.lang.Runnable
    public final void run() {
        if (this.f315d) {
            this.f315d = false;
            this.f316e = false;
            F1.m0 m0Var = this.f317f;
            if (m0Var != null) {
                g1 g1Var = this.f314c;
                g1Var.getClass();
                g1Var.f300s.f(AbstractC0057e.J(m0Var.f1458a.g(8)));
                g1.b(g1Var, m0Var);
                this.f317f = null;
            }
        }
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewDetachedFromWindow(View view) {
    }
}
