b.smali
.class public final Lcom/hianalytics/android/v1/b;
.super Ljava/lang/Object;
# direct methods
.method public static a(Ljava/lang/String;[B)Z
.registers 9
const/4 v3, 0x0
const/4 v1, 0x1
const/4 v2, 0x0
:try_start_3
new-instance v0, Ljava/net/URL;
invoke-direct {v0, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v0
check-cast v0, Ljava/net/HttpURLConnection;
:try_end_e
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_e} :catch_5a
.catchall {:try_start_3 .. :try_end_e} :catchall_84
:try_start_e
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
const-string v4, "POST"
invoke-virtual {v0, v4}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
const/16 v4, 0x1388
invoke-virtual {v0, v4}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
const/4 v4, 0x1
invoke-virtual {v0, v4}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V
const-string v4, "Content-Type"
const-string v5, "application/x-www-form-urlencoded; charset=UTF-8"
invoke-virtual {v0, v4, v5}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
const-string v4, "Content-Length"
array-length v5, p1
invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v5
invoke-virtual {v0, v4, v5}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;
move-result-object v3
invoke-virtual {v3, p1}, Ljava/io/OutputStream;->write([B)V
invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v4
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
:try_end_41
.catch Ljava/io/IOException; {:try_start_e .. :try_end_41} :catch_a0
.catchall {:try_start_e .. :try_end_41} :catchall_99
const/16 v5, 0xc8
if-ne v4, v5, :cond_53
:goto_45
if-eqz v3, :cond_4a
:try_start_47
invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
:try_end_4a
.catch Ljava/io/IOException; {:try_start_47 .. :try_end_4a} :catch_55
:cond_4a
:goto_4a
if-eqz v0, :cond_52
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
:cond_52
:goto_52
return v1
:cond_53
move v1, v2
goto :goto_45
:catch_55
move-exception v2
invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V
goto :goto_4a
:catch_5a
move-exception v0
move-object v1, v3
:goto_5c
:try_start_5c
new-instance v4, Ljava/lang/StringBuilder;
const-string v5, "IOException:"
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
:try_end_70
.catchall {:try_start_5c .. :try_end_70} :catchall_9e
if-eqz v3, :cond_75
:try_start_72
invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
:try_end_75
.catch Ljava/io/IOException; {:try_start_72 .. :try_end_75} :catch_7f
:cond_75
:goto_75
if-eqz v1, :cond_7d
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
:cond_7d
move v1, v2
goto :goto_52
:catch_7f
move-exception v0
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
goto :goto_75
:catchall_84
move-exception v0
move-object v1, v3
:goto_86
if-eqz v3, :cond_8b
:try_start_88
invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
:try_end_8b
.catch Ljava/io/IOException; {:try_start_88 .. :try_end_8b} :catch_94
:cond_8b
:goto_8b
if-eqz v1, :cond_93
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Lcom/hianalytics/android/b/a/a;->h()V
:cond_93
throw v0
:catch_94
move-exception v2
invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V
goto :goto_8b
:catchall_99
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
goto :goto_86
:catchall_9e
move-exception v0
goto :goto_86
:catch_a0
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
goto :goto_5c
.end method