granularity level: instruction
.class Lcom/google/firebase/installations/remote/RequestLimiter;
.super Ljava/lang/Object;
.source "RequestLimiter.java"
.field private static final MAXIMUM_BACKOFF_DURATION_FOR_CONFIGURATION_ERRORS:J
.field private static final MAXIMUM_BACKOFF_DURATION_FOR_SERVER_ERRORS:J
.field private attemptCount:I
.field private nextRequestTime:J
.field private final utils:Lcom/google/firebase/installations/Utils;
.method static constructor <clinit>()V
.locals 3
sget-object v0, Ljava/util/concurrent/TimeUnit;->HOURS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x18
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lcom/google/firebase/installations/remote/RequestLimiter;->MAXIMUM_BACKOFF_DURATION_FOR_CONFIGURATION_ERRORS:J
sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x1e
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lcom/google/firebase/installations/remote/RequestLimiter;->MAXIMUM_BACKOFF_DURATION_FOR_SERVER_ERRORS:J
return-void
.end method
.method constructor <init>()V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-static {}, Lcom/google/firebase/installations/Utils;->getInstance()Lcom/google/firebase/installations/Utils;
move-result-object v0
iput-object v0, p0, Lcom/google/firebase/installations/remote/RequestLimiter;->utils:Lcom/google/firebase/installations/Utils;
return-void
.end method
.method constructor <init>(Lcom/google/firebase/installations/Utils;)V
.locals 0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private declared-synchronized getBackoffDuration(I)J
.locals 4
const-wide v0, 0x0
return-wide v0
.end method
.method private static isRetryableError(I)Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method private static isSuccessfulOrRequiresNewFidCreation(I)Z
.locals 1
const/16 v0, 0xc8
const/16 v0, 0x12c
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method
.method private declared-synchronized resetBackoffStrategy()V
.locals 1
monitor-enter p0
const/4 v0, 0x0
:try_start_0
iput v0, p0, Lcom/google/firebase/installations/remote/RequestLimiter;->attemptCount:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized isRequestAllowed()Z
.locals 5
monitor-enter p0
iget v0, p0, Lcom/google/firebase/installations/remote/RequestLimiter;->attemptCount:I
:goto_0
const/4 v0, 0x1
:goto_1
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized setNextRequestTime(I)V
.locals 4
monitor-enter p0
:try_start_0
invoke-static {p1}, Lcom/google/firebase/installations/remote/RequestLimiter;->isSuccessfulOrRequiresNewFidCreation(I)Z
move-result v0
invoke-direct {p0}, Lcom/google/firebase/installations/remote/RequestLimiter;->resetBackoffStrategy()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method