package n4;

import androidx.media3.exoplayer.dash.DashMediaSource;
import androidx.work.BackoffPolicy;
import androidx.work.OutOfQuotaPolicy;
import androidx.work.WorkInfo$State;
import androidx.work.u;

/* JADX INFO: loaded from: classes.dex */
public final class o {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public String f30818a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public WorkInfo$State f30819b = WorkInfo$State.f4516a;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public String f30820c;

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public androidx.work.i f30822e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public androidx.work.i f30823f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public long f30824g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public long f30825h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public long f30826i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public androidx.work.e f30827j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public int f30828k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public BackoffPolicy f30829l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public long f30830m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public long f30831n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public long f30832o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public long f30833p;

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public OutOfQuotaPolicy f30835r;

    static {
        u.e("WorkSpec");
    }

    public o(String str, String str2) {
        androidx.work.i iVar = androidx.work.i.f4564b;
        this.f30822e = iVar;
        this.f30823f = iVar;
        this.f30827j = androidx.work.e.f4548i;
        this.f30829l = BackoffPolicy.f4494a;
        this.f30830m = DashMediaSource.DEFAULT_FALLBACK_TARGET_LIVE_OFFSET_MS;
        this.f30833p = -1L;
        this.f30835r = OutOfQuotaPolicy.f4513a;
        this.f30818a = str;
        this.f30820c = str2;
    }

    public final long a() {
        int i10;
        if (this.f30819b == WorkInfo$State.f4516a && (i10 = this.f30828k) > 0) {
            return Math.min(18000000L, this.f30829l == BackoffPolicy.f4495b ? this.f30830m * ((long) i10) : (long) Math.scalb(this.f30830m, i10 - 1)) + this.f30831n;
        }
        if (!c()) {
            long jCurrentTimeMillis = this.f30831n;
            if (jCurrentTimeMillis == 0) {
                jCurrentTimeMillis = System.currentTimeMillis();
            }
            return jCurrentTimeMillis + this.f30824g;
        }
        long jCurrentTimeMillis2 = System.currentTimeMillis();
        long j10 = this.f30831n;
        if (j10 == 0) {
            j10 = this.f30824g + jCurrentTimeMillis2;
        }
        long j11 = this.f30826i;
        long j12 = this.f30825h;
        if (j11 != j12) {
            return j10 + j12 + (j10 == 0 ? j11 * (-1) : 0L);
        }
        return j10 + (j10 != 0 ? j12 : 0L);
    }

    public final boolean b() {
        return !androidx.work.e.f4548i.equals(this.f30827j);
    }

    public final boolean c() {
        return this.f30825h != 0;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || o.class != obj.getClass()) {
            return false;
        }
        o oVar = (o) obj;
        if (this.f30824g != oVar.f30824g || this.f30825h != oVar.f30825h || this.f30826i != oVar.f30826i || this.f30828k != oVar.f30828k || this.f30830m != oVar.f30830m || this.f30831n != oVar.f30831n || this.f30832o != oVar.f30832o || this.f30833p != oVar.f30833p || this.f30834q != oVar.f30834q || !this.f30818a.equals(oVar.f30818a) || this.f30819b != oVar.f30819b || !this.f30820c.equals(oVar.f30820c)) {
            return false;
        }
        String str = this.f30821d;
        if (str == null ? oVar.f30821d == null : str.equals(oVar.f30821d)) {
            return this.f30822e.equals(oVar.f30822e) && this.f30823f.equals(oVar.f30823f) && this.f30827j.equals(oVar.f30827j) && this.f30829l == oVar.f30829l && this.f30835r == oVar.f30835r;
        }
        return false;
    }

    public final int hashCode() {
        int iB = defpackage.e.b(this.f30820c, (this.f30819b.hashCode() + (this.f30818a.hashCode() * 31)) * 31, 31);
        String str = this.f30821d;
        int iHashCode = (this.f30823f.hashCode() + ((this.f30822e.hashCode() + ((iB + (str != null ? str.hashCode() : 0)) * 31)) * 31)) * 31;
        long j10 = this.f30824g;
        int i10 = (iHashCode + ((int) (j10 ^ (j10 >>> 32)))) * 31;
        long j11 = this.f30825h;
        int i11 = (i10 + ((int) (j11 ^ (j11 >>> 32)))) * 31;
        long j12 = this.f30826i;
        int iHashCode2 = (this.f30829l.hashCode() + ((((this.f30827j.hashCode() + ((i11 + ((int) (j12 ^ (j12 >>> 32)))) * 31)) * 31) + this.f30828k) * 31)) * 31;
        long j13 = this.f30830m;
        int i12 = (iHashCode2 + ((int) (j13 ^ (j13 >>> 32)))) * 31;
        long j14 = this.f30831n;
        int i13 = (i12 + ((int) (j14 ^ (j14 >>> 32)))) * 31;
        long j15 = this.f30832o;
        int i14 = (i13 + ((int) (j15 ^ (j15 >>> 32)))) * 31;
        long j16 = this.f30833p;
        return this.f30835r.hashCode() + ((((i14 + ((int) (j16 ^ (j16 >>> 32)))) * 31) + (this.f30834q ? 1 : 0)) * 31);
    }

    public final String toString() {
        return defpackage.e.o(new StringBuilder("{WorkSpec: "), this.f30818a, "}");
    }
}
