cw.smali
.class public abstract Lcom/baidu/techain/af/cw;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/baidu/techain/af/cw$a;
}
.end annotation
# direct methods
.method private static a(Lcom/baidu/techain/af/cv;Ljava/lang/String;Ljava/lang/String;)I
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/baidu/techain/af/cv;",
"Ljava/lang/String;",
"Ljava/lang/String;",
")I"
}
.end annotation
.prologue
.line 0
.line 2000
iget v0, p0, Lcom/baidu/techain/af/cv;->a:I
.line 0
const/4 v1, 0x1
if-ne v0, v1, :cond_18
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
invoke-static {p2}, Lcom/baidu/techain/af/cw;->a(Ljava/lang/String;)I
move-result v1
.line 3000
add-int/lit16 v2, v1, 0xf3
div-int/lit16 v2, v2, 0x5a8
mul-int/lit16 v2, v2, 0x84
add-int/lit16 v2, v2, 0x438
add-int/2addr v0, v2
add-int/2addr v0, v1
.line 0
:goto_17
return v0
.line 4000
:cond_18
iget v0, p0, Lcom/baidu/techain/af/cv;->a:I
.line 0
const/4 v1, 0x2
if-ne v0, v1, :cond_6c
.line 5000
const/4 v1, 0x0
const/4 v0, 0x0
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_23
:goto_23
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_56
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/baidu/techain/af/r;
invoke-interface {v0}, Lcom/baidu/techain/af/r;->a()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_42
invoke-interface {v0}, Lcom/baidu/techain/af/r;->a()Ljava/lang/String;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/String;->length()I
move-result v3
add-int/2addr v1, v3
:cond_42
invoke-interface {v0}, Lcom/baidu/techain/af/r;->b()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_23
invoke-interface {v0}, Lcom/baidu/techain/af/r;->b()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v0
add-int/2addr v1, v0
goto :goto_23
:cond_56
mul-int/lit8 v0, v1, 0x2
.line 0
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v1
invoke-static {p2}, Lcom/baidu/techain/af/cw;->a(Ljava/lang/String;)I
move-result v2
.line 6000
add-int/lit16 v3, v0, 0xc8
div-int/lit16 v3, v3, 0x5a8
mul-int/lit16 v3, v3, 0x84
add-int/lit16 v3, v3, 0x3f3
add-int/2addr v0, v3
add-int/2addr v0, v1
add-int/2addr v0, v2
.line 0
goto :goto_17
:cond_6c
const/4 v0, -0x1
goto :goto_17
.end method
.method private static a(Ljava/lang/String;)I
.registers 3
const/4 v0, 0x0
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_8
:goto_7
return v0
:cond_8
:try_start_8
const-string v1, "UTF-8"
invoke-virtual {p0, v1}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v1
array-length v0, v1
:try_end_f
.catch Ljava/io/UnsupportedEncodingException; {:try_start_8 .. :try_end_f} :catch_10
goto :goto_7
:catch_10
move-exception v1
goto :goto_7
.end method
.method public static a(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/techain/af/cv;)Ljava/lang/String;
.registers 17
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Ljava/lang/String;",
"Lcom/baidu/techain/af/cv;",
")",
"Ljava/lang/String;"
}
.end annotation
.prologue
.line 0
invoke-static {p0}, Lcom/baidu/techain/af/s;->a(Landroid/content/Context;)Z
move-result v2
if-eqz v2, :cond_96
:try_start_6
new-instance v3, Ljava/util/ArrayList;
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
invoke-static {}, Lcom/baidu/techain/af/cs;->a()Lcom/baidu/techain/af/cs;
move-result-object v2
invoke-virtual {v2, p1}, Lcom/baidu/techain/af/cs;->a(Ljava/lang/String;)Lcom/baidu/techain/af/co;
move-result-object v2
if-eqz v2, :cond_19
invoke-virtual {v2, p1}, Lcom/baidu/techain/af/co;->a(Ljava/lang/String;)Ljava/util/ArrayList;
move-result-object v3
:cond_19
invoke-virtual {v3, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_22
invoke-virtual {v3, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_22
const/4 v10, 0x0
invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v11
move-object v4, v10
:goto_28
invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_9b
invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
move-object v0, v3
check-cast v0, Ljava/lang/String;
move-object v9, v0
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
:try_end_39
.catch Ljava/net/MalformedURLException; {:try_start_6 .. :try_end_39} :catch_92
move-result-wide v12
:try_start_3a
move-object/from16 v0, p2
invoke-virtual {v0, p0, v9}, Lcom/baidu/techain/af/cv;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
:try_end_3f
.catch Ljava/io/IOException; {:try_start_3a .. :try_end_3f} :catch_98
.catch Ljava/net/MalformedURLException; {:try_start_3a .. :try_end_3f} :catch_92
move-result-object v10
:try_start_40
invoke-static {v10}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_65
if-eqz v2, :cond_63
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
sub-long/2addr v4, v12
move-object/from16 v0, p2
invoke-static {v0, v9, v10}, Lcom/baidu/techain/af/cw;->a(Lcom/baidu/techain/af/cv;Ljava/lang/String;Ljava/lang/String;)I
:try_end_52
.catch Ljava/io/IOException; {:try_start_40 .. :try_end_52} :catch_7a
.catch Ljava/net/MalformedURLException; {:try_start_40 .. :try_end_52} :catch_92
move-result v3
int-to-long v6, v3
.line 1000
:try_start_54
new-instance v3, Ljava/net/URL;
invoke-direct {v3, v9}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/net/URL;->getHost()Ljava/lang/String;
move-result-object v3
invoke-virtual/range {v2 .. v7}, Lcom/baidu/techain/af/co;->a(Ljava/lang/String;JJ)V
:try_end_60
.catch Ljava/net/MalformedURLException; {:try_start_54 .. :try_end_60} :catch_62
.catch Ljava/io/IOException; {:try_start_54 .. :try_end_60} :catch_7a
move-object v2, v10
.line 0
:goto_61
return-object v2
:catch_62
move-exception v2
:cond_63
move-object v2, v10
goto :goto_61
:cond_65
if-eqz v2, :cond_78
:try_start_67
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
sub-long/2addr v4, v12
move-object/from16 v0, p2
invoke-static {v0, v9, v10}, Lcom/baidu/techain/af/cw;->a(Lcom/baidu/techain/af/cv;Ljava/lang/String;Ljava/lang/String;)I
move-result v3
int-to-long v6, v3
const/4 v8, 0x0
move-object v3, v9
invoke-virtual/range {v2 .. v8}, Lcom/baidu/techain/af/co;->a(Ljava/lang/String;JJLjava/lang/Exception;)V
:try_end_78
.catch Ljava/io/IOException; {:try_start_67 .. :try_end_78} :catch_7a
.catch Ljava/net/MalformedURLException; {:try_start_67 .. :try_end_78} :catch_92
:cond_78
move-object v4, v10
goto :goto_28
:catch_7a
move-exception v8
:goto_7b
if-eqz v2, :cond_8d
:try_start_7d
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
sub-long/2addr v4, v12
move-object/from16 v0, p2
invoke-static {v0, v9, v10}, Lcom/baidu/techain/af/cw;->a(Lcom/baidu/techain/af/cv;Ljava/lang/String;Ljava/lang/String;)I
move-result v3
int-to-long v6, v3
move-object v3, v9
invoke-virtual/range {v2 .. v8}, Lcom/baidu/techain/af/co;->a(Ljava/lang/String;JJLjava/lang/Exception;)V
:cond_8d
invoke-virtual {v8}, Ljava/io/IOException;->printStackTrace()V
:try_end_90
.catch Ljava/net/MalformedURLException; {:try_start_7d .. :try_end_90} :catch_92
move-object v4, v10
goto :goto_28
:catch_92
move-exception v2
invoke-virtual {v2}, Ljava/net/MalformedURLException;->printStackTrace()V
:cond_96
const/4 v2, 0x0
goto :goto_61
:catch_98
move-exception v8
move-object v10, v4
goto :goto_7b
:cond_9b
move-object v2, v4
goto :goto_61
.end method