502 lines
13 KiB
Smali
502 lines
13 KiB
Smali
.class public abstract Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
.super Ljava/lang/Object;
|
|
.source "AbsStatusViewDelegate.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/mvpframe/delegate/IStatusViewDelegate;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<S::",
|
|
"Lcom/moji/mvpframe/delegate/IStatusLoad;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lcom/moji/mvpframe/delegate/IStatusViewDelegate;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/content/Context;
|
|
|
|
.field private b:J
|
|
|
|
.field private c:J
|
|
|
|
.field private d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TS;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private e:Lcom/moji/mvpframe/delegate/ILoadingCallback;
|
|
|
|
.field private f:Landroid/os/Handler;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 2
|
|
|
|
.line 44
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
.line 30
|
|
iput-wide v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b:J
|
|
|
|
.line 34
|
|
iput-wide v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->c:J
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 42
|
|
iput-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->e:Lcom/moji/mvpframe/delegate/ILoadingCallback;
|
|
|
|
.line 60
|
|
new-instance v0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate$1;-><init>(Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->f:Landroid/os/Handler;
|
|
|
|
.line 48
|
|
iput-object p1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a:Landroid/content/Context;
|
|
|
|
.line 50
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b()Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 2
|
|
|
|
.line 73
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a:Landroid/content/Context;
|
|
|
|
check-cast v0, Landroid/support/v4/app/FragmentActivity;
|
|
|
|
.line 74
|
|
iget-object v1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v4/app/FragmentActivity;->isFinishing()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 75
|
|
iget-object v1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->a()V
|
|
|
|
.line 77
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->e:Lcom/moji/mvpframe/delegate/ILoadingCallback;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Landroid/support/v4/app/FragmentActivity;->isFinishing()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 78
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->e:Lcom/moji/mvpframe/delegate/ILoadingCallback;
|
|
|
|
invoke-interface {v0}, Lcom/moji/mvpframe/delegate/ILoadingCallback;->a()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;)V
|
|
.locals 0
|
|
|
|
.line 22
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcom/moji/mvpframe/delegate/IStatusLoad;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TS;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 57
|
|
iput-object p1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected abstract b()Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TS;"
|
|
}
|
|
.end annotation
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 1
|
|
|
|
.line 180
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0}, Lcom/moji/mvpframe/delegate/IStatusLoad;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 181
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->hideLoading()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public d()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public dealRequestError(Lcom/moji/requestcore/MJException;)V
|
|
.locals 1
|
|
|
|
.line 173
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 174
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->a(Lcom/moji/requestcore/MJException;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public dealResponseResult(Lcom/moji/requestcore/entity/IResult;Z)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getMJContext()Landroid/content/Context;
|
|
.locals 1
|
|
|
|
.line 192
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a:Landroid/content/Context;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public hideLoading()V
|
|
.locals 6
|
|
|
|
.line 84
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 85
|
|
iget-wide v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-lez v4, :cond_1
|
|
|
|
iget-wide v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->c:J
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-lez v4, :cond_1
|
|
|
|
.line 86
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
.line 87
|
|
iget-wide v2, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->c:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
.line 88
|
|
iget-wide v2, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b:J
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
.line 89
|
|
iget-object v2, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->f:Landroid/os/Handler;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
iget-wide v4, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b:J
|
|
|
|
sub-long/2addr v4, v0
|
|
|
|
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
|
|
|
|
const-string v0, "AbsStatusViewDelegate"
|
|
|
|
.line 90
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Loading time is short,Just delay it! --> "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 92
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 95
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 98
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->a()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V
|
|
.locals 0
|
|
|
|
.line 104
|
|
iput-object p1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->e:Lcom/moji/mvpframe/delegate/ILoadingCallback;
|
|
|
|
.line 105
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->hideLoading()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showEmptyView(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 154
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 155
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->a(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showEmptyView(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 140
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 141
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->b(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showErrorView(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 161
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 162
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->b(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showErrorView(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 147
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 148
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->c(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading()V
|
|
.locals 2
|
|
|
|
.line 135
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->getMJContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Lcom/moji/base/R$string;->loading:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(IJ)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 125
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->getMJContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(J)V
|
|
.locals 2
|
|
|
|
.line 130
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->getMJContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Lcom/moji/base/R$string;->loading:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0, p1, p2}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 111
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 112
|
|
iget-object v0, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d:Lcom/moji/mvpframe/delegate/IStatusLoad;
|
|
|
|
invoke-interface {v0, p1}, Lcom/moji/mvpframe/delegate/IStatusLoad;->a(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(Ljava/lang/String;J)V
|
|
.locals 0
|
|
|
|
.line 118
|
|
invoke-virtual {p0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;)V
|
|
|
|
.line 119
|
|
iput-wide p2, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->b:J
|
|
|
|
.line 120
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide p1
|
|
|
|
iput-wide p1, p0, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->c:J
|
|
|
|
return-void
|
|
.end method
|