package jb;

import hb.i;
import java.util.concurrent.TimeUnit;

/* JADX INFO: loaded from: classes2.dex */
public final class e {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final long f28763d = TimeUnit.HOURS.toMillis(24);

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final long f28764e = TimeUnit.MINUTES.toMillis(30);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final i f28765a = i.a();

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

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

    /* JADX WARN: Removed duplicated region for block: B:12:0x001b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final synchronized boolean a() {
        boolean z10;
        if (this.f28767c != 0) {
            this.f28765a.f26465a.getClass();
            z10 = System.currentTimeMillis() > this.f28766b;
        }
        return z10;
    }

    public final synchronized void b(int i10) {
        long jMin;
        if ((i10 >= 200 && i10 < 300) || i10 == 401 || i10 == 404) {
            synchronized (this) {
                this.f28767c = 0;
            }
            return;
        }
        this.f28767c++;
        synchronized (this) {
            if (i10 == 429 || (i10 >= 500 && i10 < 600)) {
                double dPow = Math.pow(2.0d, this.f28767c);
                this.f28765a.getClass();
                jMin = (long) Math.min(dPow + ((long) (Math.random() * 1000.0d)), f28764e);
            } else {
                jMin = f28763d;
            }
            this.f28765a.f26465a.getClass();
            this.f28766b = System.currentTimeMillis() + jMin;
        }
        return;
    }
}
