AuthTokenHttpSubscriber.smali
.class public Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;
.super Lcom/sandboxol/common/base/web/BaseSubscriber;
.source "AuthTokenHttpSubscriber.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Lcom/sandboxol/common/base/web/HttpResponse<",
"TT;>;>",
"Lcom/sandboxol/common/base/web/BaseSubscriber<",
"TT;TR;>;"
}
.end annotation
# instance fields
.field protected command:Lcom/sandboxol/common/command/ReplyCommand;
.field protected listener:Lcom/sandboxol/common/base/web/OnResponseListener;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/sandboxol/common/base/web/OnResponseListener<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/sandboxol/common/base/web/OnResponseListener;)V
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/sandboxol/common/base/web/OnResponseListener<",
"TT;>;)V"
}
.end annotation
.line 1
invoke-direct {p0, p1}, Lcom/sandboxol/common/base/web/BaseSubscriber;-><init>(Lcom/sandboxol/common/base/web/OnResponseListener;)V
.line 2
iput-object p1, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
return-void
.end method
.method public constructor <init>(Lcom/sandboxol/common/base/web/OnResponseListener;Lcom/sandboxol/common/command/ReplyCommand;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/sandboxol/common/base/web/OnResponseListener<",
"TT;>;",
"Lcom/sandboxol/common/command/ReplyCommand;",
")V"
}
.end annotation
.line 3
invoke-direct {p0, p1}, Lcom/sandboxol/common/base/web/BaseSubscriber;-><init>(Lcom/sandboxol/common/base/web/OnResponseListener;)V
.line 4
iput-object p1, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
.line 5
iput-object p2, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->command:Lcom/sandboxol/common/command/ReplyCommand;
return-void
.end method
# virtual methods
.method public isCheckNetwork()Z
.registers 2
const/4 v0, 0x0
return v0
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 5
.line 1
iget-object v0, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
if-eqz v0, :cond_65
.line 2
instance-of v1, p1, Lretrofit2/HttpException;
if-eqz v1, :cond_3d
.line 3
move-object v0, p1
check-cast v0, Lretrofit2/HttpException;
invoke-virtual {v0}, Lretrofit2/HttpException;->code()I
move-result v1
const/16 v2, 0x191
if-ne v1, v2, :cond_1f
.line 4
invoke-static {}, Lcom/sandboxol/center/web/http/AuthFailHandler;->getInstance()Lcom/sandboxol/center/web/http/AuthFailHandler;
move-result-object p1
iget-object v1, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->command:Lcom/sandboxol/common/command/ReplyCommand;
iget-object v2, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
invoke-virtual {p1, v0, v1, v2}, Lcom/sandboxol/center/web/http/AuthFailHandler;->addExceptionEvent(Lretrofit2/HttpException;Lcom/sandboxol/common/command/ReplyCommand;Lcom/sandboxol/common/base/web/OnResponseListener;)V
goto :goto_65
:cond_1f
const/16 v0, 0x193
if-ne v1, v0, :cond_37
.line 5
iget-object v0, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
instance-of v2, v0, Lcom/sandboxol/common/base/web/OnResponseExceptionListener;
if-eqz v2, :cond_2f
.line 6
check-cast v0, Lcom/sandboxol/common/base/web/OnResponseExceptionListener;
invoke-virtual {v0, v1, p1}, Lcom/sandboxol/common/base/web/OnResponseExceptionListener;->onErrorWithData(ILjava/lang/Throwable;)V
goto :goto_65
.line 7
:cond_2f
sget-object p1, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;
const-string v0, "token.repeat.login"
invoke-virtual {p1, v0}, Lcom/sandboxol/messager/MessageMediator;->sendMsg0(Ljava/lang/String;)V
goto :goto_65
.line 8
:cond_37
iget-object p1, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
invoke-virtual {p1, v1}, Lcom/sandboxol/common/base/web/OnResponseListener;->onServerError(I)V
goto :goto_65
.line 9
:cond_3d
instance-of v1, p1, Ljava/net/ConnectException;
if-nez v1, :cond_5e
instance-of v1, p1, Ljava/net/UnknownHostException;
if-eqz v1, :cond_46
goto :goto_5e
.line 10
:cond_46
instance-of v1, p1, Ljava/net/SocketTimeoutException;
if-eqz v1, :cond_4f
const/4 p1, 0x5
.line 11
invoke-virtual {v0, p1}, Lcom/sandboxol/common/base/web/OnResponseListener;->onServerError(I)V
goto :goto_65
.line 12
:cond_4f
instance-of p1, p1, Ljava/lang/RuntimeException;
if-eqz p1, :cond_58
const/4 p1, -0x1
.line 13
invoke-virtual {v0, p1}, Lcom/sandboxol/common/base/web/OnResponseListener;->onServerError(I)V
goto :goto_65
:cond_58
const/16 p1, 0x2712
.line 14
invoke-virtual {v0, p1}, Lcom/sandboxol/common/base/web/OnResponseListener;->onServerError(I)V
goto :goto_65
.line 15
:cond_5e
:goto_5e
iget-object p1, p0, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;->listener:Lcom/sandboxol/common/base/web/OnResponseListener;
const/16 v0, 0x2710
invoke-virtual {p1, v0}, Lcom/sandboxol/common/base/web/OnResponseListener;->onServerError(I)V
:cond_65
:goto_65
return-void
.end method