package r4; import com.google.firebase.installations.i; import java.util.concurrent.TimeUnit; /* loaded from: classes2.dex */ class e { /* renamed from: d, reason: collision with root package name */ private static final long f13722d = TimeUnit.HOURS.toMillis(24); /* renamed from: e, reason: collision with root package name */ private static final long f13723e = TimeUnit.MINUTES.toMillis(30); /* renamed from: a, reason: collision with root package name */ private final i f13724a = i.c(); /* renamed from: b, reason: collision with root package name */ private long f13725b; /* renamed from: c, reason: collision with root package name */ private int f13726c; e() { } private synchronized long a(int i10) { if (c(i10)) { return (long) Math.min(Math.pow(2.0d, this.f13726c) + this.f13724a.e(), f13723e); } return f13722d; } private static boolean c(int i10) { return i10 == 429 || (i10 >= 500 && i10 < 600); } private static boolean d(int i10) { return (i10 >= 200 && i10 < 300) || i10 == 401 || i10 == 404; } private synchronized void e() { this.f13726c = 0; } public synchronized boolean b() { boolean z10; if (this.f13726c != 0) { z10 = this.f13724a.a() > this.f13725b; } return z10; } public synchronized void f(int i10) { if (d(i10)) { e(); return; } this.f13726c++; this.f13725b = this.f13724a.a() + a(i10); } }