package androidx.window.layout;

/* JADX INFO: loaded from: classes.dex */
public final class h implements f {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final androidx.window.core.b f4475a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final g f4476b;

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

    public h(androidx.window.core.b bVar, g gVar, e eVar) {
        this.f4475a = bVar;
        this.f4476b = gVar;
        this.f4477c = eVar;
        if (bVar.b() == 0 && bVar.a() == 0) {
            throw new IllegalArgumentException("Bounds must be non zero".toString());
        }
        if (bVar.f4414a != 0 && bVar.f4415b != 0) {
            throw new IllegalArgumentException("Bounding rectangle must start at the top or left window edge for folding features".toString());
        }
    }

    public final boolean a() {
        g gVar = g.f4473c;
        g gVar2 = this.f4476b;
        if (nb.g.c(gVar2, gVar)) {
            return true;
        }
        if (nb.g.c(gVar2, g.f4472b)) {
            if (nb.g.c(this.f4477c, e.f4470c)) {
                return true;
            }
        }
        return false;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!nb.g.c(h.class, obj != null ? obj.getClass() : null)) {
            return false;
        }
        nb.g.g(obj, "null cannot be cast to non-null type androidx.window.layout.HardwareFoldingFeature");
        h hVar = (h) obj;
        return nb.g.c(this.f4475a, hVar.f4475a) && nb.g.c(this.f4476b, hVar.f4476b) && nb.g.c(this.f4477c, hVar.f4477c);
    }

    public final int hashCode() {
        return this.f4477c.hashCode() + ((this.f4476b.hashCode() + (this.f4475a.hashCode() * 31)) * 31);
    }

    public final String toString() {
        return h.class.getSimpleName() + " { " + this.f4475a + ", type=" + this.f4476b + ", state=" + this.f4477c + " }";
    }
}
