package o0;

import android.os.CancellationSignal;
import android.view.inputmethod.HandwritingGesture;
import android.view.inputmethod.PreviewableHandwritingGesture;
import androidx.compose.ui.platform.y2;
import java.util.concurrent.Executor;
import java.util.function.IntConsumer;

/* loaded from: classes.dex */
final class c {

    /* renamed from: a, reason: collision with root package name */
    public static final c f30451a = new c();

    private c() {
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void c(IntConsumer intConsumer, int i10) {
        intConsumer.accept(i10);
    }

    public final void b(l0.z zVar, r0.f0 f0Var, HandwritingGesture handwritingGesture, y2 y2Var, Executor executor, final IntConsumer intConsumer, dn.l lVar) {
        final int l10 = zVar != null ? h1.f30454a.l(zVar, handwritingGesture, f0Var, y2Var, lVar) : 3;
        if (intConsumer == null) {
            return;
        }
        if (executor != null) {
            executor.execute(new Runnable() { // from class: o0.b
                @Override // java.lang.Runnable
                public final void run() {
                    c.c(intConsumer, l10);
                }
            });
        } else {
            intConsumer.accept(l10);
        }
    }

    public final boolean d(l0.z zVar, r0.f0 f0Var, PreviewableHandwritingGesture previewableHandwritingGesture, CancellationSignal cancellationSignal) {
        if (zVar != null) {
            return h1.f30454a.D(zVar, previewableHandwritingGesture, f0Var, cancellationSignal);
        }
        return false;
    }
}
