BaseTaskInfo.smali
.class public Lcom/kwai/video/hodor/BaseTaskInfo;
.super Ljava/lang/Object;
# instance fields
.field cdnStatJson:Ljava/lang/String;
.field currentSpeedKbps:J
.field currentUrl:Ljava/lang/String;
.field downloadedBytes:J
.field errorCode:I
.field errorMsg:Ljava/lang/String;
.field expectBytes:J
.field host:Ljava/lang/String;
.field public httpResponseCode:I
.field ip:Ljava/lang/String;
.field kwaiSign:Ljava/lang/String;
.field progressBytes:J
.field stopReason:I
.annotation build Lcom/kwai/video/cache/AcCallBackInfo$DownloadStopReason;
.end annotation
.end field
.field taskState:I
.annotation build Lcom/kwai/video/hodor/IHodorTask$HodorTaskState;
.end annotation
.end field
.field totalBytes:J
.field transferConsumeMs:I
.field xKsCache:Ljava/lang/String;
# direct methods
.method public constructor <init>()V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
return-void
.end method
.method public static taskStateToString(I)Ljava/lang/String;
.registers 5
.param p0 # I
.annotation build Lcom/kwai/video/hodor/IHodorTask$HodorTaskState;
.end annotation
.end param
packed-switch p0, :pswitch_data_28
const-string v0, "taskStateToString unknown state:%d, return InnerError"
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v1, v2
invoke-static {v0, v1}, Lcom/kwai/video/hodor/util/Timber;->d(Ljava/lang/String;[Ljava/lang/Object;)V
const-string v0, "InnerError"
:goto_14
return-object v0
:pswitch_15
const-string v0, "TaskState_Unknown"
goto :goto_14
:pswitch_18
const-string v0, "TaskState_Started"
goto :goto_14
:pswitch_1b
const-string v0, "TaskState_Finished"
goto :goto_14
:pswitch_1e
const-string v0, "TaskState_Cancelled"
goto :goto_14
:pswitch_21
const-string v0, "TaskState_Failed"
goto :goto_14
:pswitch_24
const-string v0, "TaskState_Paused"
goto :goto_14
nop
:pswitch_data_28
.packed-switch -0x1
:pswitch_15
:pswitch_18
:pswitch_1b
:pswitch_1e
:pswitch_21
:pswitch_24
.end packed-switch
.end method
# virtual methods
.method copyInfoAfterDownload(Lcom/kwai/video/cache/AcCallBackInfo;)V
.registers 8
const-string v0, "[copyInfoAfterDownload]progressBytes:%d, acInfo.progressPosition:%d, acInfo.httpResponseCode:%d"
const/4 v1, 0x3
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x1
iget-wide v4, p1, Lcom/kwai/video/cache/AcCallBackInfo;->progressPosition:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x2
iget v3, p1, Lcom/kwai/video/cache/AcCallBackInfo;->httpResponseCode:I
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v1, v2
invoke-static {v0, v1}, Lcom/kwai/video/hodor/util/Timber;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->taskState:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->contentLength:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->expectBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->downloadBytes:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->downloadedBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->progressPosition:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->currentSpeedKbps:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->totalBytes:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->stopReason:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->stopReason:I
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->errorCode:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorCode:I
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->errorMsg:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorMsg:Ljava/lang/String;
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->httpResponseCode:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->httpResponseCode:I
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->currentUri:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentUrl:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->host:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->host:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->ip:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->ip:Ljava/lang/String;
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->transferConsumeMs:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->transferConsumeMs:I
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->kwaiSign:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->kwaiSign:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->xKsCache:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->xKsCache:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->cdnStatJson:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->cdnStatJson:Ljava/lang/String;
return-void
.end method
.method copyInfoInProgress(Lcom/kwai/video/cache/AcCallBackInfo;)V
.registers 4
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->taskState:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->contentLength:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->expectBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->downloadBytes:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->downloadedBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->progressPosition:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->currentSpeedKbps:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
iget-wide v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->totalBytes:J
iput-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->errorCode:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorCode:I
iget v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->stopReason:I
iput v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->stopReason:I
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->errorMsg:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorMsg:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->host:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->host:Ljava/lang/String;
iget-object v0, p1, Lcom/kwai/video/cache/AcCallBackInfo;->ip:Ljava/lang/String;
iput-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->ip:Ljava/lang/String;
return-void
.end method
.method public debugPrintCdnInfo(IILjava/lang/String;)V
.registers 13
const/4 v8, 0x2
const/4 v7, 0x1
const/4 v6, 0x0
const-string v0, "[debugPrintCdnInfo][tag:%s] errorCode:%d, errorMsg:%s, httpResponseCode:%d, stopReason:%s, currentSpeedKbps:%d, downloadedBytes:%d, expectBytes:%d, progressBytes:%d, totalBytes:%d, host:%s, ip:%s, transferConsumeMs:%d, currentUrl:%s, kwaiSign:%s, xKsCache:%s"
const/16 v1, 0x10
new-array v1, v1, [Ljava/lang/Object;
aput-object p3, v1, v6
iget v2, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorCode:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v1, v7
iget-object v2, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorMsg:Ljava/lang/String;
aput-object v2, v1, v8
const/4 v2, 0x3
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->httpResponseCode:I
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x4
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->stopReason:I
invoke-static {v3}, Lcom/kwai/video/cache/AcCallBackInfo;->stopReasonToString(I)Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x5
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x6
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->downloadedBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x7
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->expectBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/16 v2, 0x8
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/16 v2, 0x9
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/16 v2, 0xa
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->host:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0xb
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->ip:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0xc
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->transferConsumeMs:I
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v1, v2
const/16 v2, 0xd
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentUrl:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0xe
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->kwaiSign:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0xf
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->xKsCache:Ljava/lang/String;
aput-object v3, v1, v2
invoke-static {p1, v0, v1}, Lcom/kwai/video/hodor/util/Timber;->log(ILjava/lang/String;[Ljava/lang/Object;)V
const-string v0, "%s cdnStatJson:%s"
new-array v1, v8, [Ljava/lang/Object;
aput-object p3, v1, v6
iget-object v2, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->cdnStatJson:Ljava/lang/String;
aput-object v2, v1, v7
invoke-static {p2, v0, v1}, Lcom/kwai/video/hodor/util/Timber;->log(ILjava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method public debugPrintProgressInfo(ILjava/lang/String;)V
.registers 9
const-string v0, "[debugPrintProgressInfo][tag:%s] taskState:%s, stopReason:%s, currentSpeedKbps:%d, progressBytes:%d, totalBytes:%d, errorCode:%d, errorMsg:%s, host:%s, ip:%s"
const/16 v1, 0xa
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p2, v1, v2
const/4 v2, 0x1
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
invoke-static {v3}, Lcom/kwai/video/hodor/BaseTaskInfo;->taskStateToString(I)Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x2
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->stopReason:I
invoke-static {v3}, Lcom/kwai/video/cache/AcCallBackInfo;->stopReasonToString(I)Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x3
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x4
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x5
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x6
iget v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorCode:I
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x7
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorMsg:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0x8
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->host:Ljava/lang/String;
aput-object v3, v1, v2
const/16 v2, 0x9
iget-object v3, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->ip:Ljava/lang/String;
aput-object v3, v1, v2
invoke-static {p1, v0, v1}, Lcom/kwai/video/hodor/util/Timber;->log(ILjava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method public getCdnStatJson()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->cdnStatJson:Ljava/lang/String;
return-object v0
.end method
.method public getCurrentSpeedKbps()J
.registers 3
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
return-wide v0
.end method
.method public getCurrentSpeedKiloBytesPerSecond()J
.registers 5
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentSpeedKbps:J
const-wide/16 v2, 0x3e8
mul-long/2addr v0, v2
const-wide/16 v2, 0x8
div-long/2addr v0, v2
const-wide/16 v2, 0x400
div-long/2addr v0, v2
return-wide v0
.end method
.method public getCurrentUrl()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->currentUrl:Ljava/lang/String;
return-object v0
.end method
.method public getDownloadedBytes()J
.registers 3
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->downloadedBytes:J
return-wide v0
.end method
.method public getErrorCode()I
.registers 2
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorCode:I
return v0
.end method
.method public getErrorMsg()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->errorMsg:Ljava/lang/String;
return-object v0
.end method
.method public getExpectBytes()J
.registers 3
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->expectBytes:J
return-wide v0
.end method
.method public getHost()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->host:Ljava/lang/String;
return-object v0
.end method
.method public getHttpResponseCode()I
.registers 2
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->httpResponseCode:I
return v0
.end method
.method public getIp()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->ip:Ljava/lang/String;
return-object v0
.end method
.method public getKwaiSign()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->kwaiSign:Ljava/lang/String;
return-object v0
.end method
.method public getProgressBytes()J
.registers 3
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
return-wide v0
.end method
.method public getStopReason()I
.registers 2
.annotation build Lcom/kwai/video/cache/AcCallBackInfo$DownloadStopReason;
.end annotation
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->stopReason:I
return v0
.end method
.method public getTaskState()I
.registers 2
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
return v0
.end method
.method public getTotalBytes()J
.registers 3
iget-wide v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
return-wide v0
.end method
.method public getTransferConsumeMs()I
.registers 2
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->transferConsumeMs:I
return v0
.end method
.method public getxKsCache()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->xKsCache:Ljava/lang/String;
return-object v0
.end method
.method public isComplete()Z
.registers 7
const/4 v0, 0x1
iget v1, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
if-ne v1, v0, :cond_16
iget-wide v2, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
const-wide/16 v4, 0x0
cmp-long v1, v2, v4
if-lez v1, :cond_16
iget-wide v2, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->progressBytes:J
iget-wide v4, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->totalBytes:J
cmp-long v1, v2, v4
if-nez v1, :cond_16
:goto_15
return v0
:cond_16
const/4 v0, 0x0
goto :goto_15
.end method
.method public isOver()Z
.registers 3
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
if-eqz v0, :cond_b
iget v0, p0, Lcom/kwai/video/hodor/BaseTaskInfo;->taskState:I
const/4 v1, 0x4
if-eq v0, v1, :cond_b
const/4 v0, 0x1
:goto_a
return v0
:cond_b
const/4 v0, 0x0
goto :goto_a
.end method