1107 lines
27 KiB
Smali
1107 lines
27 KiB
Smali
.class public Landroidx/work/impl/model/WorkSpec;
|
|
.super Ljava/lang/Object;
|
|
.source "WorkSpec.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/work/impl/model/WorkSpec$WorkInfoPojo;,
|
|
Landroidx/work/impl/model/WorkSpec$IdAndState;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final SCHEDULE_NOT_REQUESTED_YET:J = -0x1L
|
|
|
|
.field private static final TAG:Ljava/lang/String;
|
|
|
|
.field public static final WORK_INFO_MAPPER:Landroidx/arch/core/util/Function;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/arch/core/util/Function<",
|
|
"Ljava/util/List<",
|
|
"Landroidx/work/impl/model/WorkSpec$WorkInfoPojo;",
|
|
">;",
|
|
"Ljava/util/List<",
|
|
"Landroidx/work/WorkInfo;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field public backoffDelayDuration:J
|
|
|
|
.field public backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
.field public constraints:Landroidx/work/Constraints;
|
|
|
|
.field public flexDuration:J
|
|
|
|
.field public id:Ljava/lang/String;
|
|
|
|
.field public initialDelay:J
|
|
|
|
.field public input:Landroidx/work/Data;
|
|
|
|
.field public inputMergerClassName:Ljava/lang/String;
|
|
|
|
.field public intervalDuration:J
|
|
|
|
.field public minimumRetentionDuration:J
|
|
|
|
.field public output:Landroidx/work/Data;
|
|
|
|
.field public periodStartTime:J
|
|
|
|
.field public runAttemptCount:I
|
|
|
|
.field public scheduleRequestedAt:J
|
|
|
|
.field public state:Landroidx/work/WorkInfo$State;
|
|
|
|
.field public workerClassName:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "WorkSpec"
|
|
|
|
invoke-static {v0}, Landroidx/work/Logger;->tagWithPrefix(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-instance v0, Landroidx/work/impl/model/WorkSpec$1;
|
|
|
|
invoke-direct {v0}, Landroidx/work/impl/model/WorkSpec$1;-><init>()V
|
|
|
|
sput-object v0, Landroidx/work/impl/model/WorkSpec;->WORK_INFO_MAPPER:Landroidx/arch/core/util/Function;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroidx/work/impl/model/WorkSpec;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sget-object v0, Landroidx/work/WorkInfo$State;->ENQUEUED:Landroidx/work/WorkInfo$State;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
sget-object v0, Landroidx/work/Data;->EMPTY:Landroidx/work/Data;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
sget-object v0, Landroidx/work/Data;->EMPTY:Landroidx/work/Data;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
sget-object v0, Landroidx/work/Constraints;->NONE:Landroidx/work/Constraints;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
sget-object v0, Landroidx/work/BackoffPolicy;->EXPONENTIAL:Landroidx/work/BackoffPolicy;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
const-wide/16 v0, 0x7530
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
iget-object v0, p1, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
iget-object v0, p1, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
iget-object v0, p1, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
iget-object v0, p1, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
new-instance v0, Landroidx/work/Data;
|
|
|
|
iget-object v1, p1, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/Data;-><init>(Landroidx/work/Data;)V
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
new-instance v0, Landroidx/work/Data;
|
|
|
|
iget-object v1, p1, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/Data;-><init>(Landroidx/work/Data;)V
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
new-instance v0, Landroidx/work/Constraints;
|
|
|
|
iget-object v1, p1, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/Constraints;-><init>(Landroidx/work/Constraints;)V
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
iget v0, p1, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
iput v0, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
iget-object v0, p1, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->minimumRetentionDuration:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->minimumRetentionDuration:J
|
|
|
|
iget-wide v0, p1, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sget-object v0, Landroidx/work/WorkInfo$State;->ENQUEUED:Landroidx/work/WorkInfo$State;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
sget-object v0, Landroidx/work/Data;->EMPTY:Landroidx/work/Data;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
sget-object v0, Landroidx/work/Data;->EMPTY:Landroidx/work/Data;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
sget-object v0, Landroidx/work/Constraints;->NONE:Landroidx/work/Constraints;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
sget-object v0, Landroidx/work/BackoffPolicy;->EXPONENTIAL:Landroidx/work/BackoffPolicy;
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
const-wide/16 v0, 0x7530
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
iput-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
iput-object p1, p0, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public calculateNextRunTime()J
|
|
.locals 7
|
|
|
|
invoke-virtual {p0}, Landroidx/work/impl/model/WorkSpec;->isBackedOff()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
sget-object v3, Landroidx/work/BackoffPolicy;->LINEAR:Landroidx/work/BackoffPolicy;
|
|
|
|
if-ne v0, v3, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
iget v2, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
int-to-long v2, v2
|
|
|
|
mul-long v0, v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
long-to-float v0, v0
|
|
|
|
iget v1, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->scalb(FI)F
|
|
|
|
move-result v0
|
|
|
|
float-to-long v0, v0
|
|
|
|
:goto_0
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
const-wide/32 v4, 0x112a880
|
|
|
|
invoke-static {v4, v5, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
return-wide v2
|
|
|
|
:cond_2
|
|
invoke-virtual {p0}, Landroidx/work/impl/model/WorkSpec;->isPeriodic()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v3, 0x16
|
|
|
|
if-gt v0, v3, :cond_7
|
|
|
|
iget-wide v3, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
iget-wide v5, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
cmp-long v0, v3, v5
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_3
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_4
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
iget-wide v4, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
mul-long v0, v0, v4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move-wide v0, v2
|
|
|
|
:goto_1
|
|
iget-wide v4, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
cmp-long v6, v4, v2
|
|
|
|
if-nez v6, :cond_5
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
:cond_5
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
add-long/2addr v4, v2
|
|
|
|
add-long/2addr v4, v0
|
|
|
|
return-wide v4
|
|
|
|
:cond_6
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
|
|
:cond_7
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
|
|
:cond_8
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 7
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p0, p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_12
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
check-cast p1, Landroidx/work/impl/model/WorkSpec;
|
|
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
return v1
|
|
|
|
:cond_4
|
|
iget v2, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
iget v3, p1, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
if-eq v2, v3, :cond_5
|
|
|
|
return v1
|
|
|
|
:cond_5
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_6
|
|
|
|
return v1
|
|
|
|
:cond_6
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
return v1
|
|
|
|
:cond_7
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->minimumRetentionDuration:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->minimumRetentionDuration:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
return v1
|
|
|
|
:cond_8
|
|
iget-wide v2, p0, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
iget-wide v4, p1, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
return v1
|
|
|
|
:cond_9
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_a
|
|
|
|
return v1
|
|
|
|
:cond_a
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
if-eq v2, v3, :cond_b
|
|
|
|
return v1
|
|
|
|
:cond_b
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_c
|
|
|
|
return v1
|
|
|
|
:cond_c
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_d
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_e
|
|
|
|
goto :goto_0
|
|
|
|
:cond_d
|
|
iget-object v2, p1, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_e
|
|
|
|
:goto_0
|
|
return v1
|
|
|
|
:cond_e
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
invoke-virtual {v2, v3}, Landroidx/work/Data;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_f
|
|
|
|
return v1
|
|
|
|
:cond_f
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
invoke-virtual {v2, v3}, Landroidx/work/Data;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_10
|
|
|
|
return v1
|
|
|
|
:cond_10
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
iget-object v3, p1, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
invoke-virtual {v2, v3}, Landroidx/work/Constraints;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_11
|
|
|
|
return v1
|
|
|
|
:cond_11
|
|
iget-object v2, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
iget-object p1, p1, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
if-ne v2, p1, :cond_12
|
|
|
|
return v0
|
|
|
|
:cond_12
|
|
:goto_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public hasConstraints()Z
|
|
.locals 2
|
|
|
|
sget-object v0, Landroidx/work/Constraints;->NONE:Landroidx/work/Constraints;
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/Constraints;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/WorkInfo$State;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->workerClassName:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->inputMergerClassName:Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->input:Landroidx/work/Data;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/Data;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->output:Landroidx/work/Data;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/Data;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->initialDelay:J
|
|
|
|
const/16 v3, 0x20
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->constraints:Landroidx/work/Constraints;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/Constraints;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget v1, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->backoffPolicy:Landroidx/work/BackoffPolicy;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/BackoffPolicy;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->periodStartTime:J
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->minimumRetentionDuration:J
|
|
|
|
ushr-long v4, v1, v3
|
|
|
|
xor-long/2addr v1, v4
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-wide v1, p0, Landroidx/work/impl/model/WorkSpec;->scheduleRequestedAt:J
|
|
|
|
ushr-long v3, v1, v3
|
|
|
|
xor-long/2addr v1, v3
|
|
|
|
long-to-int v2, v1
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isBackedOff()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/model/WorkSpec;->state:Landroidx/work/WorkInfo$State;
|
|
|
|
sget-object v1, Landroidx/work/WorkInfo$State;->ENQUEUED:Landroidx/work/WorkInfo$State;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
iget v0, p0, Landroidx/work/impl/model/WorkSpec;->runAttemptCount:I
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isPeriodic()Z
|
|
.locals 5
|
|
|
|
iget-wide v0, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public setBackoffDelayDuration(J)V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const-wide/32 v1, 0x112a880
|
|
|
|
cmp-long v3, p1, v1
|
|
|
|
if-lez v3, :cond_0
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-array v3, v0, [Ljava/lang/Throwable;
|
|
|
|
const-string v4, "Backoff delay duration exceeds maximum value"
|
|
|
|
invoke-virtual {p1, p2, v4, v3}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p1, v1
|
|
|
|
:cond_0
|
|
const-wide/16 v1, 0x2710
|
|
|
|
cmp-long v3, p1, v1
|
|
|
|
if-gez v3, :cond_1
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-array v0, v0, [Ljava/lang/Throwable;
|
|
|
|
const-string v3, "Backoff delay duration less than minimum value"
|
|
|
|
invoke-virtual {p1, p2, v3, v0}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p1, v1
|
|
|
|
:cond_1
|
|
iput-wide p1, p0, Landroidx/work/impl/model/WorkSpec;->backoffDelayDuration:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setPeriodic(J)V
|
|
.locals 5
|
|
|
|
const-wide/32 v0, 0xdbba0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-gez v2, :cond_0
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aput-object v3, v2, v4
|
|
|
|
const-string v3, "Interval duration lesser than minimum allowed value; Changed to %s"
|
|
|
|
invoke-static {v3, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-array v3, v4, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p1, p2, v2, v3}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p1, v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p1, p2}, Landroidx/work/impl/model/WorkSpec;->setPeriodic(JJ)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setPeriodic(JJ)V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const-wide/32 v1, 0xdbba0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
cmp-long v4, p1, v1
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-array v4, v0, [Ljava/lang/Object;
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v4, v3
|
|
|
|
const-string v5, "Interval duration lesser than minimum allowed value; Changed to %s"
|
|
|
|
invoke-static {v5, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
new-array v5, v3, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p1, p2, v4, v5}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p1, v1
|
|
|
|
:cond_0
|
|
const-wide/32 v1, 0x493e0
|
|
|
|
cmp-long v4, p3, v1
|
|
|
|
if-gez v4, :cond_1
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p3
|
|
|
|
sget-object p4, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-array v4, v0, [Ljava/lang/Object;
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v4, v3
|
|
|
|
const-string v5, "Flex duration lesser than minimum allowed value; Changed to %s"
|
|
|
|
invoke-static {v5, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
new-array v5, v3, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p3, p4, v4, v5}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p3, v1
|
|
|
|
:cond_1
|
|
cmp-long v1, p3, p1
|
|
|
|
if-lez v1, :cond_2
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p3
|
|
|
|
sget-object p4, Landroidx/work/impl/model/WorkSpec;->TAG:Ljava/lang/String;
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v3
|
|
|
|
const-string v1, "Flex duration greater than interval duration; Changed to %s"
|
|
|
|
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v1, v3, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p3, p4, v0, v1}, Landroidx/work/Logger;->warning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
move-wide p3, p1
|
|
|
|
:cond_2
|
|
iput-wide p1, p0, Landroidx/work/impl/model/WorkSpec;->intervalDuration:J
|
|
|
|
iput-wide p3, p0, Landroidx/work/impl/model/WorkSpec;->flexDuration:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "{WorkSpec: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/model/WorkSpec;->id:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "}"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|