e.smali
.class public Lcom/keniu/security/update/a/e;
.super Lcom/keniu/security/update/a/a;
.source "HttpUpload.java"
# instance fields
.field protected h:Ljava/lang/StringBuilder;
# direct methods
.method public constructor <init>()V
.registers 2
.prologue
.line 15
invoke-direct {p0}, Lcom/keniu/security/update/a/a;-><init>()V
.line 18
const/4 v0, 0x0
iput-object v0, p0, Lcom/keniu/security/update/a/e;->h:Ljava/lang/StringBuilder;
return-void
.end method
# virtual methods
.method protected a(Ljava/lang/String;Ljava/lang/Object;)I
.registers 11
.prologue
const/4 v1, 0x0
.line 59
if-eqz p2, :cond_7
instance-of v0, p2, Ljava/lang/String;
if-nez v0, :cond_a
.line 60
:cond_7
const/16 v0, 0x3e9
.line 122
:cond_9
:goto_9
return v0
.line 66
:cond_a
:try_start_a
new-instance v0, Ljava/net/URL;
invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
.line 67
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v0
check-cast v0, Ljava/net/HttpURLConnection;
:try_end_15
.catch Ljava/net/UnknownHostException; {:try_start_a .. :try_end_15} :catch_12f
.catch Ljava/net/SocketTimeoutException; {:try_start_a .. :try_end_15} :catch_be
.catch Ljava/io/IOException; {:try_start_a .. :try_end_15} :catch_d4
.catch Ljava/lang/Exception; {:try_start_a .. :try_end_15} :catch_ea
.catchall {:try_start_a .. :try_end_15} :catchall_100
.line 69
const v2, 0xd6d8
:try_start_18
invoke-virtual {v0, v2}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
.line 70
const v2, 0xd6d8
invoke-virtual {v0, v2}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V
.line 71
const/4 v2, 0x0
invoke-virtual {v0, v2}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V
.line 72
const-string v2, "POST"
invoke-virtual {v0, v2}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
.line 73
const/4 v2, 0x1
invoke-virtual {v0, v2}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V
.line 74
const-string v2, "Charset"
const-string v3, "UTF-8"
invoke-virtual {v0, v2, v3}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 75
const-string v2, "Content-Type"
const-string v3, "application/x-www-form-urlencoded"
invoke-virtual {v0, v2, v3}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 77
check-cast p2, Ljava/lang/String;
.line 79
invoke-static {}, Lcom/keniu/security/update/push/b;->a()Lcom/keniu/security/update/push/b;
move-result-object v2
invoke-virtual {v2, p2}, Lcom/keniu/security/update/push/b;->a(Ljava/lang/String;)V
.line 81
invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B
move-result-object v2
.line 83
new-instance v3, Ljava/io/DataOutputStream;
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;
move-result-object v4
invoke-direct {v3, v4}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
.line 85
const/4 v4, 0x0
array-length v5, v2
invoke-virtual {v3, v2, v4, v5}, Ljava/io/DataOutputStream;->write([BII)V
.line 86
invoke-virtual {v3}, Ljava/io/DataOutputStream;->flush()V
.line 88
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v2
.line 89
const/16 v3, 0xc8
if-ne v2, v3, :cond_94
.line 91
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v1
.line 94
new-instance v3, Ljava/io/ByteArrayOutputStream;
invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 95
const/16 v4, 0x400
new-array v4, v4, [B
.line 97
:goto_6f
invoke-virtual {v1, v4}, Ljava/io/InputStream;->read([B)I
move-result v5
.line 98
const/4 v6, -0x1
if-ne v5, v6, :cond_a1
.line 103
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toString()Ljava/lang/String;
move-result-object v3
.line 104
invoke-static {}, Lcom/keniu/security/update/push/b;->a()Lcom/keniu/security/update/push/b;
move-result-object v4
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "the result is:"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-virtual {v4, v3}, Lcom/keniu/security/update/push/b;->a(Ljava/lang/String;)V
:try_end_94
.catch Ljava/net/UnknownHostException; {:try_start_18 .. :try_end_94} :catch_a6
.catch Ljava/net/SocketTimeoutException; {:try_start_18 .. :try_end_94} :catch_12a
.catch Ljava/io/IOException; {:try_start_18 .. :try_end_94} :catch_125
.catch Ljava/lang/Exception; {:try_start_18 .. :try_end_94} :catch_120
.catchall {:try_start_18 .. :try_end_94} :catchall_119
.line 125
:cond_94
if-eqz v1, :cond_99
.line 127
:try_start_96
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_99
.catch Ljava/io/IOException; {:try_start_96 .. :try_end_99} :catch_10d
.line 132
:cond_99
:goto_99
if-eqz v0, :cond_9e
.line 133
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_9e
move v0, v2
.line 107
goto/16 :goto_9
.line 101
:cond_a1
const/4 v6, 0x0
:try_start_a2
invoke-virtual {v3, v4, v6, v5}, Ljava/io/ByteArrayOutputStream;->write([BII)V
:try_end_a5
.catch Ljava/net/UnknownHostException; {:try_start_a2 .. :try_end_a5} :catch_a6
.catch Ljava/net/SocketTimeoutException; {:try_start_a2 .. :try_end_a5} :catch_12a
.catch Ljava/io/IOException; {:try_start_a2 .. :try_end_a5} :catch_125
.catch Ljava/lang/Exception; {:try_start_a2 .. :try_end_a5} :catch_120
.catchall {:try_start_a2 .. :try_end_a5} :catchall_119
goto :goto_6f
.line 109
:catch_a6
move-exception v2
move-object v7, v2
move-object v2, v0
move-object v0, v7
.line 111
:goto_aa
:try_start_aa
invoke-virtual {v0}, Ljava/net/UnknownHostException;->getMessage()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/keniu/security/update/a/e;->c:Ljava/lang/String;
:try_end_b0
.catchall {:try_start_aa .. :try_end_b0} :catchall_11e
.line 112
const/16 v0, 0x3f3
.line 125
if-eqz v1, :cond_b7
.line 127
:try_start_b4
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_b7
.catch Ljava/io/IOException; {:try_start_b4 .. :try_end_b7} :catch_10f
.line 132
:cond_b7
:goto_b7
if-eqz v2, :cond_9
.line 133
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
goto/16 :goto_9
.line 113
:catch_be
move-exception v0
move-object v2, v1
.line 114
:goto_c0
:try_start_c0
invoke-virtual {v0}, Ljava/net/SocketTimeoutException;->getMessage()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/keniu/security/update/a/e;->c:Ljava/lang/String;
:try_end_c6
.catchall {:try_start_c0 .. :try_end_c6} :catchall_11e
.line 115
const/16 v0, 0x3fb
.line 125
if-eqz v1, :cond_cd
.line 127
:try_start_ca
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_cd
.catch Ljava/io/IOException; {:try_start_ca .. :try_end_cd} :catch_111
.line 132
:cond_cd
:goto_cd
if-eqz v2, :cond_9
.line 133
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
goto/16 :goto_9
.line 116
:catch_d4
move-exception v0
move-object v2, v1
.line 117
:goto_d6
:try_start_d6
invoke-virtual {v0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/keniu/security/update/a/e;->c:Ljava/lang/String;
:try_end_dc
.catchall {:try_start_d6 .. :try_end_dc} :catchall_11e
.line 118
const/16 v0, 0x3fc
.line 125
if-eqz v1, :cond_e3
.line 127
:try_start_e0
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_e3
.catch Ljava/io/IOException; {:try_start_e0 .. :try_end_e3} :catch_113
.line 132
:cond_e3
:goto_e3
if-eqz v2, :cond_9
.line 133
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
goto/16 :goto_9
.line 120
:catch_ea
move-exception v0
move-object v2, v1
.line 121
:goto_ec
:try_start_ec
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/keniu/security/update/a/e;->c:Ljava/lang/String;
:try_end_f2
.catchall {:try_start_ec .. :try_end_f2} :catchall_11e
.line 122
const/16 v0, 0x3f2
.line 125
if-eqz v1, :cond_f9
.line 127
:try_start_f6
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_f9
.catch Ljava/io/IOException; {:try_start_f6 .. :try_end_f9} :catch_115
.line 132
:cond_f9
:goto_f9
if-eqz v2, :cond_9
.line 133
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
goto/16 :goto_9
.line 125
:catchall_100
move-exception v0
move-object v2, v1
:goto_102
if-eqz v1, :cond_107
.line 127
:try_start_104
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:try_end_107
.catch Ljava/io/IOException; {:try_start_104 .. :try_end_107} :catch_117
.line 132
:cond_107
:goto_107
if-eqz v2, :cond_10c
.line 133
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
.line 134
:cond_10c
throw v0
.line 130
:catch_10d
move-exception v1
goto :goto_99
:catch_10f
move-exception v1
goto :goto_b7
:catch_111
move-exception v1
goto :goto_cd
:catch_113
move-exception v1
goto :goto_e3
:catch_115
move-exception v1
goto :goto_f9
:catch_117
move-exception v1
goto :goto_107
.line 125
:catchall_119
move-exception v2
move-object v7, v2
move-object v2, v0
move-object v0, v7
goto :goto_102
:catchall_11e
move-exception v0
goto :goto_102
.line 120
:catch_120
move-exception v2
move-object v7, v2
move-object v2, v0
move-object v0, v7
goto :goto_ec
.line 116
:catch_125
move-exception v2
move-object v7, v2
move-object v2, v0
move-object v0, v7
goto :goto_d6
.line 113
:catch_12a
move-exception v2
move-object v7, v2
move-object v2, v0
move-object v0, v7
goto :goto_c0
.line 109
:catch_12f
move-exception v0
move-object v2, v1
goto/16 :goto_aa
.end method
.method public a(Ljava/lang/String;Ljava/lang/String;Lcom/keniu/security/update/a/a$a;Ljava/lang/Object;)Z
.registers 6
.prologue
.line 143
const/4 v0, 0x1
return v0
.end method
.method public b(Ljava/lang/String;Ljava/lang/String;Lcom/keniu/security/update/a/a$a;Ljava/lang/Object;)I
.registers 12
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 30
.line 32
iput-object p1, p0, Lcom/keniu/security/update/a/e;->a:Ljava/lang/String;
.line 33
if-nez p1, :cond_7
.line 55
:goto_6
return v1
.line 36
:cond_7
iput-object p3, p0, Lcom/keniu/security/update/a/e;->f:Lcom/keniu/security/update/a/a$a;
.line 38
:try_start_9
iget-object v2, p0, Lcom/keniu/security/update/a/e;->f:Lcom/keniu/security/update/a/a$a;
const/4 v3, 0x1
const/16 v4, 0x3e8
const/4 v5, 0x0
const/4 v6, 0x0
invoke-interface {v2, v3, v4, v5, v6}, Lcom/keniu/security/update/a/a$a;->a(IIILjava/lang/Object;)V
.line 40
invoke-static {}, Lcom/keniu/security/update/a/f;->a()Lcom/keniu/security/update/a/f;
move-result-object v2
invoke-virtual {v2, p1}, Lcom/keniu/security/update/a/f;->a(Ljava/lang/String;)V
.line 41
invoke-virtual {p0, p1, p4}, Lcom/keniu/security/update/a/e;->a(Ljava/lang/String;Ljava/lang/Object;)I
:try_end_1d
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_1d} :catch_61
.catchall {:try_start_9 .. :try_end_1d} :catchall_6f
move-result v2
.line 42
const/16 v3, 0xc8
if-ne v2, v3, :cond_55
.line 44
:try_start_22
iget-object v1, p0, Lcom/keniu/security/update/a/e;->f:Lcom/keniu/security/update/a/a$a;
const/4 v3, 0x3
const/16 v4, 0x3e8
iget v5, p0, Lcom/keniu/security/update/a/e;->e:I
const/4 v6, 0x0
invoke-interface {v1, v3, v4, v5, v6}, Lcom/keniu/security/update/a/a$a;->a(IIILjava/lang/Object;)V
:try_end_2d
.catch Ljava/lang/Exception; {:try_start_22 .. :try_end_2d} :catch_71
.catchall {:try_start_22 .. :try_end_2d} :catchall_6f
:goto_2d
move v1, v0
move v0, v2
.line 54
:goto_2f
invoke-static {}, Lcom/keniu/security/update/push/b;->a()Lcom/keniu/security/update/push/b;
move-result-object v2
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "url="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, " ret="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v2, v1}, Lcom/keniu/security/update/push/b;->a(Ljava/lang/String;)V
move v1, v0
.line 55
goto :goto_6
.line 46
:cond_55
:try_start_55
iget-object v0, p0, Lcom/keniu/security/update/a/e;->f:Lcom/keniu/security/update/a/a$a;
const/4 v3, 0x3
iget v4, p0, Lcom/keniu/security/update/a/e;->e:I
iget-object v5, p0, Lcom/keniu/security/update/a/e;->c:Ljava/lang/String;
invoke-interface {v0, v3, v2, v4, v5}, Lcom/keniu/security/update/a/a$a;->a(IIILjava/lang/Object;)V
:try_end_5f
.catch Ljava/lang/Exception; {:try_start_55 .. :try_end_5f} :catch_75
.catchall {:try_start_55 .. :try_end_5f} :catchall_6f
move v0, v1
goto :goto_2d
.line 49
:catch_61
move-exception v0
move v0, v1
.line 51
:goto_63
:try_start_63
iget-object v2, p0, Lcom/keniu/security/update/a/e;->f:Lcom/keniu/security/update/a/a$a;
const/4 v3, 0x3
const/16 v4, 0x3f9
iget v5, p0, Lcom/keniu/security/update/a/e;->e:I
const/4 v6, 0x0
invoke-interface {v2, v3, v4, v5, v6}, Lcom/keniu/security/update/a/a$a;->a(IIILjava/lang/Object;)V
:try_end_6e
.catchall {:try_start_63 .. :try_end_6e} :catchall_6f
goto :goto_2f
.line 52
:catchall_6f
move-exception v0
throw v0
.line 49
:catch_71
move-exception v1
move v1, v0
move v0, v2
goto :goto_63
:catch_75
move-exception v0
move v0, v2
goto :goto_63
.end method