a.smali
.class public Lcom/cleanmaster/service/scantree/cloudconfig/a;
.super Ljava/lang/Object;
.source "ScanTreeHttpHelper.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/service/scantree/cloudconfig/a$a;
}
.end annotation
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 39
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static a()Ljava/lang/String;
.registers 3
.prologue
.line 146
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v0
.line 147
const-string v1, "cm_whitelist_blackwords"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getDir(Ljava/lang/String;I)Ljava/io/File;
move-result-object v0
.line 148
new-instance v1, Ljava/io/File;
const-string/jumbo v2, "rule_json.config"
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 149
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static a(Ljava/lang/String;)Ljava/lang/String;
.registers 8
.prologue
const/4 v0, 0x0
.line 180
new-instance v2, Ljava/io/File;
invoke-direct {v2, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 181
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_12
invoke-virtual {v2}, Ljava/io/File;->isFile()Z
move-result v1
if-nez v1, :cond_13
.line 203
:cond_12
:goto_12
return-object v0
.line 185
:cond_13
const/4 v1, 0x1
invoke-virtual {v2, v1}, Ljava/io/File;->setReadable(Z)Z
.line 187
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
.line 190
:try_start_1c
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, v2}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_21
.catch Ljava/lang/Exception; {:try_start_1c .. :try_end_21} :catch_52
.catchall {:try_start_1c .. :try_end_21} :catchall_48
.line 192
const/16 v0, 0x400
:try_start_23
new-array v0, v0, [B
.line 194
:goto_25
const/4 v2, 0x0
array-length v4, v0
invoke-virtual {v1, v0, v2, v4}, Ljava/io/FileInputStream;->read([BII)I
move-result v2
const/4 v4, -0x1
if-eq v2, v4, :cond_44
.line 195
new-instance v4, Ljava/lang/String;
const/4 v5, 0x0
invoke-direct {v4, v0, v5, v2}, Ljava/lang/String;-><init>([BII)V
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_37
.catch Ljava/lang/Exception; {:try_start_23 .. :try_end_37} :catch_38
.catchall {:try_start_23 .. :try_end_37} :catchall_50
goto :goto_25
.line 198
:catch_38
move-exception v0
.line 199
:goto_39
:try_start_39
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
:try_end_3c
.catchall {:try_start_39 .. :try_end_3c} :catchall_50
.line 201
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 203
:goto_3f
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
goto :goto_12
.line 201
:cond_44
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
goto :goto_3f
:catchall_48
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
:goto_4c
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
throw v0
:catchall_50
move-exception v0
goto :goto_4c
.line 198
:catch_52
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
goto :goto_39
.end method
.method private a(Ljava/lang/String;Ljava/util/List;)Ljava/lang/String;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;)",
"Ljava/lang/String;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/json/JSONException;
}
.end annotation
.prologue
.line 331
new-instance v2, Lorg/json/JSONArray;
invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V
.line 332
const/4 v0, 0x0
move v1, v0
:goto_7
invoke-interface {p2}, Ljava/util/List;->size()I
move-result v0
if-ge v1, v0, :cond_23
.line 333
invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 334
if-eqz v0, :cond_1b
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v3
if-nez v3, :cond_1f
.line 332
:cond_1b
:goto_1b
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_7
.line 335
:cond_1f
invoke-virtual {v2, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
goto :goto_1b
.line 338
:cond_23
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
.line 339
invoke-virtual {v0, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 340
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private a(Ljava/net/URL;)Ljava/net/HttpURLConnection;
.registers 5
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 154
invoke-virtual {p1}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v0
check-cast v0, Ljava/net/HttpURLConnection;
.line 156
const-string v1, "GET"
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
.line 157
const/16 v1, 0x2710
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
.line 159
const-string v1, "Accept"
const-string v2, "application/json, text/plain, */*"
invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 160
const-string v1, "Cache-Control"
const-string v2, "max-age=0"
invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 161
invoke-direct {p0, v0}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/net/HttpURLConnection;)V
.line 163
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setDoInput(Z)V
.line 164
const/4 v1, 0x0
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V
.line 165
return-object v0
.end method
.method private static a(Ljava/io/Closeable;)V
.registers 2
.prologue
.line 170
if-eqz p0, :cond_5
.line 171
:try_start_2
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_5
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_5} :catch_6
.line 176
:cond_5
:goto_5
return-void
.line 173
:catch_6
move-exception v0
.line 174
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_5
.end method
.method private a(Ljava/net/HttpURLConnection;)V
.registers 5
.prologue
.line 344
const-string v0, "Content-Type"
const-string v1, "application/json; charset=utf-8"
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 345
const-string/jumbo v0, "uid"
const-string v1, ""
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 346
const-string/jumbo v0, "token"
const-string v1, ""
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 347
const-string v0, "app_id"
const-string v1, "1"
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 348
const-string/jumbo v0, "request_id"
const-string v1, ""
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 349
const-string v0, "channel"
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getChannelIdString()Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 350
const-string/jumbo v0, "version"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, ""
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getVersionCode()I
move-result v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 351
const-string v0, "device_id"
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->getAndroidId(Landroid/content/Context;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 352
const-string/jumbo v0, "platform"
const-string v1, "cm"
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 353
return-void
.end method
.method public static a(Ljavax/net/ssl/HttpsURLConnection;)V
.registers 7
.prologue
.line 384
:try_start_0
const-string v0, "TLS"
invoke-static {v0}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;
move-result-object v0
.line 385
const/4 v1, 0x0
const/4 v2, 0x1
new-array v2, v2, [Ljavax/net/ssl/TrustManager;
const/4 v3, 0x0
new-instance v4, Lcom/cleanmaster/service/scantree/cloudconfig/a$a;
const/4 v5, 0x0
invoke-direct {v4, v5}, Lcom/cleanmaster/service/scantree/cloudconfig/a$a;-><init>(Lcom/cleanmaster/service/scantree/cloudconfig/b;)V
aput-object v4, v2, v3
new-instance v3, Ljava/security/SecureRandom;
invoke-direct {v3}, Ljava/security/SecureRandom;-><init>()V
invoke-virtual {v0, v1, v2, v3}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
.line 386
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
move-result-object v0
invoke-virtual {p0, v0}, Ljavax/net/ssl/HttpsURLConnection;->setSSLSocketFactory(Ljavax/net/ssl/SSLSocketFactory;)V
.line 387
new-instance v0, Lcom/cleanmaster/service/scantree/cloudconfig/b;
invoke-direct {v0}, Lcom/cleanmaster/service/scantree/cloudconfig/b;-><init>()V
invoke-virtual {p0, v0}, Ljavax/net/ssl/HttpsURLConnection;->setHostnameVerifier(Ljavax/net/ssl/HostnameVerifier;)V
:try_end_2a
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_2a} :catch_2b
.line 404
:goto_2a
return-void
.line 400
:catch_2b
move-exception v0
.line 401
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_2a
.end method
.method private a(Ljava/lang/String;Ljava/lang/String;)Z
.registers 7
.prologue
const/4 v0, 0x0
.line 124
const-string v1, "md5="
.line 125
invoke-virtual {p1, v1}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
move-result v2
.line 126
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v1
add-int/2addr v1, v2
add-int/lit8 v1, v1, 0x20
.line 129
if-ltz v2, :cond_16
:try_start_10
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
if-le v1, v2, :cond_17
.line 141
:cond_16
:goto_16
return v0
.line 132
:cond_17
new-instance v2, Ljava/io/File;
invoke-direct {v2, p2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 133
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v3
if-eqz v3, :cond_16
.line 134
add-int/lit8 v3, v1, -0x20
invoke-virtual {p1, v3, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v1
.line 135
invoke-static {v2}, Lcom/cmcm/adsdk/dynamic/MD5Util;->getFileMD5String(Ljava/io/File;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
:try_end_2f
.catch Ljava/lang/Exception; {:try_start_10 .. :try_end_2f} :catch_34
move-result v1
if-eqz v1, :cond_16
.line 136
const/4 v0, 0x1
goto :goto_16
.line 138
:catch_34
move-exception v1
.line 139
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_16
.end method
.method private a(Ljava/util/List;)Z
.registers 13
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;)Z"
}
.end annotation
.prologue
const/4 v5, 0x1
const/4 v3, 0x0
.line 239
const/4 v4, 0x0
.line 243
:try_start_3
const-string v1, "/cache/upload"
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 244
new-instance v2, Ljava/net/URL;
invoke-direct {v2, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-direct {p0, v2}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/net/URL;)Ljava/net/HttpURLConnection;
move-result-object v2
.line 245
instance-of v1, v2, Ljavax/net/ssl/HttpsURLConnection;
if-eqz v1, :cond_1d
.line 246
move-object v0, v2
check-cast v0, Ljavax/net/ssl/HttpsURLConnection;
move-object v1, v0
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljavax/net/ssl/HttpsURLConnection;)V
.line 248
:cond_1d
const/4 v1, 0x1
invoke-virtual {v2, v1}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V
.line 249
const-string v1, "POST"
invoke-virtual {v2, v1}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
.line 250
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->connect()V
.line 251
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;
:try_end_2c
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_2c} :catch_bc
.catchall {:try_start_3 .. :try_end_2c} :catchall_b4
move-result-object v4
.line 252
:try_start_2d
const-string/jumbo v1, "path"
invoke-direct {p0, v1, p1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/lang/String;Ljava/util/List;)Ljava/lang/String;
move-result-object v6
.line 254
const-string v1, "TreeScanTask"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v8, "send RequestBody="
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v1, v7}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 256
const-string/jumbo v1, "utf-8"
invoke-virtual {v6, v1}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v1
invoke-virtual {v4, v1}, Ljava/io/OutputStream;->write([B)V
.line 257
invoke-virtual {v4}, Ljava/io/OutputStream;->flush()V
.line 258
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v1
.line 259
const/16 v7, 0xc8
if-lt v1, v7, :cond_c4
const/16 v7, 0xcf
if-gt v1, v7, :cond_c4
.line 261
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v1
.line 262
const/16 v2, 0x400
new-array v2, v2, [B
.line 264
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
.line 265
:goto_73
const/4 v8, 0x0
array-length v9, v2
invoke-virtual {v1, v2, v8, v9}, Ljava/io/InputStream;->read([BII)I
move-result v8
const/4 v9, -0x1
if-eq v8, v9, :cond_9a
.line 266
new-instance v9, Ljava/lang/String;
const/4 v10, 0x0
invoke-direct {v9, v2, v10, v8}, Ljava/lang/String;-><init>([BII)V
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_85
.catch Ljava/lang/Exception; {:try_start_2d .. :try_end_85} :catch_86
.catchall {:try_start_2d .. :try_end_85} :catchall_b4
goto :goto_73
.line 276
:catch_86
move-exception v1
move-object v2, v1
move v1, v3
move-object v3, v4
.line 277
:goto_8a
:try_start_8a
const-string v4, "TreeScanTask"
invoke-virtual {v2}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5, v2}, Lcom/cleanmaster/service/scantree/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
.line 278
invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V
:try_end_96
.catchall {:try_start_8a .. :try_end_96} :catchall_b9
.line 280
invoke-static {v3}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 282
:goto_99
return v1
.line 268
:cond_9a
:try_start_9a
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {p0, v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->d(Ljava/lang/String;)Z
:try_end_a1
.catch Ljava/lang/Exception; {:try_start_9a .. :try_end_a1} :catch_86
.catchall {:try_start_9a .. :try_end_a1} :catchall_b4
move-result v1
if-eqz v1, :cond_c4
move v1, v5
.line 273
:goto_a5
if-eqz v1, :cond_b0
:try_start_a7
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->isDebug()Z
move-result v2
if-eqz v2, :cond_b0
.line 274
invoke-direct {p0, v6}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->c(Ljava/lang/String;)V
:try_end_b0
.catch Ljava/lang/Exception; {:try_start_a7 .. :try_end_b0} :catch_c1
.catchall {:try_start_a7 .. :try_end_b0} :catchall_b4
.line 280
:cond_b0
invoke-static {v4}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
goto :goto_99
:catchall_b4
move-exception v1
:goto_b5
invoke-static {v4}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
throw v1
:catchall_b9
move-exception v1
move-object v4, v3
goto :goto_b5
.line 276
:catch_bc
move-exception v1
move-object v2, v1
move v1, v3
move-object v3, v4
goto :goto_8a
:catch_c1
move-exception v2
move-object v3, v4
goto :goto_8a
:cond_c4
move v1, v3
goto :goto_a5
.end method
.method private b(Ljava/lang/String;)Z
.registers 13
.prologue
const/4 v0, 0x0
const/4 v2, 0x0
.line 73
.line 78
invoke-static {}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a()Ljava/lang/String;
move-result-object v5
.line 79
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ".tmp"
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
.line 82
:try_start_19
new-instance v1, Ljava/net/URL;
invoke-direct {v1, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
.line 83
invoke-direct {p0, v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/net/URL;)Ljava/net/HttpURLConnection;
:try_end_21
.catch Ljava/lang/Exception; {:try_start_19 .. :try_end_21} :catch_ab
.catchall {:try_start_19 .. :try_end_21} :catchall_91
move-result-object v4
.line 84
:try_start_22
const-string v1, "Accept-Encoding"
const-string v3, "gzip, deflate"
invoke-virtual {v4, v1, v3}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
.line 86
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->connect()V
.line 88
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v1
.line 89
const/16 v3, 0xc8
if-lt v1, v3, :cond_b2
const/16 v3, 0xcf
if-gt v1, v3, :cond_b2
.line 91
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
:try_end_3b
.catch Ljava/lang/Exception; {:try_start_22 .. :try_end_3b} :catch_af
.catchall {:try_start_22 .. :try_end_3b} :catchall_a0
move-result-object v1
.line 92
const/16 v3, 0x400
:try_start_3e
new-array v7, v3, [B
.line 94
new-instance v3, Ljava/io/FileOutputStream;
invoke-direct {v3, v6}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V
:try_end_45
.catch Ljava/lang/Exception; {:try_start_3e .. :try_end_45} :catch_8c
.catchall {:try_start_3e .. :try_end_45} :catchall_a3
.line 96
:goto_45
const/4 v8, 0x0
:try_start_46
array-length v9, v7
invoke-virtual {v1, v7, v8, v9}, Ljava/io/InputStream;->read([BII)I
move-result v8
const/4 v9, -0x1
if-eq v8, v9, :cond_6a
.line 97
const/4 v9, 0x0
invoke-virtual {v3, v7, v9, v8}, Ljava/io/FileOutputStream;->write([BII)V
.line 98
invoke-virtual {v3}, Ljava/io/FileOutputStream;->flush()V
:try_end_55
.catch Ljava/lang/Exception; {:try_start_46 .. :try_end_55} :catch_56
.catchall {:try_start_46 .. :try_end_55} :catchall_a5
goto :goto_45
.line 111
:catch_56
move-exception v2
move-object v10, v2
move-object v2, v3
move-object v3, v1
move-object v1, v10
.line 112
:goto_5b
:try_start_5b
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
:try_end_5e
.catchall {:try_start_5b .. :try_end_5e} :catchall_a8
.line 114
invoke-static {v2}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 115
invoke-static {v3}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 116
if-eqz v4, :cond_69
.line 117
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->disconnect()V
.line 120
:cond_69
:goto_69
return v0
.line 100
:cond_6a
:try_start_6a
invoke-static {v3}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
:try_end_6d
.catch Ljava/lang/Exception; {:try_start_6a .. :try_end_6d} :catch_56
.catchall {:try_start_6a .. :try_end_6d} :catchall_a5
.line 103
:try_start_6d
invoke-direct {p0, p1, v6}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/lang/String;Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_83
.line 104
invoke-static {v6, v5}, Lcom/cleanmaster/pluginscommonlib/i;->a(Ljava/lang/String;Ljava/lang/String;)I
:try_end_76
.catch Ljava/lang/Exception; {:try_start_6d .. :try_end_76} :catch_8c
.catchall {:try_start_6d .. :try_end_76} :catchall_a3
.line 105
const/4 v0, 0x1
.line 114
:goto_77
invoke-static {v2}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 115
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 116
if-eqz v4, :cond_69
.line 117
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->disconnect()V
goto :goto_69
.line 107
:cond_83
:try_start_83
const-string v3, "TreeScanTask"
const-string/jumbo v5, "\u914d\u7f6e\u6587\u4ef6m5d\u6821\u9a8c\u5931\u8d25"
invoke-static {v3, v5}, Lcom/cleanmaster/service/scantree/b;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_8b
.catch Ljava/lang/Exception; {:try_start_83 .. :try_end_8b} :catch_8c
.catchall {:try_start_83 .. :try_end_8b} :catchall_a3
goto :goto_77
.line 111
:catch_8c
move-exception v3
move-object v10, v3
move-object v3, v1
move-object v1, v10
goto :goto_5b
.line 114
:catchall_91
move-exception v0
move-object v1, v2
move-object v4, v2
:goto_94
invoke-static {v2}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 115
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
.line 116
if-eqz v4, :cond_9f
.line 117
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_9f
throw v0
.line 114
:catchall_a0
move-exception v0
move-object v1, v2
goto :goto_94
:catchall_a3
move-exception v0
goto :goto_94
:catchall_a5
move-exception v0
move-object v2, v3
goto :goto_94
:catchall_a8
move-exception v0
move-object v1, v3
goto :goto_94
.line 111
:catch_ab
move-exception v1
move-object v3, v2
move-object v4, v2
goto :goto_5b
:catch_af
move-exception v1
move-object v3, v2
goto :goto_5b
:cond_b2
move-object v1, v2
goto :goto_77
.end method
.method private b(Ljava/util/List;I)Z
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;I)Z"
}
.end annotation
.prologue
.line 218
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/junk/util/NetworkUtil;->isNetworkAvailable(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_14
.line 219
const-string v0, "TreeScanTask"
const-string/jumbo v1, "\u7f51\u7edc\u8fde\u63a5\u4e0d\u53ef\u7528"
invoke-static {v0, v1}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 220
const/4 v0, 0x0
.line 235
:cond_13
:goto_13
return v0
.line 223
:cond_14
invoke-direct {p0, p1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/util/List;)Z
move-result v0
.line 225
:goto_18
if-nez v0, :cond_13
if-eqz p2, :cond_13
.line 226
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/cleanmaster/junk/util/NetworkUtil;->isNetworkAvailable(Landroid/content/Context;)Z
move-result v1
if-nez v1, :cond_2f
.line 227
const-string v1, "TreeScanTask"
const-string/jumbo v2, "\u7f51\u7edc\u8fde\u63a5\u4e0d\u53ef\u7528"
invoke-static {v1, v2}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_13
.line 230
:cond_2f
const-string v0, "TreeScanTask"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "\u4e0a\u4f20\u5931\u8d25\uff0c\u5f53\u524d\u8fd8\u6709"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string/jumbo v2, "\u6b21\u91cd\u8bd5\u673a\u4f1a"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 231
add-int/lit8 p2, p2, -0x1
.line 232
invoke-direct {p0, p1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/util/List;)Z
move-result v0
goto :goto_18
.end method
.method private declared-synchronized c(Ljava/lang/String;)V
.registers 6
.prologue
.line 286
monitor-enter p0
:try_start_1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
:try_end_4
.catchall {:try_start_1 .. :try_end_4} :catchall_3f
move-result v0
if-eqz v0, :cond_9
.line 308
:cond_7
:goto_7
monitor-exit p0
return-void
.line 290
:cond_9
:try_start_9
new-instance v0, Ljava/io/File;
invoke-static {}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 291
invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
.line 292
if-eqz v0, :cond_7
.line 293
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
if-nez v1, :cond_21
.line 294
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 296
:cond_21
new-instance v3, Ljava/io/File;
const-string v1, "debug_upload_json.txt"
invoke-direct {v3, v0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_end_28
.catchall {:try_start_9 .. :try_end_28} :catchall_3f
.line 298
const/4 v2, 0x0
.line 300
:try_start_29
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
:try_end_2e
.catch Ljava/lang/Exception; {:try_start_29 .. :try_end_2e} :catch_42
.catchall {:try_start_29 .. :try_end_2e} :catchall_4b
.line 301
:try_start_2e
const-string/jumbo v0, "utf-8"
invoke-virtual {p1, v0}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-virtual {v1, v0}, Ljava/io/FileOutputStream;->write([B)V
.line 302
invoke-virtual {v1}, Ljava/io/FileOutputStream;->flush()V
:try_end_3b
.catch Ljava/lang/Exception; {:try_start_2e .. :try_end_3b} :catch_53
.catchall {:try_start_2e .. :try_end_3b} :catchall_51
.line 306
:try_start_3b
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
:try_end_3e
.catchall {:try_start_3b .. :try_end_3e} :catchall_3f
goto :goto_7
.line 286
:catchall_3f
move-exception v0
monitor-exit p0
throw v0
.line 303
:catch_42
move-exception v0
move-object v1, v2
.line 304
:goto_44
:try_start_44
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
:try_end_47
.catchall {:try_start_44 .. :try_end_47} :catchall_51
.line 306
:try_start_47
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
goto :goto_7
:catchall_4b
move-exception v0
move-object v1, v2
:goto_4d
invoke-static {v1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->a(Ljava/io/Closeable;)V
throw v0
:try_end_51
.catchall {:try_start_47 .. :try_end_51} :catchall_3f
:catchall_51
move-exception v0
goto :goto_4d
.line 303
:catch_53
move-exception v0
goto :goto_44
.end method
.method private d(Ljava/lang/String;)Z
.registers 7
.prologue
const/4 v0, 0x0
.line 312
:try_start_1
const-string v1, "TreeScanTask"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v3, "responeBody="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 313
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 314
const-string/jumbo v2, "resp_common"
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v2
.line 315
if-nez v2, :cond_29
.line 327
:goto_28
return v0
.line 318
:cond_29
const-string/jumbo v3, "ret"
const/4 v4, -0x1
invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I
move-result v2
.line 319
if-nez v2, :cond_35
.line 320
const/4 v0, 0x1
goto :goto_28
.line 322
:cond_35
const-string v3, "TreeScanTask"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
const-string v4, ": "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v4, "msg"
invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v3, v1}, Lcom/cleanmaster/service/scantree/b;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_57
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_57} :catch_58
goto :goto_28
.line 323
:catch_58
move-exception v1
.line 324
const-string v2, "TreeScanTask"
invoke-virtual {v1}, Lorg/json/JSONException;->getLocalizedMessage()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3, v1}, Lcom/cleanmaster/service/scantree/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
.line 325
invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V
goto :goto_28
.end method
.method private static e(Ljava/lang/String;)Ljava/lang/String;
.registers 4
.prologue
.line 356
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
.line 357
const-string v1, "http"
.line 358
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "://"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "cloudcache.cmcm.com"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 359
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public declared-synchronized a(Ljava/lang/String;I)Z
.registers 6
.prologue
.line 49
monitor-enter p0
:try_start_1
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/junk/util/NetworkUtil;->isNetworkAvailable(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_16
.line 50
const-string v0, "TreeScanTask"
const-string/jumbo v1, "\u7f51\u7edc\u8fde\u63a5\u4e0d\u53ef\u7528"
invoke-static {v0, v1}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
:try_end_13
.catchall {:try_start_1 .. :try_end_13} :catchall_31
.line 51
const/4 v0, 0x0
.line 68
:cond_14
:goto_14
monitor-exit p0
return v0
.line 53
:cond_16
:try_start_16
invoke-direct {p0, p1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->b(Ljava/lang/String;)Z
move-result v0
.line 55
:goto_1a
if-nez v0, :cond_14
if-eqz p2, :cond_14
.line 58
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/cleanmaster/junk/util/NetworkUtil;->isNetworkAvailable(Landroid/content/Context;)Z
move-result v1
if-nez v1, :cond_34
.line 59
const-string v1, "TreeScanTask"
const-string/jumbo v2, "\u7f51\u7edc\u8fde\u63a5\u4e0d\u53ef\u7528"
invoke-static {v1, v2}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
:try_end_30
.catchall {:try_start_16 .. :try_end_30} :catchall_31
goto :goto_14
.line 49
:catchall_31
move-exception v0
monitor-exit p0
throw v0
.line 62
:cond_34
:try_start_34
const-string v0, "TreeScanTask"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "\u4e0b\u8f7d\u5931\u8d25\uff0c\u5f53\u524d\u8fd8\u6709"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string/jumbo v2, "\u6b21\u91cd\u8bd5\u673a\u4f1a"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/cleanmaster/service/scantree/b;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 63
add-int/lit8 p2, p2, -0x1
.line 64
invoke-direct {p0, p1}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->b(Ljava/lang/String;)Z
:try_end_59
.catchall {:try_start_34 .. :try_end_59} :catchall_31
move-result v0
goto :goto_1a
.end method
.method public a(Ljava/util/List;I)Z
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;I)Z"
}
.end annotation
.prologue
const/4 v0, 0x0
.line 209
if-eqz p1, :cond_9
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v1
if-nez v1, :cond_a
.line 213
:cond_9
:goto_9
return v0
.line 210
:cond_a
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/cleanmaster/junk/util/NetworkUtil;->isNetworkAvailable(Landroid/content/Context;)Z
move-result v1
if-eqz v1, :cond_9
.line 213
invoke-direct {p0, p1, p2}, Lcom/cleanmaster/service/scantree/cloudconfig/a;->b(Ljava/util/List;I)Z
move-result v0
goto :goto_9
.end method