Files
rr3-apk/smali_classes3/com/helpshift/poller/ExponentialBackoff.smali
supermegamestre 4bbd74a497 First Upload
Just the APK
Force update disabled, will only work offline.
2026-01-26 00:26:29 -03:00

117 lines
2.3 KiB
Smali

.class public Lcom/helpshift/poller/ExponentialBackoff;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public baseInterval:I
.field public currentInterval:I
.field public maxInterval:I
# direct methods
.method public constructor <init>(II)V
.locals 0
.line 16
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->baseInterval:I
iput p2, p0, Lcom/helpshift/poller/ExponentialBackoff;->maxInterval:I
iput p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
return-void
.end method
# virtual methods
.method public nextInterval(I)I
.locals 2
if-nez p1, :cond_0
iget p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
return p1
:cond_0
const/16 v0, 0xc8
if-lt p1, v0, :cond_1
const/16 v0, 0x190
if-lt p1, v0, :cond_2
:cond_1
const/16 v0, 0x1f4
if-lt p1, v0, :cond_4
:cond_2
iget p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
mul-int/lit8 v0, p1, 0x2
iget v1, p0, Lcom/helpshift/poller/ExponentialBackoff;->maxInterval:I
if-le v0, v1, :cond_3
goto :goto_0
:cond_3
mul-int/lit8 v1, p1, 0x2
:goto_0
iput v1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
goto :goto_1
:cond_4
const/4 p1, -0x1
iput p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
:goto_1
iget p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
return p1
.end method
.method public reconcileIntervals(II)V
.locals 1
iget v0, p0, Lcom/helpshift/poller/ExponentialBackoff;->baseInterval:I
if-ne v0, p1, :cond_0
iget v0, p0, Lcom/helpshift/poller/ExponentialBackoff;->maxInterval:I
if-ne v0, p2, :cond_0
return-void
:cond_0
iput p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->baseInterval:I
iput p2, p0, Lcom/helpshift/poller/ExponentialBackoff;->maxInterval:I
iput p1, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
return-void
.end method
.method public reset()V
.locals 1
iget v0, p0, Lcom/helpshift/poller/ExponentialBackoff;->baseInterval:I
iput v0, p0, Lcom/helpshift/poller/ExponentialBackoff;->currentInterval:I
return-void
.end method