7256 lines
187 KiB
Smali
7256 lines
187 KiB
Smali
.class Lcom/tencent/smtt/sdk/ag;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# static fields
|
|
.field private static d:I = 0x5
|
|
|
|
.field private static e:I = 0x1
|
|
|
|
.field private static final f:[Ljava/lang/String;
|
|
|
|
|
|
# instance fields
|
|
.field private A:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private B:I
|
|
|
|
.field private C:Z
|
|
|
|
.field a:Ljava/lang/String;
|
|
|
|
.field b:[Ljava/lang/String;
|
|
|
|
.field c:I
|
|
|
|
.field private g:Landroid/content/Context;
|
|
|
|
.field private h:Ljava/lang/String;
|
|
|
|
.field private i:Ljava/lang/String;
|
|
|
|
.field private j:Ljava/lang/String;
|
|
|
|
.field private k:Ljava/io/File;
|
|
|
|
.field private l:J
|
|
|
|
.field private m:I
|
|
|
|
.field private n:I
|
|
|
|
.field private o:Z
|
|
|
|
.field private p:I
|
|
|
|
.field private q:I
|
|
|
|
.field private r:Z
|
|
|
|
.field private s:Z
|
|
|
|
.field private t:Ljava/net/HttpURLConnection;
|
|
|
|
.field private u:Ljava/lang/String;
|
|
|
|
.field private v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
.field private w:Ljava/lang/String;
|
|
|
|
.field private x:I
|
|
|
|
.field private y:Z
|
|
|
|
.field private z:Landroid/os/Handler;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x5
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "tbs_downloading_com.tencent.mtt"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "tbs_downloading_com.tencent.mm"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "tbs_downloading_com.tencent.mobileqq"
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "tbs_downloading_com.tencent.tbs"
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "tbs_downloading_com.qzone"
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/tencent/smtt/sdk/ag;->f:[Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/16 v0, 0x7530
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->m:I
|
|
|
|
const/16 v0, 0x4e20
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->n:I
|
|
|
|
sget v0, Lcom/tencent/smtt/sdk/ag;->d:I
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput v1, p0, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a()Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
new-instance p1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "tbs_downloading_"
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->u:Ljava/lang/String;
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/am;->q(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->f()V
|
|
|
|
iput-object v0, p0, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
|
|
const/4 p1, -0x1
|
|
|
|
iput p1, p0, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v0, "TbsCorePrivateDir is null!"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private a(JJ)J
|
|
.locals 3
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
sub-long p1, v0, p1
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v2, p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownConsumeTime(J)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {p1, p3, p4}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownloadSize(J)V
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method static a(Landroid/content/Context;)Ljava/io/File;
|
|
.locals 4
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x8
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v2, 0x8
|
|
|
|
if-lt v1, v2, :cond_0
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
invoke-static {p0, v2}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->isDirectory()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_1
|
|
return-object v1
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "[TbsApkDownloader.backupApkPath] Exception is "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v1, p0}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static a(Landroid/content/Context;I)Ljava/io/File;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
invoke-static {p0, p1}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/io/File;
|
|
|
|
invoke-static {p0}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const-string p0, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string p0, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {p1, v0, p0}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
return-object v0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
invoke-static {p1}, Landroid/util/Log;->getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x400
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private a(Ljava/net/URL;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, ""
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Ljava/net/URL;->getHost()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/net/InetAddress;->getHostAddress()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Error; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Error;->printStackTrace()V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
:goto_0
|
|
move-object p1, v0
|
|
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private a(ILjava/lang/String;Z)V
|
|
.locals 1
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
iget p3, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
if-le p3, v0, :cond_1
|
|
|
|
:cond_0
|
|
iget-object p3, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {p3, p1}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setErrorCode(I)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setFailDetail(Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(J)V
|
|
.locals 3
|
|
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->m()J
|
|
|
|
move-result-wide p1
|
|
|
|
:cond_0
|
|
invoke-static {p1, p2}, Ljava/lang/Thread;->sleep(J)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/io/Closeable;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-interface {p1}, Ljava/io/Closeable;->close()V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/io/File;Landroid/content/Context;)V
|
|
.locals 5
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
invoke-virtual {p0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_download_version_type"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
const-string v4, "x5.tbs.decouple"
|
|
|
|
invoke-direct {v1, v0, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
const-string v4, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-string v4, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {v1, v0, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
invoke-virtual {v1}, Ljava/io/File;->delete()Z
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;Ljava/io/File;)Z
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v4, "tbs_download_version_type"
|
|
|
|
invoke-interface {v1, v4, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
if-eq v1, v2, :cond_3
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_decouplecoreversion"
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {p1, p0}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v2
|
|
|
|
if-ne v1, v2, :cond_3
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs.decouple"
|
|
|
|
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1, p0}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v1}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result p1
|
|
|
|
if-eq v0, p1, :cond_3
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->delete()Z
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;Ljava/io/File;)Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_3
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/lang/String;)V
|
|
.locals 4
|
|
|
|
new-instance v0, Ljava/net/URL;
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
:try_start_0
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {p1}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "[initHttpRequest] mHttpRequest.disconnect() Throwable:"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v1, p1}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/net/HttpURLConnection;
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v0, "User-Agent"
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloader;->a(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
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v0, "Accept-Encoding"
|
|
|
|
const-string v1, "identity"
|
|
|
|
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v0, "GET"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->setInstanceFollowRedirects(Z)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->n:I
|
|
|
|
invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->m:I
|
|
|
|
invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/tencent/smtt/sdk/ag;)Z
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->n()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static b(Landroid/content/Context;)Ljava/io/File;
|
|
.locals 4
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x8
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v2, 0x8
|
|
|
|
if-lt v1, v2, :cond_3
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;I)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;I)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_0
|
|
if-nez v1, :cond_1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;I)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_1
|
|
if-nez v1, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p0, v1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;I)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move-object p0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
move-object p0, v0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "[TbsApkDownloader.backupApkPath] Exception is "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v1, p0}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private b(Z)V
|
|
.locals 7
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/utils/aa;->a(Landroid/content/Context;)Z
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v2, "request_full_package"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v1, v2, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v2, "tbs_needdownload"
|
|
|
|
invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v1, v2, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v2, "tbs_download_interrupt_code_reason"
|
|
|
|
const/16 v4, -0x7b
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v1, v2, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
sget-object v1, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/16 p1, 0x64
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p1, 0x78
|
|
|
|
:goto_0
|
|
invoke-interface {v1, p1}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
iget-object p1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v1, "tbs_responsecode"
|
|
|
|
invoke-interface {p1, v1, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_downloaddecouplecore"
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-eq p1, v1, :cond_2
|
|
|
|
const/16 v1, 0x2710
|
|
|
|
if-le p1, v1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v0, "tbs_download_version"
|
|
|
|
invoke-interface {p1, v0, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
new-instance v2, Ljava/io/File;
|
|
|
|
iget-object v3, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v4, "x5.tbs"
|
|
|
|
invoke-direct {v2, v3, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2, p1}, Lcom/tencent/smtt/sdk/am;->a(Landroid/content/Context;Ljava/lang/String;I)V
|
|
|
|
new-instance p1, Ljava/io/File;
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v1, "x5.tbs"
|
|
|
|
invoke-direct {p1, v0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1, v0}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/File;Landroid/content/Context;)V
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_2
|
|
:goto_1
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
new-instance v2, Ljava/io/File;
|
|
|
|
iget-object v4, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
const-string v4, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const-string v4, "x5.tbs.org"
|
|
|
|
:goto_2
|
|
invoke-direct {v2, v1, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v1
|
|
|
|
new-instance v4, Ljava/io/File;
|
|
|
|
iget-object v5, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v6, "x5.tbs"
|
|
|
|
invoke-direct {v4, v5, v6}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 v4, 0x0
|
|
|
|
:goto_3
|
|
iget-object v0, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_download_version"
|
|
|
|
invoke-interface {v0, v5, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
new-instance v3, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v3}, Landroid/os/Bundle;-><init>()V
|
|
|
|
const-string v5, "operation"
|
|
|
|
invoke-virtual {v3, v5, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
const-string p1, "old_core_ver"
|
|
|
|
invoke-virtual {v3, p1, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
const-string p1, "new_core_ver"
|
|
|
|
invoke-virtual {v3, p1, v0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
const-string p1, "old_apk_location"
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v3, p1, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string p1, "new_apk_location"
|
|
|
|
invoke-virtual {v3, p1, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string p1, "diff_file_location"
|
|
|
|
invoke-virtual {v3, p1, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-virtual {p1, v0, v3}, Lcom/tencent/smtt/sdk/am;->b(Landroid/content/Context;Landroid/os/Bundle;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
invoke-virtual {p0}, Lcom/tencent/smtt/sdk/ag;->d()V
|
|
|
|
iget-object p1, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v1, "tbs_needdownload"
|
|
|
|
invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p1, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:goto_4
|
|
return-void
|
|
.end method
|
|
|
|
.method private b(I)Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v3, "x5.tbs"
|
|
|
|
invoke-direct {v1, v2, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
new-instance v3, Ljava/io/File;
|
|
|
|
iget-object v4, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const-string v4, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v4, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {v3, v2, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->delete()Z
|
|
|
|
invoke-static {v3, v1}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;Ljava/io/File;)Z
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
invoke-static {v2, v1, v3, v4, p1}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;JI)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const-string p1, "TbsDownload"
|
|
|
|
const-string v1, "[TbsApkDownloader.copyTbsApkFromBackupToInstall] verifyTbsApk error!!"
|
|
|
|
invoke-static {p1, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "[TbsApkDownloader.copyTbsApkFromBackupToInstall] Exception is "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v1, p1}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static c(Landroid/content/Context;)V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
invoke-static {p0}, Lcom/tencent/smtt/sdk/am;->q(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs"
|
|
|
|
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->delete()Z
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs.temp"
|
|
|
|
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->delete()Z
|
|
|
|
invoke-static {p0}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
const-string v1, "x5.tbs.org"
|
|
|
|
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
const-string v1, "x5.oversea.tbs.org"
|
|
|
|
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private c(Z)Z
|
|
.locals 3
|
|
|
|
const-string v0, "TbsDownload"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "[TbsApkDownloader.deleteFile] isApk="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance p1, Ljava/io/File;
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v1, "x5.tbs"
|
|
|
|
invoke-direct {p1, v0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/io/File;
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v1, "x5.tbs.temp"
|
|
|
|
invoke-direct {p1, v0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->delete()Z
|
|
|
|
move-result v0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method private c(ZZ)Z
|
|
.locals 9
|
|
|
|
const-string v0, "TbsDownload"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "[TbsApkDownloader.verifyTbsApk] isTempFile="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string v2, "x5.tbs"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v2, "x5.tbs.temp"
|
|
|
|
:goto_0
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v3, "tbs_apk_md5"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-interface {v1, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/utils/a;->a(Ljava/io/File;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v1, :cond_c
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_2
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "[TbsApkDownloader.verifyTbsApk] md5("
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, ") successful!"
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v3}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-wide/16 v5, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v3, "tbs_apkfilesize"
|
|
|
|
invoke-interface {v1, v3, v5, v6}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
cmp-long v1, v7, v5
|
|
|
|
if-lez v1, :cond_4
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v5
|
|
|
|
cmp-long v1, v7, v5
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
:cond_3
|
|
const-string p2, "TbsDownload"
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "[TbsApkDownloader.verifyTbsApk] isTempFile="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " filelength failed"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p2, p1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "fileLength:"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ",contentLength:"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v7, v8}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setCheckErrorDetail(Ljava/lang/String;)V
|
|
|
|
return v2
|
|
|
|
:cond_4
|
|
const-string v1, "TbsDownload"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "[TbsApkDownloader.verifyTbsApk] length("
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v5, ") successful!"
|
|
|
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v3}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1, v0}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v1
|
|
|
|
iget-object v3, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v3, v3, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_download_version"
|
|
|
|
invoke-interface {v3, v5, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v3
|
|
|
|
if-eq v3, v1, :cond_6
|
|
|
|
const-string p2, "TbsDownload"
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "[TbsApkDownloader.verifyTbsApk] isTempFile="
|
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, " versionCode failed"
|
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p2, v0}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "fileVersion:"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ",configVersion:"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setCheckErrorDetail(Ljava/lang/String;)V
|
|
|
|
:cond_5
|
|
return v2
|
|
|
|
:cond_6
|
|
const-string v3, "TbsDownload"
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "[TbsApkDownloader.verifyTbsApk] tbsApkVersionCode("
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ") successful!"
|
|
|
|
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v3, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p2, :cond_9
|
|
|
|
iget-object p2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p2, v0}, Lcom/tencent/smtt/utils/b;->a(Landroid/content/Context;Ljava/io/File;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v1, "3082023f308201a8a00302010202044c46914a300d06092a864886f70d01010505003064310b30090603550406130238363110300e060355040813074265696a696e673110300e060355040713074265696a696e673110300e060355040a130754656e63656e74310c300a060355040b13035753443111300f0603550403130873616d75656c6d6f301e170d3130303732313036313835305a170d3430303731333036313835305a3064310b30090603550406130238363110300e060355040813074265696a696e673110300e060355040713074265696a696e673110300e060355040a130754656e63656e74310c300a060355040b13035753443111300f0603550403130873616d75656c6d6f30819f300d06092a864886f70d010101050003818d0030818902818100c209077044bd0d63ea00ede5b839914cabcc912a87f0f8b390877e0f7a2583f0d5933443c40431c35a4433bc4c965800141961adc44c9625b1d321385221fd097e5bdc2f44a1840d643ab59dc070cf6c4b4b4d98bed5cbb8046e0a7078ae134da107cdf2bfc9b440fe5cb2f7549b44b73202cc6f7c2c55b8cfb0d333a021f01f0203010001300d06092a864886f70d010105050003818100b007db9922774ef4ccfee81ba514a8d57c410257e7a2eba64bfa17c9e690da08106d32f637ac41fbc9f205176c71bde238c872c3ee2f8313502bee44c80288ea4ef377a6f2cdfe4d3653c145c4acfedbfbadea23b559d41980cc3cdd35d79a68240693739aabf5c5ed26148756cf88264226de394c8a24ac35b712b120d4d23a"
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_9
|
|
|
|
const-string v0, "TbsDownload"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "[TbsApkDownloader.verifyTbsApk] isTempFile="
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " signature failed"
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "signature:"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
if-nez p2, :cond_7
|
|
|
|
const-string p2, "null"
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
invoke-virtual {p2}, Ljava/lang/String;->length()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setCheckErrorDetail(Ljava/lang/String;)V
|
|
|
|
:cond_8
|
|
return v2
|
|
|
|
:cond_9
|
|
const-string p2, "TbsDownload"
|
|
|
|
const-string v1, "[TbsApkDownloader.verifyTbsApk] signature successful!"
|
|
|
|
invoke-static {p2, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
:try_start_0
|
|
new-instance p1, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v3, "x5.tbs"
|
|
|
|
invoke-direct {p1, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
move-object v4, p1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:goto_2
|
|
if-nez p1, :cond_b
|
|
|
|
const/16 p1, 0x6d
|
|
|
|
invoke-direct {p0, v4}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, p1, v0, p2}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
return v2
|
|
|
|
:cond_a
|
|
const/4 p1, 0x0
|
|
|
|
:cond_b
|
|
const-string v0, "TbsDownload"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "[TbsApkDownloader.verifyTbsApk] rename("
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ") successful!"
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v0, p1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return p2
|
|
|
|
:cond_c
|
|
:goto_3
|
|
const-string p2, "TbsDownload"
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "[TbsApkDownloader.verifyTbsApk] isTempFile="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " md5 failed"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p2, v0}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_d
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
const-string p2, "fileMd5 not match"
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setCheckErrorDetail(Ljava/lang/String;)V
|
|
|
|
:cond_d
|
|
return v2
|
|
.end method
|
|
|
|
.method private f()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->q:I
|
|
|
|
const-wide/16 v1, -0x1
|
|
|
|
iput-wide v1, p0, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, p0, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->o:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->y:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private g()V
|
|
.locals 6
|
|
|
|
const-string v0, "TbsDownload"
|
|
|
|
const-string v1, "[TbsApkDownloader.closeHttpRequest]"
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getURL()Ljava/net/URL;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {p0, v2}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/net/URL;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setResolveIp(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v2, "TbsDownload"
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "[closeHttpRequest] mHttpRequest.disconnect() Throwable:"
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, v0}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
iput-object v1, p0, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
iget v0, v0, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->a:I
|
|
|
|
iget-boolean v2, p0, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
iget-boolean v2, p0, Lcom/tencent/smtt/sdk/ag;->y:Z
|
|
|
|
if-eqz v2, :cond_9
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v2, v4, v5}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setEventTime(J)V
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/utils/Apn;->getApnInfo(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
const-string v2, ""
|
|
|
|
:cond_2
|
|
iget-object v4, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v4
|
|
|
|
iget-object v5, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v5, v2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setApn(Ljava/lang/String;)V
|
|
|
|
iget-object v5, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v5, v4}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setNetworkType(I)V
|
|
|
|
iget v5, p0, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
|
|
if-ne v4, v5, :cond_3
|
|
|
|
iget-object v4, p0, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
:cond_3
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setNetworkChange(I)V
|
|
|
|
:cond_4
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
iget v2, v2, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->a:I
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
iget v2, v2, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->a:I
|
|
|
|
const/16 v5, 0x6b
|
|
|
|
if-ne v2, v5, :cond_7
|
|
|
|
:cond_5
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->getDownFinalFlag()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/utils/Apn;->isNetworkAvailable(Landroid/content/Context;)Z
|
|
|
|
move-result v2
|
|
|
|
const/16 v5, 0x65
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
:goto_1
|
|
invoke-direct {p0, v5, v1, v4}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->l()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
:goto_2
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_downloaddecouplecore"
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
if-ne v1, v4, :cond_8
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD_DECOUPLE:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
:goto_3
|
|
iget-object v3, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Lcom/tencent/smtt/sdk/TbsLogReport$EventType;Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
goto :goto_3
|
|
|
|
:goto_4
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v1}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->resetArgs()V
|
|
|
|
const/16 v1, 0x64
|
|
|
|
if-eq v0, v1, :cond_a
|
|
|
|
sget-object v1, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v1, v0}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_9
|
|
sput-boolean v3, Lcom/tencent/smtt/sdk/TbsDownloader;->a:Z
|
|
|
|
:cond_a
|
|
:goto_5
|
|
return-void
|
|
.end method
|
|
|
|
.method private h()Z
|
|
.locals 5
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const-string v2, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v2, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "use_backup_version"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_download_version"
|
|
|
|
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
:cond_1
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
invoke-static {v2, v0, v3, v4, v1}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;JI)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private i()V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v0, v0, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v1, "tbs_downloaddecouplecore"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const-string v2, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v2, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private j()Z
|
|
.locals 3
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs.temp"
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private k()J
|
|
.locals 3
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs.temp"
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
:goto_0
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method private l()Z
|
|
.locals 9
|
|
|
|
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "www.qq.com"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:try_start_0
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "ping "
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Process;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_3
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_3
|
|
|
|
:try_start_1
|
|
new-instance v1, Ljava/io/InputStreamReader;
|
|
|
|
invoke-direct {v1, v0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_2
|
|
|
|
:try_start_2
|
|
new-instance v4, Ljava/io/BufferedReader;
|
|
|
|
invoke-direct {v4, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
|
|
:try_end_2
|
|
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_1
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:cond_0
|
|
:try_start_3
|
|
invoke-virtual {v4}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
const-string v7, "TTL"
|
|
|
|
invoke-virtual {v5, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_2
|
|
|
|
const-string v7, "ttl"
|
|
|
|
invoke-virtual {v5, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v5
|
|
:try_end_3
|
|
.catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_3} :catch_0
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
add-int/2addr v3, v6
|
|
|
|
const/4 v5, 0x5
|
|
|
|
if-lt v3, v5, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 v2, 0x1
|
|
|
|
:cond_3
|
|
:goto_1
|
|
invoke-direct {p0, v0}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
goto :goto_3
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
goto :goto_4
|
|
|
|
:catch_0
|
|
move-exception v3
|
|
|
|
move-object v8, v3
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v0, v8
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_1
|
|
move-exception v2
|
|
|
|
move-object v4, v3
|
|
|
|
goto :goto_4
|
|
|
|
:catch_1
|
|
move-exception v4
|
|
|
|
move-object v8, v3
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v0, v4
|
|
|
|
move-object v4, v8
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_2
|
|
move-exception v2
|
|
|
|
move-object v4, v3
|
|
|
|
goto :goto_5
|
|
|
|
:catch_2
|
|
move-exception v1
|
|
|
|
move-object v4, v3
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v0, v1
|
|
|
|
move-object v1, v4
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_3
|
|
move-exception v2
|
|
|
|
move-object v0, v3
|
|
|
|
move-object v4, v0
|
|
|
|
goto :goto_5
|
|
|
|
:catch_3
|
|
move-exception v0
|
|
|
|
move-object v1, v3
|
|
|
|
move-object v4, v1
|
|
|
|
:goto_2
|
|
:try_start_4
|
|
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_4
|
|
|
|
invoke-direct {p0, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
:goto_3
|
|
invoke-direct {p0, v1}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {p0, v4}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
return v2
|
|
|
|
:catchall_4
|
|
move-exception v2
|
|
|
|
move-object v0, v3
|
|
|
|
:goto_4
|
|
move-object v3, v1
|
|
|
|
:goto_5
|
|
invoke-direct {p0, v0}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {p0, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {p0, v4}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
throw v2
|
|
.end method
|
|
|
|
.method private m()J
|
|
.locals 4
|
|
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
const-wide/32 v0, 0x30d40
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_0
|
|
const-wide/32 v0, 0x186a0
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_1
|
|
iget v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
int-to-long v0, v0
|
|
|
|
const-wide/16 v2, 0x4e20
|
|
|
|
mul-long v0, v0, v2
|
|
|
|
:goto_0
|
|
return-wide v0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private n()Z
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x3
|
|
|
|
if-ne v0, v3, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
const-string v3, "TbsDownload"
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "[TbsApkDwonloader.detectWifiNetworkAvailable] isWifi="
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v3, v4}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/utils/Apn;->getWifiSSID(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v4, "TbsDownload"
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "[TbsApkDwonloader.detectWifiNetworkAvailable] localBSSID="
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v4, v5}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
new-instance v4, Ljava/net/URL;
|
|
|
|
const-string v5, "http://pms.mb.qq.com/rsp204"
|
|
|
|
invoke-direct {v4, v5}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/net/HttpURLConnection;
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
invoke-virtual {v4, v2}, Ljava/net/HttpURLConnection;->setInstanceFollowRedirects(Z)V
|
|
|
|
const/16 v3, 0x2710
|
|
|
|
invoke-virtual {v4, v3}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
|
|
|
|
invoke-virtual {v4, v3}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V
|
|
|
|
invoke-virtual {v4, v2}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V
|
|
|
|
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getResponseCode()I
|
|
|
|
move-result v3
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "[TbsApkDwonloader.detectWifiNetworkAvailable] responseCode="
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v5, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
const/16 v5, 0xcc
|
|
|
|
if-ne v3, v5, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_1
|
|
if-eqz v4, :cond_4
|
|
|
|
:try_start_2
|
|
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_2
|
|
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
goto :goto_3
|
|
|
|
:catch_0
|
|
nop
|
|
|
|
goto :goto_3
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
move-object v3, v4
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
move-object v4, v3
|
|
|
|
goto :goto_2
|
|
|
|
:catch_2
|
|
move-exception v1
|
|
|
|
:goto_1
|
|
:try_start_3
|
|
invoke-virtual {v1}, Ljava/lang/Throwable;->printStackTrace()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
:try_start_4
|
|
invoke-virtual {v3}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_4
|
|
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
if-eqz v4, :cond_2
|
|
|
|
:try_start_5
|
|
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_5
|
|
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3
|
|
|
|
:catch_3
|
|
:cond_2
|
|
throw v0
|
|
|
|
:cond_3
|
|
move-object v0, v3
|
|
|
|
:cond_4
|
|
:goto_3
|
|
if-nez v2, :cond_5
|
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->o()V
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->z:Landroid/os/Handler;
|
|
|
|
const/16 v3, 0x96
|
|
|
|
invoke-virtual {v1, v3, v0}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v3, p0, Lcom/tencent/smtt/sdk/ag;->z:Landroid/os/Handler;
|
|
|
|
const-wide/32 v4, 0x1d4c0
|
|
|
|
invoke-virtual {v3, v1, v4, v5}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z
|
|
|
|
:cond_5
|
|
if-eqz v2, :cond_6
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
:cond_6
|
|
return v2
|
|
.end method
|
|
|
|
.method private o()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->z:Landroid/os/Handler;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
new-instance v0, Lcom/tencent/smtt/sdk/ah;
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/al;->a()Lcom/tencent/smtt/sdk/al;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/tencent/smtt/sdk/al;->getLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, p0, v1}, Lcom/tencent/smtt/sdk/ah;-><init>(Lcom/tencent/smtt/sdk/ag;Landroid/os/Looper;)V
|
|
|
|
iput-object v0, p0, Lcom/tencent/smtt/sdk/ag;->z:Landroid/os/Handler;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(I)V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v2, "x5.tbs"
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1, v0}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-eq v2, v1, :cond_0
|
|
|
|
if-lez p1, :cond_1
|
|
|
|
if-ne p1, v1, :cond_1
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public a()Z
|
|
.locals 8
|
|
|
|
const-string v0, "TbsApkDownloader"
|
|
|
|
const-string v1, "verifyAndInstallDecoupleCoreFromBackup #1"
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "x5.tbs.decouple"
|
|
|
|
invoke-direct {v0, v1, v3}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v1, "TbsApkDownloader"
|
|
|
|
const-string v4, "verifyAndInstallDecoupleCoreFromBackup #2"
|
|
|
|
invoke-static {v1, v4}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v4, "tbs_decouplecoreversion"
|
|
|
|
invoke-interface {v1, v4, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsDownloader;->b(I)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
invoke-static {v1, v0}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;Ljava/io/File;)Z
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
iget-object v6, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v6, v6, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v7, "tbs_decouplecoreversion"
|
|
|
|
invoke-interface {v6, v7, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v1, v0, v4, v5, v3}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;JI)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const-string v0, "TbsApkDownloader"
|
|
|
|
const-string v1, "verifyAndInstallDecoupleCoreFromBackup #3"
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/am;->e(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
const-string v0, "TbsApkDownloader"
|
|
|
|
const-string v1, "verifyAndInstallDecoupleCoreFromBackup no backup file !!!"
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "x5.tbs.decouple"
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_3
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public a(Z)Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->n()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->getDownloadWithoutWifi()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/utils/Apn;->isNetworkAvailable(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
:cond_0
|
|
return v0
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget p1, p0, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
if-ltz p1, :cond_2
|
|
|
|
iget p1, p0, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
array-length v1, v1
|
|
|
|
if-ge p1, v1, :cond_2
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
iget v1, p0, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
aget-object p1, p1, v1
|
|
|
|
iput-object p1, p0, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iput v0, p0, Lcom/tencent/smtt/sdk/ag;->q:I
|
|
|
|
const-wide/16 v1, -0x1
|
|
|
|
iput-wide v1, p0, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->o:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->y:Z
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public a(ZZ)Z
|
|
.locals 7
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v0, "use_backup_version"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-interface {p1, v0, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0, v2}, Lcom/tencent/smtt/sdk/am;->i(Landroid/content/Context;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v2, "tbs_download_version"
|
|
|
|
invoke-interface {p1, v2, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
const-string v2, "by default key"
|
|
|
|
:goto_0
|
|
iput-object v2, p0, Lcom/tencent/smtt/sdk/ag;->a:Ljava/lang/String;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const-string v2, "by new key"
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
if-eqz p1, :cond_9
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
goto/16 :goto_6
|
|
|
|
:cond_1
|
|
const/16 v0, -0xd6
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloader;->a(I)Ljava/io/File;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
invoke-virtual {v3}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
new-instance v4, Ljava/io/File;
|
|
|
|
iget-object v5, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const/4 v6, 0x4
|
|
|
|
invoke-static {v5, v6}, Lcom/tencent/smtt/utils/k;->a(Landroid/content/Context;I)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v6, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
const-string v6, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const-string v6, "x5.tbs.org"
|
|
|
|
:goto_2
|
|
invoke-direct {v4, v5, v6}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
iget-object v5, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v6, "tbs_download_version_type"
|
|
|
|
invoke-interface {v5, v6, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v5
|
|
|
|
if-eq v5, v2, :cond_3
|
|
|
|
invoke-static {v3, v4}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;Ljava/io/File;)Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:catch_0
|
|
move-exception v4
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
:cond_3
|
|
const/4 v4, 0x0
|
|
|
|
:goto_3
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->h()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
invoke-direct {p0, p1}, Lcom/tencent/smtt/sdk/ag;->b(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string p2, "tbs_download_interrupt_code_reason"
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {p1, p2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
invoke-direct {p0, v1}, Lcom/tencent/smtt/sdk/ag;->b(Z)V
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
const/16 p1, 0x64
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "use local backup apk in startDownload"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, p1, p2, v2}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string p2, "tbs_downloaddecouplecore"
|
|
|
|
invoke-interface {p1, p2, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
if-ne p1, v2, :cond_4
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD_DECOUPLE:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
:goto_4
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {p1, p2, v0}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Lcom/tencent/smtt/sdk/TbsLogReport$EventType;Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_4
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
goto :goto_4
|
|
|
|
:goto_5
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {p1}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->resetArgs()V
|
|
|
|
:cond_5
|
|
return v2
|
|
|
|
:cond_6
|
|
invoke-direct {p0}, Lcom/tencent/smtt/sdk/ag;->i()V
|
|
|
|
iget-object v4, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
const-wide/16 v5, 0x0
|
|
|
|
invoke-static {v4, v3, v5, v6, p1}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;JI)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/utils/k;->b(Ljava/io/File;)V
|
|
|
|
:cond_7
|
|
invoke-direct {p0, v1, p2}, Lcom/tencent/smtt/sdk/ag;->c(ZZ)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string p2, "tbs_download_interrupt_code_reason"
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {p1, p2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
invoke-direct {p0, v1}, Lcom/tencent/smtt/sdk/ag;->b(Z)V
|
|
|
|
return v2
|
|
|
|
:cond_8
|
|
invoke-direct {p0, v2}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_9
|
|
|
|
invoke-direct {p0, v2}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_9
|
|
|
|
const-string p1, "TbsDownload"
|
|
|
|
const-string p2, "[TbsApkDownloader] delete file failed!"
|
|
|
|
invoke-static {p1, p2}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {p1}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, -0x12d
|
|
|
|
invoke-virtual {p1, p2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
:cond_9
|
|
:goto_6
|
|
return v1
|
|
.end method
|
|
|
|
.method public b()I
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/sdk/ag;->a(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
new-instance v2, Ljava/io/File;
|
|
|
|
iget-object v3, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
const-string v3, "x5.oversea.tbs.org"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v3, "x5.tbs.org"
|
|
|
|
:goto_0
|
|
invoke-direct {v2, v0, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1, v2}, Lcom/tencent/smtt/utils/a;->a(Landroid/content/Context;Ljava/io/File;)I
|
|
|
|
move-result v0
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public b(ZZ)V
|
|
.locals 34
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
move/from16 v2, p1
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/am;->a()Lcom/tencent/smtt/sdk/am;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-virtual {v3, v4}, Lcom/tencent/smtt/sdk/am;->c(Landroid/content/Context;)Z
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
sput-boolean v4, Lcom/tencent/smtt/sdk/TbsDownloader;->a:Z
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, -0x142
|
|
|
|
:goto_0
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v3, v3, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_responsecode"
|
|
|
|
invoke-interface {v3, v5, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v3
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eq v3, v6, :cond_2
|
|
|
|
if-eq v3, v5, :cond_2
|
|
|
|
const/4 v7, 0x4
|
|
|
|
if-ne v3, v7, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v7, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 v7, 0x1
|
|
|
|
:goto_2
|
|
if-nez p2, :cond_3
|
|
|
|
invoke-virtual {v1, v2, v7}, Lcom/tencent/smtt/sdk/ag;->a(ZZ)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
sput-boolean v4, Lcom/tencent/smtt/sdk/TbsDownloader;->a:Z
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
iput-boolean v2, v1, Lcom/tencent/smtt/sdk/ag;->C:Z
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v3, v3, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v8, "tbs_downloadurl"
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-interface {v3, v8, v9}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
iput-object v3, v1, Lcom/tencent/smtt/sdk/ag;->h:Ljava/lang/String;
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v3, v3, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v8, "tbs_downloadurl_list"
|
|
|
|
invoke-interface {v3, v8, v9}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v8, "TbsDownload"
|
|
|
|
new-instance v10, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v11, "backupUrlStrings:"
|
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-static {v8, v10, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iput-object v9, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
iput v4, v1, Lcom/tencent/smtt/sdk/ag;->c:I
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
const-string v8, ""
|
|
|
|
invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {v8, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_4
|
|
|
|
invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
const-string v10, ";"
|
|
|
|
invoke-virtual {v8, v10}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
iput-object v8, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
:cond_4
|
|
const-string v8, "TbsDownload"
|
|
|
|
new-instance v10, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v11, "[TbsApkDownloader.startDownload] mDownloadUrl="
|
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v11, v1, Lcom/tencent/smtt/sdk/ag;->h:Ljava/lang/String;
|
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v11, " backupUrlStrings="
|
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " mLocation="
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " mCanceled="
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-boolean v3, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " mHttpRequest="
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v8, v3}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->h:Ljava/lang/String;
|
|
|
|
const/16 v8, 0x6e
|
|
|
|
if-nez v3, :cond_5
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
if-nez v3, :cond_5
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v2, v8}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, -0x12e
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_5
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
iget-boolean v3, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-nez v3, :cond_6
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v2, v8}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, -0x12f
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_6
|
|
const/16 v3, -0x130
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
iget-object v10, v1, Lcom/tencent/smtt/sdk/ag;->A:Ljava/util/Set;
|
|
|
|
iget-object v11, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v11}, Lcom/tencent/smtt/utils/Apn;->getWifiSSID(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-interface {v10, v11}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v10
|
|
|
|
if-eqz v10, :cond_7
|
|
|
|
const-string v2, "TbsDownload"
|
|
|
|
const-string v4, "[TbsApkDownloader.startDownload] WIFI Unavailable"
|
|
|
|
invoke-static {v2, v4}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v2, v8}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_7
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->f()V
|
|
|
|
const-string v8, "TbsDownload"
|
|
|
|
const-string v10, "STEP 1/2 begin downloading..."
|
|
|
|
invoke-static {v8, v10, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v8, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v8}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getDownloadMaxflow()J
|
|
|
|
move-result-wide v10
|
|
|
|
iget-object v8, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v8}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v8
|
|
|
|
iget-object v8, v8, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v12, "tbs_downloadflow"
|
|
|
|
const-wide/16 v13, 0x0
|
|
|
|
invoke-interface {v8, v12, v13, v14}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v15
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
sget v8, Lcom/tencent/smtt/sdk/ag;->e:I
|
|
|
|
:goto_3
|
|
iput v8, v1, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
sget v8, Lcom/tencent/smtt/sdk/ag;->d:I
|
|
|
|
goto :goto_3
|
|
|
|
:goto_4
|
|
move-wide v3, v15
|
|
|
|
const/4 v8, 0x0
|
|
|
|
:goto_5
|
|
iget v12, v1, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iget v15, v1, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
if-le v12, v15, :cond_a
|
|
|
|
:cond_9
|
|
:goto_6
|
|
move/from16 v22, v8
|
|
|
|
move v8, v7
|
|
|
|
goto/16 :goto_3e
|
|
|
|
:cond_a
|
|
iget v12, v1, Lcom/tencent/smtt/sdk/ag;->q:I
|
|
|
|
const/16 v15, 0x8
|
|
|
|
if-le v12, v15, :cond_b
|
|
|
|
const/16 v2, 0x7b
|
|
|
|
invoke-direct {v1, v2, v9, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, -0x132
|
|
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_b
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v15
|
|
|
|
if-nez v2, :cond_e
|
|
|
|
:try_start_0
|
|
iget-object v12, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v12}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v12
|
|
|
|
iget-object v12, v12, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_downloadstarttime"
|
|
|
|
invoke-interface {v12, v5, v13, v14}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v17
|
|
|
|
const/4 v5, 0x0
|
|
|
|
sub-long v17, v15, v17
|
|
|
|
const-wide/32 v19, 0x5265c00
|
|
|
|
cmp-long v5, v17, v19
|
|
|
|
if-lez v5, :cond_c
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
const-string v12, "[TbsApkDownloader.startDownload] OVER DOWNLOAD_PERIOD"
|
|
|
|
invoke-static {v5, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v12, "tbs_downloadstarttime"
|
|
|
|
invoke-static/range {v15 .. v16}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-interface {v5, v12, v9}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v9, "tbs_downloadflow"
|
|
|
|
invoke-static {v13, v14}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-interface {v5, v9, v12}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
move-wide v3, v13
|
|
|
|
goto :goto_8
|
|
|
|
:cond_c
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v9, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v12, "[TbsApkDownloader.startDownload] downloadFlow="
|
|
|
|
invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-static {v5, v9}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
cmp-long v5, v3, v10
|
|
|
|
if-ltz v5, :cond_d
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
const-string v9, "STEP 1/2 begin downloading...failed because you exceeded max flow!"
|
|
|
|
invoke-static {v5, v9, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v9, 0x70
|
|
|
|
invoke-direct {v1, v9, v5, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v9, -0x133
|
|
|
|
invoke-virtual {v5, v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
:goto_7
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
goto/16 :goto_6
|
|
|
|
:cond_d
|
|
:goto_8
|
|
:try_start_1
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/utils/k;->b(Landroid/content/Context;)Z
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_e
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
const-string v9, "DownloadBegin FreeSpace too small"
|
|
|
|
invoke-static {v5, v9, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v9, 0x69
|
|
|
|
invoke-direct {v1, v9, v5, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v9, -0x134
|
|
|
|
invoke-virtual {v5, v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
goto :goto_7
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
:goto_9
|
|
move-object v3, v0
|
|
|
|
goto/16 :goto_45
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move/from16 v22, v8
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-object v3, v0
|
|
|
|
move v8, v7
|
|
|
|
goto/16 :goto_3d
|
|
|
|
:cond_e
|
|
:try_start_2
|
|
iput-boolean v6, v1, Lcom/tencent/smtt/sdk/ag;->y:Z
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
:try_end_2
|
|
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_17
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
if-eqz v5, :cond_f
|
|
|
|
:try_start_3
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
:try_end_3
|
|
.catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_3} :catch_0
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
goto :goto_a
|
|
|
|
:cond_f
|
|
:try_start_4
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->h:Ljava/lang/String;
|
|
|
|
:goto_a
|
|
const-string v9, "TbsDownload"
|
|
|
|
new-instance v12, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v13, "try url:"
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v13, ",mRetryTimes:"
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget v13, v1, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-static {v9, v12, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->i:Ljava/lang/String;
|
|
|
|
invoke-virtual {v5, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v9
|
|
:try_end_4
|
|
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_17
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
if-nez v9, :cond_10
|
|
|
|
:try_start_5
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v9, v5}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownloadUrl(Ljava/lang/String;)V
|
|
:try_end_5
|
|
.catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_5} :catch_0
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_0
|
|
|
|
:cond_10
|
|
:try_start_6
|
|
iput-object v5, v1, Lcom/tencent/smtt/sdk/ag;->i:Ljava/lang/String;
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/String;)V
|
|
|
|
iget-boolean v5, v1, Lcom/tencent/smtt/sdk/ag;->o:Z
|
|
:try_end_6
|
|
.catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_6} :catch_17
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_0
|
|
|
|
if-nez v5, :cond_12
|
|
|
|
:try_start_7
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->k()J
|
|
|
|
move-result-wide v13
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v9, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v12, "[TbsApkDownloader.startDownload] range="
|
|
|
|
invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-static {v5, v9}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_7
|
|
.catch Ljava/lang/Throwable; {:try_start_7 .. :try_end_7} :catch_3
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_0
|
|
|
|
move/from16 v21, v7
|
|
|
|
:try_start_8
|
|
iget-wide v6, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
:try_end_8
|
|
.catch Ljava/lang/Throwable; {:try_start_8 .. :try_end_8} :catch_2
|
|
.catchall {:try_start_8 .. :try_end_8} :catchall_0
|
|
|
|
const-wide/16 v17, 0x0
|
|
|
|
cmp-long v5, v6, v17
|
|
|
|
if-gtz v5, :cond_11
|
|
|
|
:try_start_9
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "STEP 1/2 begin downloading...current"
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x1
|
|
|
|
invoke-static {v5, v6, v7}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v6, "Range"
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "bytes="
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v9, "-"
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v5, v6, v7}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_9
|
|
.catch Ljava/lang/Throwable; {:try_start_9 .. :try_end_9} :catch_1
|
|
.catchall {:try_start_9 .. :try_end_9} :catchall_0
|
|
|
|
move/from16 v22, v8
|
|
|
|
goto/16 :goto_f
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move/from16 v22, v8
|
|
|
|
goto :goto_c
|
|
|
|
:cond_11
|
|
:try_start_a
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "#1 STEP 1/2 begin downloading...current/total="
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v7, "/"
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
:try_end_a
|
|
.catch Ljava/lang/Throwable; {:try_start_a .. :try_end_a} :catch_2
|
|
.catchall {:try_start_a .. :try_end_a} :catchall_0
|
|
|
|
move/from16 v22, v8
|
|
|
|
:try_start_b
|
|
iget-wide v7, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v6, v7, v8}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x1
|
|
|
|
invoke-static {v5, v6, v7}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v6, "Range"
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, "bytes="
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v8, "-"
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-wide v8, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v7, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v5, v6, v7}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_b
|
|
.catch Ljava/lang/Throwable; {:try_start_b .. :try_end_b} :catch_4
|
|
.catchall {:try_start_b .. :try_end_b} :catchall_0
|
|
|
|
goto :goto_f
|
|
|
|
:catch_2
|
|
move-exception v0
|
|
|
|
move/from16 v22, v8
|
|
|
|
:goto_b
|
|
move-wide/from16 v28, v3
|
|
|
|
:goto_c
|
|
move-wide/from16 v32, v10
|
|
|
|
move/from16 v8, v21
|
|
|
|
goto :goto_e
|
|
|
|
:catch_3
|
|
move-exception v0
|
|
|
|
move/from16 v22, v8
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move v8, v7
|
|
|
|
:goto_d
|
|
move-wide/from16 v32, v10
|
|
|
|
:goto_e
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_3c
|
|
|
|
:cond_12
|
|
move/from16 v21, v7
|
|
|
|
move/from16 v22, v8
|
|
|
|
const-wide/16 v13, 0x0
|
|
|
|
:goto_f
|
|
:try_start_c
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
cmp-long v8, v13, v6
|
|
|
|
if-nez v8, :cond_13
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_10
|
|
|
|
:cond_13
|
|
const/4 v6, 0x1
|
|
|
|
:goto_10
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownloadCancel(I)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v5
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/utils/Apn;->getApnInfo(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
:try_end_c
|
|
.catch Ljava/lang/Throwable; {:try_start_c .. :try_end_c} :catch_16
|
|
.catchall {:try_start_c .. :try_end_c} :catchall_0
|
|
|
|
if-nez v7, :cond_14
|
|
|
|
:try_start_d
|
|
iget v7, v1, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
|
|
const/4 v8, -0x1
|
|
|
|
if-ne v7, v8, :cond_14
|
|
|
|
iput-object v6, v1, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
|
|
iput v5, v1, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
:try_end_d
|
|
.catch Ljava/lang/Throwable; {:try_start_d .. :try_end_d} :catch_4
|
|
.catchall {:try_start_d .. :try_end_d} :catchall_0
|
|
|
|
goto :goto_11
|
|
|
|
:catch_4
|
|
move-exception v0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_14
|
|
:try_start_e
|
|
iget v7, v1, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
:try_end_e
|
|
.catch Ljava/lang/Throwable; {:try_start_e .. :try_end_e} :catch_16
|
|
.catchall {:try_start_e .. :try_end_e} :catchall_0
|
|
|
|
if-ne v5, v7, :cond_15
|
|
|
|
:try_start_f
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v7
|
|
:try_end_f
|
|
.catch Ljava/lang/Throwable; {:try_start_f .. :try_end_f} :catch_4
|
|
.catchall {:try_start_f .. :try_end_f} :catchall_0
|
|
|
|
if-nez v7, :cond_16
|
|
|
|
:cond_15
|
|
:try_start_10
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-virtual {v7, v8}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setNetworkChange(I)V
|
|
|
|
iput-object v6, v1, Lcom/tencent/smtt/sdk/ag;->w:Ljava/lang/String;
|
|
|
|
iput v5, v1, Lcom/tencent/smtt/sdk/ag;->x:I
|
|
|
|
:cond_16
|
|
:goto_11
|
|
iget v5, v1, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
:try_end_10
|
|
.catch Ljava/lang/Throwable; {:try_start_10 .. :try_end_10} :catch_16
|
|
.catchall {:try_start_10 .. :try_end_10} :catchall_0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-lt v5, v6, :cond_17
|
|
|
|
:try_start_11
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v6, "Referer"
|
|
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->h:Ljava/lang/String;
|
|
|
|
invoke-virtual {v5, v6, v7}, Ljava/net/HttpURLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_11
|
|
.catch Ljava/lang/Throwable; {:try_start_11 .. :try_end_11} :catch_4
|
|
.catchall {:try_start_11 .. :try_end_11} :catchall_0
|
|
|
|
:cond_17
|
|
:try_start_12
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getResponseCode()I
|
|
|
|
move-result v5
|
|
|
|
const-string v6, "TbsDownload"
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, "[TbsApkDownloader.startDownload] responseCode="
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v6, v7}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
invoke-virtual {v6, v5}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setHttpCode(I)V
|
|
:try_end_12
|
|
.catch Ljava/lang/Throwable; {:try_start_12 .. :try_end_12} :catch_16
|
|
.catchall {:try_start_12 .. :try_end_12} :catchall_0
|
|
|
|
const/16 v6, 0x6f
|
|
|
|
const/4 v7, 0x3
|
|
|
|
if-nez v2, :cond_1b
|
|
|
|
:try_start_13
|
|
iget-object v8, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v8}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_1b
|
|
|
|
iget-object v8, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v8}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v8
|
|
|
|
if-eq v8, v7, :cond_18
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->getDownloadWithoutWifi()Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_19
|
|
|
|
:cond_18
|
|
iget-object v8, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v8}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_1b
|
|
|
|
:cond_19
|
|
invoke-virtual/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->c()V
|
|
|
|
sget-object v8, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
if-eqz v8, :cond_1a
|
|
|
|
sget-object v8, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v8, v6}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
|
|
:cond_1a
|
|
const-string v8, "TbsDownload"
|
|
|
|
const-string v9, "Download is canceled due to NOT_WIFI error!"
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static {v8, v9, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
:try_end_13
|
|
.catch Ljava/lang/Throwable; {:try_start_13 .. :try_end_13} :catch_4
|
|
.catchall {:try_start_13 .. :try_end_13} :catchall_0
|
|
|
|
:cond_1b
|
|
:try_start_14
|
|
iget-boolean v8, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
:try_end_14
|
|
.catch Ljava/lang/Throwable; {:try_start_14 .. :try_end_14} :catch_16
|
|
.catchall {:try_start_14 .. :try_end_14} :catchall_0
|
|
|
|
if-eqz v8, :cond_1d
|
|
|
|
:try_start_15
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x135
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_15
|
|
.catch Ljava/lang/Throwable; {:try_start_15 .. :try_end_15} :catch_4
|
|
.catchall {:try_start_15 .. :try_end_15} :catchall_0
|
|
|
|
if-nez v2, :cond_1c
|
|
|
|
:goto_12
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_1c
|
|
move/from16 v8, v21
|
|
|
|
goto/16 :goto_3e
|
|
|
|
:cond_1d
|
|
const/16 v8, 0xc8
|
|
|
|
if-eq v5, v8, :cond_2e
|
|
|
|
const/16 v8, 0xce
|
|
|
|
if-ne v5, v8, :cond_1e
|
|
|
|
goto/16 :goto_18
|
|
|
|
:cond_1e
|
|
const/16 v6, 0x12c
|
|
|
|
if-lt v5, v6, :cond_21
|
|
|
|
const/16 v6, 0x133
|
|
|
|
if-gt v5, v6, :cond_21
|
|
|
|
:try_start_16
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v6, "Location"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/net/HttpURLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_20
|
|
|
|
iput-object v5, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
iget v5, v1, Lcom/tencent/smtt/sdk/ag;->q:I
|
|
|
|
const/4 v6, 0x1
|
|
|
|
add-int/2addr v5, v6
|
|
|
|
iput v5, v1, Lcom/tencent/smtt/sdk/ag;->q:I
|
|
:try_end_16
|
|
.catch Ljava/lang/Throwable; {:try_start_16 .. :try_end_16} :catch_4
|
|
.catchall {:try_start_16 .. :try_end_16} :catchall_0
|
|
|
|
if-nez v2, :cond_1f
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v6, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v5, v6, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_1f
|
|
move/from16 v8, v21
|
|
|
|
goto/16 :goto_19
|
|
|
|
:cond_20
|
|
const/16 v5, 0x7c
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:try_start_17
|
|
invoke-direct {v1, v5, v7, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x138
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_17
|
|
.catch Ljava/lang/Throwable; {:try_start_17 .. :try_end_17} :catch_4
|
|
.catchall {:try_start_17 .. :try_end_17} :catchall_0
|
|
|
|
if-nez v2, :cond_1c
|
|
|
|
goto :goto_12
|
|
|
|
:cond_21
|
|
const/16 v6, 0x66
|
|
|
|
:try_start_18
|
|
invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-direct {v1, v6, v7, v8}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
:try_end_18
|
|
.catch Ljava/lang/Throwable; {:try_start_18 .. :try_end_18} :catch_7
|
|
.catchall {:try_start_18 .. :try_end_18} :catchall_0
|
|
|
|
const/16 v6, 0x1a0
|
|
|
|
if-ne v5, v6, :cond_24
|
|
|
|
move/from16 v8, v21
|
|
|
|
const/4 v6, 0x1
|
|
|
|
:try_start_19
|
|
invoke-direct {v1, v6, v8}, Lcom/tencent/smtt/sdk/ag;->c(ZZ)Z
|
|
|
|
move-result v5
|
|
:try_end_19
|
|
.catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_19} :catch_6
|
|
.catchall {:try_start_19 .. :try_end_19} :catchall_0
|
|
|
|
if-eqz v5, :cond_23
|
|
|
|
:try_start_1a
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0xd6
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1a
|
|
.catch Ljava/lang/Throwable; {:try_start_1a .. :try_end_1a} :catch_5
|
|
.catchall {:try_start_1a .. :try_end_1a} :catchall_0
|
|
|
|
if-nez v2, :cond_22
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_22
|
|
const/16 v22, 0x1
|
|
|
|
goto/16 :goto_3e
|
|
|
|
:catch_5
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
const/16 v22, 0x1
|
|
|
|
goto/16 :goto_3c
|
|
|
|
:cond_23
|
|
const/4 v5, 0x0
|
|
|
|
:try_start_1b
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x139
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1b
|
|
.catch Ljava/lang/Throwable; {:try_start_1b .. :try_end_1b} :catch_6
|
|
.catchall {:try_start_1b .. :try_end_1b} :catchall_0
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
:goto_13
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:goto_14
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
goto/16 :goto_3e
|
|
|
|
:catch_6
|
|
move-exception v0
|
|
|
|
goto/16 :goto_17
|
|
|
|
:cond_24
|
|
move/from16 v8, v21
|
|
|
|
const/16 v6, 0x193
|
|
|
|
if-eq v5, v6, :cond_25
|
|
|
|
const/16 v6, 0x196
|
|
|
|
if-ne v5, v6, :cond_26
|
|
|
|
:cond_25
|
|
:try_start_1c
|
|
iget-wide v6, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
const-wide/16 v12, -0x1
|
|
|
|
cmp-long v9, v6, v12
|
|
|
|
if-nez v9, :cond_26
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x13a
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1c
|
|
.catch Ljava/lang/Throwable; {:try_start_1c .. :try_end_1c} :catch_6
|
|
.catchall {:try_start_1c .. :try_end_1c} :catchall_0
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
:goto_15
|
|
goto :goto_13
|
|
|
|
:cond_26
|
|
const/16 v6, 0xca
|
|
|
|
if-ne v5, v6, :cond_27
|
|
|
|
if-nez v2, :cond_30
|
|
|
|
:goto_16
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v6, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v5, v6, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
goto/16 :goto_19
|
|
|
|
:cond_27
|
|
:try_start_1d
|
|
iget v6, v1, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iget v7, v1, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
if-ge v6, v7, :cond_29
|
|
|
|
const/16 v6, 0x1f7
|
|
|
|
if-ne v5, v6, :cond_29
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
const-string v6, "Retry-After"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/net/HttpURLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-direct {v1, v5, v6}, Lcom/tencent/smtt/sdk/ag;->a(J)V
|
|
|
|
iget-boolean v5, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-eqz v5, :cond_28
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x135
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
goto/16 :goto_13
|
|
|
|
:cond_28
|
|
if-nez v2, :cond_30
|
|
|
|
goto :goto_16
|
|
|
|
:cond_29
|
|
iget v6, v1, Lcom/tencent/smtt/sdk/ag;->p:I
|
|
|
|
iget v7, v1, Lcom/tencent/smtt/sdk/ag;->B:I
|
|
|
|
if-ge v6, v7, :cond_2c
|
|
|
|
const/16 v6, 0x198
|
|
|
|
if-eq v5, v6, :cond_2a
|
|
|
|
const/16 v7, 0x1f8
|
|
|
|
if-eq v5, v7, :cond_2a
|
|
|
|
const/16 v7, 0x1f6
|
|
|
|
if-eq v5, v7, :cond_2a
|
|
|
|
if-ne v5, v6, :cond_2c
|
|
|
|
:cond_2a
|
|
const-wide/16 v5, 0x0
|
|
|
|
invoke-direct {v1, v5, v6}, Lcom/tencent/smtt/sdk/ag;->a(J)V
|
|
|
|
iget-boolean v5, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-eqz v5, :cond_2b
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x135
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
goto :goto_15
|
|
|
|
:cond_2b
|
|
if-nez v2, :cond_30
|
|
|
|
goto :goto_16
|
|
|
|
:cond_2c
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->k()J
|
|
|
|
move-result-wide v6
|
|
|
|
const-wide/16 v12, 0x0
|
|
|
|
cmp-long v9, v6, v12
|
|
|
|
if-gtz v9, :cond_2d
|
|
|
|
iget-boolean v6, v1, Lcom/tencent/smtt/sdk/ag;->o:Z
|
|
|
|
if-nez v6, :cond_2d
|
|
|
|
const/16 v6, 0x19a
|
|
|
|
if-eq v5, v6, :cond_2d
|
|
|
|
const/4 v5, 0x1
|
|
|
|
iput-boolean v5, v1, Lcom/tencent/smtt/sdk/ag;->o:Z
|
|
|
|
if-nez v2, :cond_30
|
|
|
|
goto/16 :goto_16
|
|
|
|
:cond_2d
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x13b
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1d
|
|
.catch Ljava/lang/Throwable; {:try_start_1d .. :try_end_1d} :catch_6
|
|
.catchall {:try_start_1d .. :try_end_1d} :catchall_0
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
goto/16 :goto_13
|
|
|
|
:catch_7
|
|
move-exception v0
|
|
|
|
move/from16 v8, v21
|
|
|
|
:goto_17
|
|
move-wide/from16 v28, v3
|
|
|
|
goto/16 :goto_d
|
|
|
|
:cond_2e
|
|
:goto_18
|
|
move/from16 v8, v21
|
|
|
|
:try_start_1e
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getContentLength()I
|
|
|
|
move-result v5
|
|
|
|
int-to-long v6, v5
|
|
|
|
add-long/2addr v6, v13
|
|
|
|
iput-wide v6, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
const-string v5, "TbsDownload"
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "[TbsApkDownloader.startDownload] mContentLength="
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-wide/from16 v23, v13
|
|
|
|
iget-wide v12, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v6, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v5, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
iget-wide v6, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v5, v6, v7}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setPkgSize(J)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v5, v5, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v6, "tbs_apkfilesize"
|
|
|
|
const-wide/16 v12, 0x0
|
|
|
|
invoke-interface {v5, v6, v12, v13}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v5
|
|
:try_end_1e
|
|
.catch Ljava/lang/Throwable; {:try_start_1e .. :try_end_1e} :catch_15
|
|
.catchall {:try_start_1e .. :try_end_1e} :catchall_0
|
|
|
|
cmp-long v7, v5, v12
|
|
|
|
if-eqz v7, :cond_33
|
|
|
|
:try_start_1f
|
|
iget-wide v12, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
cmp-long v7, v12, v5
|
|
|
|
if-eqz v7, :cond_33
|
|
|
|
const-string v7, "TbsDownload"
|
|
|
|
new-instance v9, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v12, "DownloadBegin tbsApkFileSize="
|
|
|
|
invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v12, " but contentLength="
|
|
|
|
invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-wide v12, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v9, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
const/4 v12, 0x1
|
|
|
|
invoke-static {v7, v9, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
if-nez v2, :cond_32
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->n()Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_2f
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->getDownloadWithoutWifi()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_32
|
|
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v7}, Lcom/tencent/smtt/utils/Apn;->isNetworkAvailable(Landroid/content/Context;)Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_32
|
|
|
|
:cond_2f
|
|
iget-object v7, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-eqz v7, :cond_31
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-virtual {v1, v7}, Lcom/tencent/smtt/sdk/ag;->a(Z)Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_31
|
|
|
|
if-nez v2, :cond_30
|
|
|
|
goto/16 :goto_16
|
|
|
|
:cond_30
|
|
:goto_19
|
|
move v7, v8
|
|
|
|
move/from16 v8, v22
|
|
|
|
:goto_1a
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const-wide/16 v13, 0x0
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_31
|
|
const/16 v7, 0x71
|
|
|
|
new-instance v9, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v12, "tbsApkFileSize="
|
|
|
|
invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v5, " but contentLength="
|
|
|
|
invoke-virtual {v9, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-wide v5, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v9, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
invoke-direct {v1, v7, v5, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x136
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
goto :goto_1b
|
|
|
|
:cond_32
|
|
const/16 v5, 0x65
|
|
|
|
const-string v6, "WifiNetworkUnAvailable"
|
|
|
|
const/4 v7, 0x1
|
|
|
|
invoke-direct {v1, v5, v6, v7}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v6, -0x130
|
|
|
|
invoke-virtual {v5, v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_1f
|
|
.catch Ljava/lang/Throwable; {:try_start_1f .. :try_end_1f} :catch_6
|
|
.catchall {:try_start_1f .. :try_end_1f} :catchall_0
|
|
|
|
:goto_1b
|
|
if-nez v2, :cond_50
|
|
|
|
goto/16 :goto_15
|
|
|
|
:cond_33
|
|
:try_start_20
|
|
const-string v5, "TbsDownload"
|
|
|
|
const-string v6, "[TbsApkDownloader.startDownload] begin readResponse"
|
|
|
|
invoke-static {v5, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_20
|
|
.catch Ljava/lang/Throwable; {:try_start_20 .. :try_end_20} :catch_15
|
|
.catchall {:try_start_20 .. :try_end_20} :catchall_0
|
|
|
|
:try_start_21
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object v9
|
|
:try_end_21
|
|
.catch Ljava/io/IOException; {:try_start_21 .. :try_end_21} :catch_13
|
|
.catchall {:try_start_21 .. :try_end_21} :catchall_b
|
|
|
|
if-eqz v9, :cond_47
|
|
|
|
:try_start_22
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->t:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getContentEncoding()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
:try_end_22
|
|
.catch Ljava/io/IOException; {:try_start_22 .. :try_end_22} :catch_11
|
|
.catchall {:try_start_22 .. :try_end_22} :catchall_a
|
|
|
|
if-eqz v5, :cond_34
|
|
|
|
:try_start_23
|
|
const-string v6, "gzip"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_34
|
|
|
|
new-instance v5, Ljava/util/zip/GZIPInputStream;
|
|
|
|
invoke-direct {v5, v9}, Ljava/util/zip/GZIPInputStream;-><init>(Ljava/io/InputStream;)V
|
|
|
|
goto :goto_1e
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:goto_1c
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_31
|
|
|
|
:catch_8
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
:goto_1d
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_32
|
|
|
|
:cond_34
|
|
if-eqz v5, :cond_35
|
|
|
|
const-string v6, "deflate"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_35
|
|
|
|
new-instance v5, Ljava/util/zip/InflaterInputStream;
|
|
|
|
new-instance v6, Ljava/util/zip/Inflater;
|
|
|
|
const/4 v7, 0x1
|
|
|
|
invoke-direct {v6, v7}, Ljava/util/zip/Inflater;-><init>(Z)V
|
|
|
|
invoke-direct {v5, v9, v6}, Ljava/util/zip/InflaterInputStream;-><init>(Ljava/io/InputStream;Ljava/util/zip/Inflater;)V
|
|
:try_end_23
|
|
.catch Ljava/io/IOException; {:try_start_23 .. :try_end_23} :catch_8
|
|
.catchall {:try_start_23 .. :try_end_23} :catchall_1
|
|
|
|
goto :goto_1e
|
|
|
|
:cond_35
|
|
move-object v5, v9
|
|
|
|
:goto_1e
|
|
const/16 v6, 0x2000
|
|
|
|
:try_start_24
|
|
new-array v6, v6, [B
|
|
|
|
new-instance v7, Ljava/io/FileOutputStream;
|
|
|
|
new-instance v12, Ljava/io/File;
|
|
|
|
iget-object v13, v1, Lcom/tencent/smtt/sdk/ag;->k:Ljava/io/File;
|
|
|
|
const-string v14, "x5.tbs.temp"
|
|
|
|
invoke-direct {v12, v13, v14}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
const/4 v13, 0x1
|
|
|
|
invoke-direct {v7, v12, v13}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
|
|
:try_end_24
|
|
.catch Ljava/io/IOException; {:try_start_24 .. :try_end_24} :catch_10
|
|
.catchall {:try_start_24 .. :try_end_24} :catchall_9
|
|
|
|
:try_start_25
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v12
|
|
:try_end_25
|
|
.catch Ljava/io/IOException; {:try_start_25 .. :try_end_25} :catch_f
|
|
.catchall {:try_start_25 .. :try_end_25} :catchall_8
|
|
|
|
move-object/from16 v25, v9
|
|
|
|
move-wide v14, v15
|
|
|
|
move-wide/from16 v17, v23
|
|
|
|
:goto_1f
|
|
:try_start_26
|
|
iget-boolean v9, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
:try_end_26
|
|
.catch Ljava/io/IOException; {:try_start_26 .. :try_end_26} :catch_e
|
|
.catchall {:try_start_26 .. :try_end_26} :catchall_7
|
|
|
|
if-eqz v9, :cond_36
|
|
|
|
:try_start_27
|
|
const-string v6, "TbsDownload"
|
|
|
|
const-string v9, "STEP 1/2 begin downloading...Canceled!"
|
|
|
|
const/4 v12, 0x1
|
|
|
|
invoke-static {v6, v9, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v6
|
|
|
|
const/16 v9, -0x135
|
|
|
|
:goto_20
|
|
invoke-virtual {v6, v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_27
|
|
.catch Ljava/io/IOException; {:try_start_27 .. :try_end_27} :catch_9
|
|
.catchall {:try_start_27 .. :try_end_27} :catchall_2
|
|
|
|
:goto_21
|
|
move-wide/from16 v28, v3
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_22
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_26
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
:goto_23
|
|
move-wide/from16 v32, v10
|
|
|
|
:goto_24
|
|
move-object/from16 v12, v25
|
|
|
|
goto :goto_1c
|
|
|
|
:catch_9
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-object v9, v7
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
goto :goto_1d
|
|
|
|
:cond_36
|
|
const/16 v9, 0x2000
|
|
|
|
move-wide/from16 v26, v12
|
|
|
|
const/4 v12, 0x0
|
|
|
|
:try_start_28
|
|
invoke-virtual {v5, v6, v12, v9}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
move-result v9
|
|
:try_end_28
|
|
.catch Ljava/io/IOException; {:try_start_28 .. :try_end_28} :catch_e
|
|
.catchall {:try_start_28 .. :try_end_28} :catchall_7
|
|
|
|
if-gtz v9, :cond_3a
|
|
|
|
:try_start_29
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-eqz v6, :cond_38
|
|
|
|
const/4 v6, 0x1
|
|
|
|
invoke-direct {v1, v6, v8}, Lcom/tencent/smtt/sdk/ag;->c(ZZ)Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_38
|
|
|
|
if-nez v2, :cond_37
|
|
|
|
invoke-virtual {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Z)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_37
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_22
|
|
|
|
:cond_37
|
|
const/4 v6, 0x1
|
|
|
|
iput-boolean v6, v1, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v11, -0x130
|
|
|
|
const/16 v22, 0x0
|
|
|
|
goto/16 :goto_26
|
|
|
|
:cond_38
|
|
const/4 v6, 0x1
|
|
|
|
iput-boolean v6, v1, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-eqz v6, :cond_39
|
|
|
|
const/16 v22, 0x1
|
|
|
|
:cond_39
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v6
|
|
|
|
const/16 v9, -0x137
|
|
|
|
invoke-virtual {v6, v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_29
|
|
.catch Ljava/io/IOException; {:try_start_29 .. :try_end_29} :catch_9
|
|
.catchall {:try_start_29 .. :try_end_29} :catchall_2
|
|
|
|
goto :goto_21
|
|
|
|
:cond_3a
|
|
:try_start_2a
|
|
invoke-virtual {v7, v6, v12, v9}, Ljava/io/FileOutputStream;->write([BII)V
|
|
|
|
invoke-virtual {v7}, Ljava/io/FileOutputStream;->flush()V
|
|
:try_end_2a
|
|
.catch Ljava/io/IOException; {:try_start_2a .. :try_end_2a} :catch_e
|
|
.catchall {:try_start_2a .. :try_end_2a} :catchall_7
|
|
|
|
if-nez v2, :cond_3c
|
|
|
|
int-to-long v12, v9
|
|
|
|
add-long/2addr v3, v12
|
|
|
|
cmp-long v12, v3, v10
|
|
|
|
if-ltz v12, :cond_3b
|
|
|
|
:try_start_2b
|
|
const-string v6, "TbsDownload"
|
|
|
|
const-string v9, "STEP 1/2 begin downloading...failed because you exceeded max flow!"
|
|
|
|
const/4 v12, 0x1
|
|
|
|
invoke-static {v6, v9, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "downloadFlow="
|
|
|
|
invoke-virtual {v6, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v9, " downloadMaxflow="
|
|
|
|
invoke-virtual {v6, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v10, v11}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v9, 0x1
|
|
|
|
const/16 v12, 0x70
|
|
|
|
invoke-direct {v1, v12, v6, v9}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v6
|
|
|
|
const/16 v13, -0x133
|
|
|
|
invoke-virtual {v6, v13}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
goto/16 :goto_21
|
|
|
|
:cond_3b
|
|
const/16 v13, -0x133
|
|
|
|
iget-object v12, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v12}, Lcom/tencent/smtt/utils/k;->b(Landroid/content/Context;)Z
|
|
|
|
move-result v12
|
|
|
|
if-nez v12, :cond_3d
|
|
|
|
const-string v6, "TbsDownload"
|
|
|
|
const-string v9, "DownloadEnd FreeSpace too small "
|
|
|
|
const/4 v12, 0x1
|
|
|
|
invoke-static {v6, v9, v12}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "freespace="
|
|
|
|
invoke-virtual {v6, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/utils/aa;->a()J
|
|
|
|
move-result-wide v12
|
|
|
|
invoke-virtual {v6, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v9, ",and minFreeSpace="
|
|
|
|
invoke-virtual {v6, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v9}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getDownloadMinFreeSpace()J
|
|
|
|
move-result-wide v12
|
|
|
|
invoke-virtual {v6, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v9, 0x1
|
|
|
|
const/16 v12, 0x69
|
|
|
|
invoke-direct {v1, v12, v6, v9}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v6}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v6
|
|
:try_end_2b
|
|
.catch Ljava/io/IOException; {:try_start_2b .. :try_end_2b} :catch_9
|
|
.catchall {:try_start_2b .. :try_end_2b} :catchall_2
|
|
|
|
const/16 v9, -0x134
|
|
|
|
goto/16 :goto_20
|
|
|
|
:cond_3c
|
|
const/16 v13, -0x133
|
|
|
|
:cond_3d
|
|
move-wide/from16 v28, v3
|
|
|
|
int-to-long v3, v9
|
|
|
|
:try_start_2c
|
|
invoke-direct {v1, v14, v15, v3, v4}, Lcom/tencent/smtt/sdk/ag;->a(JJ)J
|
|
|
|
move-result-wide v14
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v19
|
|
|
|
const/4 v9, 0x0
|
|
|
|
add-long v3, v23, v3
|
|
|
|
sub-long v23, v19, v26
|
|
|
|
const-wide/16 v30, 0x3e8
|
|
|
|
cmp-long v9, v23, v30
|
|
|
|
if-lez v9, :cond_46
|
|
|
|
const-string v9, "TbsDownload"
|
|
|
|
new-instance v12, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v13, "#2 STEP 1/2 begin downloading...current/total="
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v13, "/"
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
:try_end_2c
|
|
.catch Ljava/io/IOException; {:try_start_2c .. :try_end_2c} :catch_d
|
|
.catchall {:try_start_2c .. :try_end_2c} :catchall_6
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
:try_start_2d
|
|
iget-wide v10, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
|
|
invoke-virtual {v12, v10, v11}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
const/4 v11, 0x1
|
|
|
|
invoke-static {v9, v10, v11}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
sget-object v9, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
:try_end_2d
|
|
.catch Ljava/io/IOException; {:try_start_2d .. :try_end_2d} :catch_c
|
|
.catchall {:try_start_2d .. :try_end_2d} :catchall_5
|
|
|
|
if-eqz v9, :cond_3e
|
|
|
|
long-to-double v9, v3
|
|
|
|
:try_start_2e
|
|
iget-wide v11, v1, Lcom/tencent/smtt/sdk/ag;->l:J
|
|
:try_end_2e
|
|
.catch Ljava/io/IOException; {:try_start_2e .. :try_end_2e} :catch_a
|
|
.catchall {:try_start_2e .. :try_end_2e} :catchall_3
|
|
|
|
long-to-double v11, v11
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
invoke-static {v11, v12}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
div-double/2addr v9, v11
|
|
|
|
const-wide/high16 v11, 0x4059000000000000L # 100.0
|
|
|
|
mul-double v9, v9, v11
|
|
|
|
double-to-int v9, v9
|
|
|
|
:try_start_2f
|
|
sget-object v10, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
invoke-interface {v10, v9}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadProgress(I)V
|
|
:try_end_2f
|
|
.catch Ljava/io/IOException; {:try_start_2f .. :try_end_2f} :catch_a
|
|
.catchall {:try_start_2f .. :try_end_2f} :catchall_3
|
|
|
|
goto :goto_25
|
|
|
|
:catchall_3
|
|
move-exception v0
|
|
|
|
move-object v3, v0
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_39
|
|
|
|
:catch_a
|
|
move-exception v0
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v9, v7
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v11, -0x130
|
|
|
|
goto/16 :goto_33
|
|
|
|
:cond_3e
|
|
:goto_25
|
|
if-nez v2, :cond_45
|
|
|
|
sub-long v9, v3, v17
|
|
|
|
const-wide/32 v11, 0x100000
|
|
|
|
cmp-long v13, v9, v11
|
|
|
|
if-lez v13, :cond_45
|
|
|
|
:try_start_30
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v9}, Lcom/tencent/smtt/sdk/TbsDownloader;->getOverSea(Landroid/content/Context;)Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_44
|
|
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v9}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v9
|
|
:try_end_30
|
|
.catch Ljava/io/IOException; {:try_start_30 .. :try_end_30} :catch_c
|
|
.catchall {:try_start_30 .. :try_end_30} :catchall_5
|
|
|
|
const/4 v10, 0x3
|
|
|
|
if-eq v9, v10, :cond_3f
|
|
|
|
:try_start_31
|
|
invoke-static {}, Lcom/tencent/smtt/sdk/QbSdk;->getDownloadWithoutWifi()Z
|
|
|
|
move-result v9
|
|
:try_end_31
|
|
.catch Ljava/io/IOException; {:try_start_31 .. :try_end_31} :catch_a
|
|
.catchall {:try_start_31 .. :try_end_31} :catchall_3
|
|
|
|
if-eqz v9, :cond_40
|
|
|
|
:cond_3f
|
|
:try_start_32
|
|
iget-object v9, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v9}, Lcom/tencent/smtt/utils/Apn;->getApnType(Landroid/content/Context;)I
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_43
|
|
|
|
:cond_40
|
|
invoke-virtual/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->c()V
|
|
|
|
sget-object v3, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
:try_end_32
|
|
.catch Ljava/io/IOException; {:try_start_32 .. :try_end_32} :catch_c
|
|
.catchall {:try_start_32 .. :try_end_32} :catchall_5
|
|
|
|
if-eqz v3, :cond_41
|
|
|
|
:try_start_33
|
|
sget-object v3, Lcom/tencent/smtt/sdk/QbSdk;->l:Lcom/tencent/smtt/sdk/TbsListener;
|
|
|
|
const/16 v9, 0x6f
|
|
|
|
invoke-interface {v3, v9}, Lcom/tencent/smtt/sdk/TbsListener;->onDownloadFinish(I)V
|
|
:try_end_33
|
|
.catch Ljava/io/IOException; {:try_start_33 .. :try_end_33} :catch_a
|
|
.catchall {:try_start_33 .. :try_end_33} :catchall_3
|
|
|
|
:cond_41
|
|
:try_start_34
|
|
const-string v3, "TbsDownload"
|
|
|
|
const-string v4, "Download is paused due to NOT_WIFI error!"
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static {v3, v4, v6}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
:try_end_34
|
|
.catch Ljava/io/IOException; {:try_start_34 .. :try_end_34} :catch_c
|
|
.catchall {:try_start_34 .. :try_end_34} :catchall_5
|
|
|
|
const/16 v11, -0x130
|
|
|
|
:try_start_35
|
|
invoke-virtual {v3, v11}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_35
|
|
.catch Ljava/io/IOException; {:try_start_35 .. :try_end_35} :catch_b
|
|
.catchall {:try_start_35 .. :try_end_35} :catchall_4
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_26
|
|
if-eqz v3, :cond_42
|
|
|
|
:try_start_36
|
|
invoke-direct {v1, v7}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
:try_end_36
|
|
.catch Ljava/lang/Throwable; {:try_start_36 .. :try_end_36} :catch_14
|
|
.catchall {:try_start_36 .. :try_end_36} :catchall_d
|
|
|
|
if-nez v2, :cond_4e
|
|
|
|
goto/16 :goto_38
|
|
|
|
:cond_42
|
|
move-object/from16 v12, v25
|
|
|
|
move/from16 v6, v22
|
|
|
|
move-wide/from16 v3, v28
|
|
|
|
goto/16 :goto_30
|
|
|
|
:catchall_4
|
|
move-exception v0
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
goto/16 :goto_31
|
|
|
|
:catch_b
|
|
move-exception v0
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
goto :goto_2b
|
|
|
|
:cond_43
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v9, 0x6f
|
|
|
|
goto :goto_27
|
|
|
|
:cond_44
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v9, 0x6f
|
|
|
|
const/4 v10, 0x3
|
|
|
|
:goto_27
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v17, v3
|
|
|
|
goto :goto_28
|
|
|
|
:cond_45
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v9, 0x6f
|
|
|
|
const/4 v10, 0x3
|
|
|
|
const/16 v11, -0x130
|
|
|
|
:goto_28
|
|
move-wide/from16 v26, v19
|
|
|
|
goto :goto_29
|
|
|
|
:catchall_5
|
|
move-exception v0
|
|
|
|
goto/16 :goto_24
|
|
|
|
:catch_c
|
|
move-exception v0
|
|
|
|
goto :goto_2a
|
|
|
|
:cond_46
|
|
move-wide/from16 v32, v10
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v9, 0x6f
|
|
|
|
const/4 v10, 0x3
|
|
|
|
const/16 v11, -0x130
|
|
|
|
:goto_29
|
|
move-wide/from16 v23, v3
|
|
|
|
move-object/from16 v25, v12
|
|
|
|
move-wide/from16 v12, v26
|
|
|
|
move-wide/from16 v3, v28
|
|
|
|
move-wide/from16 v10, v32
|
|
|
|
goto/16 :goto_1f
|
|
|
|
:catchall_6
|
|
move-exception v0
|
|
|
|
goto/16 :goto_23
|
|
|
|
:catch_d
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
:goto_2a
|
|
move-object/from16 v12, v25
|
|
|
|
const/16 v11, -0x130
|
|
|
|
:goto_2b
|
|
move-object v3, v0
|
|
|
|
move-object v9, v7
|
|
|
|
goto/16 :goto_33
|
|
|
|
:catchall_7
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
goto :goto_2c
|
|
|
|
:catch_e
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
move-object/from16 v12, v25
|
|
|
|
goto :goto_2d
|
|
|
|
:catchall_8
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
:goto_2c
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
goto/16 :goto_31
|
|
|
|
:catch_f
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
:goto_2d
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move-object v9, v7
|
|
|
|
goto/16 :goto_32
|
|
|
|
:catchall_9
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
goto :goto_2e
|
|
|
|
:catch_10
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
goto :goto_2f
|
|
|
|
:catchall_a
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
:goto_2e
|
|
const/4 v7, 0x0
|
|
|
|
goto :goto_31
|
|
|
|
:catch_11
|
|
move-exception v0
|
|
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
:goto_2f
|
|
const/4 v9, 0x0
|
|
|
|
goto :goto_32
|
|
|
|
:cond_47
|
|
move-object v12, v9
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move/from16 v6, v22
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:goto_30
|
|
:try_start_37
|
|
invoke-direct {v1, v7}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
iget-boolean v5, v1, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
if-nez v5, :cond_48
|
|
|
|
iget-object v5, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v5}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v5
|
|
|
|
const/16 v7, -0x13f
|
|
|
|
invoke-virtual {v5, v7}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_37
|
|
.catch Ljava/lang/Throwable; {:try_start_37 .. :try_end_37} :catch_12
|
|
.catchall {:try_start_37 .. :try_end_37} :catchall_0
|
|
|
|
:cond_48
|
|
if-nez v2, :cond_49
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_49
|
|
move/from16 v22, v6
|
|
|
|
goto/16 :goto_3e
|
|
|
|
:catch_12
|
|
move-exception v0
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
move/from16 v22, v6
|
|
|
|
goto/16 :goto_3c
|
|
|
|
:catchall_b
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
:goto_31
|
|
move-object v3, v0
|
|
|
|
goto/16 :goto_39
|
|
|
|
:catch_13
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move-wide/from16 v28, v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
:goto_32
|
|
move-object v3, v0
|
|
|
|
:goto_33
|
|
:try_start_38
|
|
invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
instance-of v4, v3, Ljava/net/SocketTimeoutException;
|
|
|
|
if-nez v4, :cond_4d
|
|
|
|
instance-of v4, v3, Ljava/net/SocketException;
|
|
|
|
if-eqz v4, :cond_4a
|
|
|
|
goto/16 :goto_37
|
|
|
|
:cond_4a
|
|
if-nez v2, :cond_4b
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/utils/k;->b(Landroid/content/Context;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_4b
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "freespace="
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {}, Lcom/tencent/smtt/utils/aa;->a()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v3, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, ",and minFreeSpace="
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getDownloadMinFreeSpace()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v3, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/16 v6, 0x69
|
|
|
|
invoke-direct {v1, v6, v3, v4}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
const/16 v4, -0x134
|
|
|
|
invoke-virtual {v3, v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_38
|
|
.catchall {:try_start_38 .. :try_end_38} :catchall_c
|
|
|
|
:try_start_39
|
|
invoke-direct {v1, v9}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
:try_end_39
|
|
.catch Ljava/lang/Throwable; {:try_start_39 .. :try_end_39} :catch_14
|
|
.catchall {:try_start_39 .. :try_end_39} :catchall_d
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
:goto_34
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v3, "tbs_downloadflow"
|
|
|
|
invoke-static/range {v28 .. v29}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto/16 :goto_14
|
|
|
|
:cond_4b
|
|
const-wide/16 v6, 0x0
|
|
|
|
:try_start_3a
|
|
invoke-direct {v1, v6, v7}, Lcom/tencent/smtt/sdk/ag;->a(J)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->j()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_4c
|
|
|
|
const/16 v4, 0x6a
|
|
|
|
invoke-direct {v1, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
:goto_35
|
|
invoke-direct {v1, v4, v3, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
goto :goto_36
|
|
|
|
:cond_4c
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v4, 0x68
|
|
|
|
invoke-direct {v1, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
:try_end_3a
|
|
.catchall {:try_start_3a .. :try_end_3a} :catchall_c
|
|
|
|
goto :goto_35
|
|
|
|
:goto_36
|
|
:try_start_3b
|
|
invoke-direct {v1, v9}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
:try_end_3b
|
|
.catch Ljava/lang/Throwable; {:try_start_3b .. :try_end_3b} :catch_14
|
|
.catchall {:try_start_3b .. :try_end_3b} :catchall_d
|
|
|
|
if-nez v2, :cond_4e
|
|
|
|
goto :goto_38
|
|
|
|
:cond_4d
|
|
:goto_37
|
|
const v4, 0x186a0
|
|
|
|
:try_start_3c
|
|
iput v4, v1, Lcom/tencent/smtt/sdk/ag;->m:I
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
invoke-direct {v1, v6, v7}, Lcom/tencent/smtt/sdk/ag;->a(J)V
|
|
|
|
const/16 v4, 0x67
|
|
|
|
invoke-direct {v1, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-direct {v1, v4, v3, v6}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
:try_end_3c
|
|
.catchall {:try_start_3c .. :try_end_3c} :catchall_c
|
|
|
|
:try_start_3d
|
|
invoke-direct {v1, v9}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
:try_end_3d
|
|
.catch Ljava/lang/Throwable; {:try_start_3d .. :try_end_3d} :catch_14
|
|
.catchall {:try_start_3d .. :try_end_3d} :catchall_d
|
|
|
|
if-nez v2, :cond_4e
|
|
|
|
:goto_38
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v3, v3, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v4, "tbs_downloadflow"
|
|
|
|
invoke-static/range {v28 .. v29}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v3, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_4e
|
|
move v7, v8
|
|
|
|
move/from16 v8, v22
|
|
|
|
move-wide/from16 v3, v28
|
|
|
|
move-wide/from16 v10, v32
|
|
|
|
goto/16 :goto_1a
|
|
|
|
:catchall_c
|
|
move-exception v0
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v7, v9
|
|
|
|
:goto_39
|
|
:try_start_3e
|
|
invoke-direct {v1, v7}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v5}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
invoke-direct {v1, v12}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/io/Closeable;)V
|
|
|
|
throw v3
|
|
:try_end_3e
|
|
.catch Ljava/lang/Throwable; {:try_start_3e .. :try_end_3e} :catch_14
|
|
.catchall {:try_start_3e .. :try_end_3e} :catchall_d
|
|
|
|
:catch_14
|
|
move-exception v0
|
|
|
|
goto :goto_3c
|
|
|
|
:catch_15
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
goto :goto_3a
|
|
|
|
:catch_16
|
|
move-exception v0
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
move/from16 v8, v21
|
|
|
|
:goto_3a
|
|
const/16 v11, -0x130
|
|
|
|
goto :goto_3b
|
|
|
|
:catch_17
|
|
move-exception v0
|
|
|
|
move/from16 v22, v8
|
|
|
|
move-wide/from16 v32, v10
|
|
|
|
const/16 v11, -0x130
|
|
|
|
move v8, v7
|
|
|
|
:goto_3b
|
|
move-wide/from16 v28, v3
|
|
|
|
:goto_3c
|
|
move-object v3, v0
|
|
|
|
:goto_3d
|
|
:try_start_3f
|
|
instance-of v4, v3, Ljavax/net/ssl/SSLHandshakeException;
|
|
|
|
if-eqz v4, :cond_4f
|
|
|
|
if-nez v2, :cond_4f
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-eqz v4, :cond_4f
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v4}, Lcom/tencent/smtt/sdk/ag;->a(Z)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_4f
|
|
|
|
const-string v4, "TbsDownload"
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "[startdownload]url:"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v6, v1, Lcom/tencent/smtt/sdk/ag;->j:Ljava/lang/String;
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v6, " download exception\uff1a"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v4, v3}, Lcom/tencent/smtt/utils/TbsLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/16 v3, 0x7d
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-direct {v1, v3, v5, v4}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
goto/16 :goto_44
|
|
|
|
:cond_4f
|
|
const/4 v5, 0x0
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Throwable;->printStackTrace()V
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
invoke-direct {v1, v6, v7}, Lcom/tencent/smtt/sdk/ag;->a(J)V
|
|
|
|
const/16 v4, 0x6b
|
|
|
|
invoke-direct {v1, v3}, Lcom/tencent/smtt/sdk/ag;->a(Ljava/lang/Throwable;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-direct {v1, v4, v3, v9}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
iget-boolean v3, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-eqz v3, :cond_5b
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
const/16 v4, -0x135
|
|
|
|
invoke-virtual {v3, v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_3f
|
|
.catchall {:try_start_3f .. :try_end_3f} :catchall_d
|
|
|
|
if-nez v2, :cond_50
|
|
|
|
goto/16 :goto_34
|
|
|
|
:cond_50
|
|
:goto_3e
|
|
iget-boolean v2, v1, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
if-nez v2, :cond_5a
|
|
|
|
iget-boolean v2, v1, Lcom/tencent/smtt/sdk/ag;->s:Z
|
|
|
|
if-eqz v2, :cond_56
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->b:[Ljava/lang/String;
|
|
|
|
if-nez v2, :cond_51
|
|
|
|
if-nez v22, :cond_51
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v1, v2, v8}, Lcom/tencent/smtt/sdk/ag;->c(ZZ)Z
|
|
|
|
move-result v22
|
|
|
|
:cond_51
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
if-eqz v22, :cond_52
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_3f
|
|
|
|
:cond_52
|
|
const/4 v3, 0x0
|
|
|
|
:goto_3f
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setUnpkgFlag(I)V
|
|
|
|
if-nez v8, :cond_54
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
if-eqz v22, :cond_53
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_40
|
|
|
|
:cond_53
|
|
const/4 v3, 0x2
|
|
|
|
goto :goto_40
|
|
|
|
:cond_54
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_40
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setPatchUpdateFlag(I)V
|
|
|
|
if-eqz v22, :cond_55
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v1, v2}, Lcom/tencent/smtt/sdk/ag;->b(Z)V
|
|
|
|
iget-object v3, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v3
|
|
|
|
const/16 v4, -0x13d
|
|
|
|
invoke-virtual {v3, v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
const/16 v3, 0x64
|
|
|
|
const-string v4, "success"
|
|
|
|
invoke-direct {v1, v3, v4, v2}, Lcom/tencent/smtt/sdk/ag;->a(ILjava/lang/String;Z)V
|
|
|
|
goto :goto_41
|
|
|
|
:cond_55
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, -0x13e
|
|
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v1, v3}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
goto :goto_42
|
|
|
|
:cond_56
|
|
:goto_41
|
|
const/4 v3, 0x0
|
|
|
|
:goto_42
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v22, :cond_57
|
|
|
|
iget-object v4, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_download_success_retrytimes"
|
|
|
|
invoke-interface {v4, v5, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v4
|
|
|
|
iget-object v5, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v6, "tbs_download_success_retrytimes"
|
|
|
|
const/4 v9, 0x1
|
|
|
|
add-int/2addr v4, v9
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v5, v6, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_43
|
|
|
|
:cond_57
|
|
const/4 v9, 0x1
|
|
|
|
iget-object v4, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v5, "tbs_download_failed_retrytimes"
|
|
|
|
invoke-interface {v4, v5, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v4
|
|
|
|
iget-object v5, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v6, "tbs_download_failed_retrytimes"
|
|
|
|
add-int/2addr v4, v9
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v5, v6, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getDownloadFailedMaxRetrytimes()I
|
|
|
|
move-result v5
|
|
|
|
if-ne v4, v5, :cond_58
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
const/4 v10, 0x2
|
|
|
|
invoke-virtual {v4, v10}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownloadCancel(I)V
|
|
|
|
:cond_58
|
|
:goto_43
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->v:Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
if-eqz v22, :cond_59
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:cond_59
|
|
invoke-virtual {v2, v3}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setDownFinalFlag(I)V
|
|
|
|
:cond_5a
|
|
invoke-direct/range {p0 .. p0}, Lcom/tencent/smtt/sdk/ag;->g()V
|
|
|
|
return-void
|
|
|
|
:cond_5b
|
|
const/4 v3, 0x0
|
|
|
|
:goto_44
|
|
const/4 v9, 0x1
|
|
|
|
const/4 v10, 0x2
|
|
|
|
:try_start_40
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v4
|
|
|
|
const/16 v12, -0x13c
|
|
|
|
invoke-virtual {v4, v12}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->setDownloadInterruptCode(I)V
|
|
:try_end_40
|
|
.catchall {:try_start_40 .. :try_end_40} :catchall_d
|
|
|
|
if-nez v2, :cond_5c
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v4, v4, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
const-string v12, "tbs_downloadflow"
|
|
|
|
invoke-static/range {v28 .. v29}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-interface {v4, v12, v13}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v4, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_5c
|
|
move-object v9, v5
|
|
|
|
move-wide v13, v6
|
|
|
|
move v7, v8
|
|
|
|
move/from16 v8, v22
|
|
|
|
move-wide/from16 v3, v28
|
|
|
|
move-wide/from16 v10, v32
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto/16 :goto_5
|
|
|
|
:catchall_d
|
|
move-exception v0
|
|
|
|
goto/16 :goto_9
|
|
|
|
:goto_45
|
|
if-nez v2, :cond_5d
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->a:Ljava/util/Map;
|
|
|
|
invoke-static/range {v28 .. v29}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "tbs_downloadflow"
|
|
|
|
invoke-interface {v2, v5, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v2, v1, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->commit()V
|
|
|
|
:cond_5d
|
|
throw v3
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->r:Z
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsShareManager;->isThirdPartyApp(Landroid/content/Context;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a()Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v2, -0x135
|
|
|
|
invoke-virtual {v1, v2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setErrorCode(I)V
|
|
|
|
new-instance v2, Ljava/lang/Exception;
|
|
|
|
invoke-direct {v2}, Ljava/lang/Exception;-><init>()V
|
|
|
|
invoke-virtual {v1, v2}, Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;->setFailDetail(Ljava/lang/Throwable;)V
|
|
|
|
iget-object v2, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v2}, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->getInstance(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsDownloadConfig;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Lcom/tencent/smtt/sdk/TbsDownloadConfig;->mPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v3, "tbs_downloaddecouplecore"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v2
|
|
|
|
if-ne v2, v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD_DECOUPLE:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v2, v1}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Lcom/tencent/smtt/sdk/TbsLogReport$EventType;Lcom/tencent/smtt/sdk/TbsLogReport$TbsLogInfo;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/tencent/smtt/sdk/ag;->g:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/tencent/smtt/sdk/TbsLogReport;->a(Landroid/content/Context;)Lcom/tencent/smtt/sdk/TbsLogReport;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v2, Lcom/tencent/smtt/sdk/TbsLogReport$EventType;->TYPE_DOWNLOAD:Lcom/tencent/smtt/sdk/TbsLogReport$EventType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public d()V
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/tencent/smtt/sdk/ag;->c()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, v0}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-direct {p0, v0}, Lcom/tencent/smtt/sdk/ag;->c(Z)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public e()Z
|
|
.locals 3
|
|
|
|
const-string v0, "TbsDownload"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "[TbsApkDownloader.isDownloadForeground] mIsDownloadForeground="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-boolean v2, p0, Lcom/tencent/smtt/sdk/ag;->C:Z
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/tencent/smtt/utils/TbsLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-boolean v0, p0, Lcom/tencent/smtt/sdk/ag;->C:Z
|
|
|
|
return v0
|
|
.end method
|