package h3;

import android.view.KeyEvent;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class P2 implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ boolean f17157a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ n0.x f17158b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ boolean f17159c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ List f17160d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ J4.a f17161e;

    public P2(boolean z6, n0.x xVar, boolean z7, List list, J4.a aVar) {
        this.f17157a = z6;
        this.f17158b = xVar;
        this.f17159c = z7;
        this.f17160d = list;
        this.f17161e = aVar;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        KeyEvent event = ((A0.c) obj).f76a;
        kotlin.jvm.internal.o.h(event, "event");
        if (event.getAction() != 0) {
            return Boolean.FALSE;
        }
        if (event.getKeyCode() != 20) {
            return Boolean.FALSE;
        }
        if (this.f17157a) {
            n0.x.a(this.f17158b);
            return Boolean.TRUE;
        }
        if (this.f17159c || this.f17160d.isEmpty()) {
            return Boolean.FALSE;
        }
        this.f17161e.invoke();
        return Boolean.TRUE;
    }
}
