You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
301 lines
9.6 KiB
301 lines
9.6 KiB
.class Lcom/viatech/util/AppServerTCPClient$1; |
|
.super Ljava/lang/Object; |
|
.source "AppServerTCPClient.java" |
|
|
|
# interfaces |
|
.implements Ljava/lang/Runnable; |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingMethod; |
|
value = Lcom/viatech/util/AppServerTCPClient;->connect(Ljava/lang/String;Lcom/viatech/util/AppServerTCPClient$TokenType;)V |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x0 |
|
name = null |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field final synthetic this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
.field final synthetic val$tokenType:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
.field final synthetic val$usertoken:Ljava/lang/String; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Lcom/viatech/util/AppServerTCPClient;Lcom/viatech/util/AppServerTCPClient$TokenType;Ljava/lang/String;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 80 |
|
iput-object p1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
iput-object p2, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$tokenType:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
iput-object p3, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$usertoken:Ljava/lang/String; |
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public run()V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v4, 0x0 |
|
|
|
.line 83 |
|
invoke-static {}, Ljavax/net/SocketFactory;->getDefault()Ljavax/net/SocketFactory; |
|
|
|
move-result-object v0 |
|
|
|
.line 85 |
|
:try_start_0 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
const-string v2, "api.vpai360.com" |
|
|
|
const/16 v3, 0x1f48 |
|
|
|
invoke-virtual {v0, v2, v3}, Ljavax/net/SocketFactory;->createSocket(Ljava/lang/String;I)Ljava/net/Socket; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v1, v0}, Lcom/viatech/util/AppServerTCPClient;->access$002(Lcom/viatech/util/AppServerTCPClient;Ljava/net/Socket;)Ljava/net/Socket; |
|
|
|
.line 87 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$tokenType:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
sget-object v1, Lcom/viatech/util/AppServerTCPClient$TokenType;->FB_TOKEN:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
if-ne v0, v1, :cond_0 |
|
|
|
.line 88 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v1, "FB:" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$usertoken:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 97 |
|
:goto_0 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1, v0}, Lcom/viatech/util/AppServerTCPClient;->access$102(Lcom/viatech/util/AppServerTCPClient;Ljava/lang/String;)Ljava/lang/String; |
|
|
|
.line 99 |
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J |
|
|
|
move-result-wide v0 |
|
|
|
const-wide/16 v2, 0x3e8 |
|
|
|
div-long/2addr v0, v2 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; |
|
|
|
move-result-object v0 |
|
|
|
.line 100 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v1, v0}, Lcom/viatech/util/AppServerTCPClient;->access$202(Lcom/viatech/util/AppServerTCPClient;Ljava/lang/String;)Ljava/lang/String; |
|
|
|
.line 101 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v0}, Lcom/viatech/util/AppServerTCPClient;->access$200(Lcom/viatech/util/AppServerTCPClient;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v0}, Lcom/viatech/util/AppServerEncrypter;->setTimeStamp(Ljava/lang/String;)Z |
|
|
|
.line 103 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1}, Lcom/viatech/util/AppServerTCPClient;->access$100(Lcom/viatech/util/AppServerTCPClient;)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-static {v0, v1}, Lcom/viatech/util/AppServerTCPClient;->access$300(Lcom/viatech/util/AppServerTCPClient;Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 106 |
|
const-string v1, "AppServerTCPClient" |
|
|
|
const-string v2, "send login msg" |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 107 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-static {v1, v0, v2}, Lcom/viatech/util/AppServerTCPClient;->access$400(Lcom/viatech/util/AppServerTCPClient;Ljava/lang/String;Z)V |
|
|
|
.line 109 |
|
new-instance v0, Lcom/viatech/util/AppServerTCPClient$HappyDataInputStream; |
|
|
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1}, Lcom/viatech/util/AppServerTCPClient;->access$000(Lcom/viatech/util/AppServerTCPClient;)Ljava/net/Socket; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {v0, v1}, Lcom/viatech/util/AppServerTCPClient$HappyDataInputStream;-><init>(Ljava/io/InputStream;)V |
|
|
|
.line 111 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1, v0}, Lcom/viatech/util/AppServerTCPClient;->access$500(Lcom/viatech/util/AppServerTCPClient;Lcom/viatech/util/AppServerTCPClient$HappyDataInputStream;)V |
|
|
|
.line 121 |
|
:goto_1 |
|
return-void |
|
|
|
.line 89 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$tokenType:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
sget-object v1, Lcom/viatech/util/AppServerTCPClient$TokenType;->WX_TOKEN:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
if-ne v0, v1, :cond_1 |
|
|
|
.line 90 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v1, "WX:" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$usertoken:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 91 |
|
:cond_1 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$tokenType:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
sget-object v1, Lcom/viatech/util/AppServerTCPClient$TokenType;->LI_TOKEN:Lcom/viatech/util/AppServerTCPClient$TokenType; |
|
|
|
if-ne v0, v1, :cond_2 |
|
|
|
.line 92 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v1, "LI:" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$usertoken:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 94 |
|
:cond_2 |
|
iget-object v0, p0, Lcom/viatech/util/AppServerTCPClient$1;->val$usertoken:Ljava/lang/String; |
|
:try_end_0 |
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 113 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 114 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1}, Lcom/viatech/util/AppServerTCPClient;->access$600(Lcom/viatech/util/AppServerTCPClient;)Lcom/viatech/util/AppServerTCPClient$Listener; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, "EOF" |
|
|
|
invoke-interface {v1, v4, v2}, Lcom/viatech/util/AppServerTCPClient$Listener;->onDisconnect(ILjava/lang/String;)V |
|
|
|
.line 115 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
iput-boolean v4, v1, Lcom/viatech/util/AppServerTCPClient;->mConnected:Z |
|
|
|
.line 116 |
|
invoke-virtual {v0}, Ljava/io/EOFException;->printStackTrace()V |
|
|
|
goto :goto_1 |
|
|
|
.line 117 |
|
:catch_1 |
|
move-exception v0 |
|
|
|
.line 118 |
|
iget-object v1, p0, Lcom/viatech/util/AppServerTCPClient$1;->this$0:Lcom/viatech/util/AppServerTCPClient; |
|
|
|
invoke-static {v1}, Lcom/viatech/util/AppServerTCPClient;->access$600(Lcom/viatech/util/AppServerTCPClient;)Lcom/viatech/util/AppServerTCPClient$Listener; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v1, v0}, Lcom/viatech/util/AppServerTCPClient$Listener;->onError(Ljava/lang/Exception;)V |
|
|
|
.line 119 |
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V |
|
|
|
goto :goto_1 |
|
.end method
|
|
|