h.smali

.class public Lcom/huawei/hms/update/a/h;
.super Ljava/lang/Object;
.source "UpdateDownload.java"

# interfaces
.implements Lcom/huawei/hms/update/a/a/a;


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:Lcom/huawei/hms/update/b/d;

.field private c:Lcom/huawei/hms/update/a/a/b;

.field private d:Ljava/io/File;

.field private final e:Lcom/huawei/hms/update/a/a;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3

    .prologue
    .line 53
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 46
    new-instance v0, Lcom/huawei/hms/update/b/b;

    invoke-direct {v0}, Lcom/huawei/hms/update/b/b;-><init>()V

    iput-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    .line 192
    new-instance v0, Lcom/huawei/hms/update/a/a;

    invoke-direct {v0}, Lcom/huawei/hms/update/a/a;-><init>()V

    iput-object v0, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    .line 54
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/huawei/hms/update/a/h;->a:Landroid/content/Context;

    .line 55
    return-void
.end method

.method static synthetic a(Lcom/huawei/hms/update/a/h;)Lcom/huawei/hms/update/a/a;
    .registers 2

    .prologue
    .line 31
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    return-object v0
.end method

.method private a(Ljava/io/File;ILjava/lang/String;)Lcom/huawei/hms/update/a/b;
    .registers 10
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 267
    new-instance v0, Lcom/huawei/hms/update/a/i;

    move-object v1, p0

    move-object v2, p1

    move v3, p2

    move v4, p2

    move-object v5, p3

    invoke-direct/range {v0 .. v5}, Lcom/huawei/hms/update/a/i;-><init>(Lcom/huawei/hms/update/a/h;Ljava/io/File;IILjava/lang/String;)V

    return-object v0
.end method

.method private declared-synchronized a(III)V
    .registers 6

    .prologue
    .line 74
    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->c:Lcom/huawei/hms/update/a/a/b;

    if-eqz v0, :cond_c

    .line 75
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->c:Lcom/huawei/hms/update/a/a/b;

    iget-object v1, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    invoke-interface {v0, p1, p2, p3, v1}, Lcom/huawei/hms/update/a/a/b;->a(IIILjava/io/File;)V
    :try_end_c
    .catchall {:try_start_1 .. :try_end_c} :catchall_e

    .line 77
    :cond_c
    monitor-exit p0

    return-void

    .line 74
    :catchall_e
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private declared-synchronized a(Lcom/huawei/hms/update/a/a/b;)V
    .registers 3

    .prologue
    .line 63
    monitor-enter p0

    :try_start_1
    iput-object p1, p0, Lcom/huawei/hms/update/a/h;->c:Lcom/huawei/hms/update/a/a/b;
    :try_end_3
    .catchall {:try_start_1 .. :try_end_3} :catchall_5

    .line 64
    monitor-exit p0

    return-void

    .line 63
    :catchall_5
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method static synthetic a(Lcom/huawei/hms/update/a/h;III)V
    .registers 4

    .prologue
    .line 31
    invoke-direct {p0, p1, p2, p3}, Lcom/huawei/hms/update/a/h;->a(III)V

    return-void
.end method

.method private static a(Ljava/lang/String;Ljava/io/File;)Z
    .registers 4

    .prologue
    const/4 v0, 0x1

    .line 173
    invoke-static {p1}, Lcom/huawei/hms/c/i;->a(Ljava/io/File;)[B

    move-result-object v1

    .line 175
    if-eqz v1, :cond_12

    invoke-static {v1, v0}, Lcom/huawei/hms/c/d;->b([BZ)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_12

    :goto_11
    return v0

    :cond_12
    const/4 v0, 0x0

    goto :goto_11
.end method


# virtual methods
.method public a()V
    .registers 3

    .prologue
    .line 92
    const-string v0, "UpdateDownload"

    const-string v1, "Enter cancel."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 94
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/huawei/hms/update/a/h;->a(Lcom/huawei/hms/update/a/a/b;)V

    .line 95
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->b()V

    .line 96
    return-void
.end method

.method public a(Lcom/huawei/hms/update/a/a/b;Lcom/huawei/hms/update/a/a/c;)V
    .registers 9

    .prologue
    const/16 v5, 0x89c

    const/16 v3, 0x899

    const/4 v4, 0x0

    .line 105
    const-string v0, "callback must not be null."

    invoke-static {p1, v0}, Lcom/huawei/hms/c/a;->a(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;

    .line 107
    const-string v0, "UpdateDownload"

    const-string v1, "Enter downloadPackage."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 109
    invoke-direct {p0, p1}, Lcom/huawei/hms/update/a/h;->a(Lcom/huawei/hms/update/a/a/b;)V

    .line 112
    if-eqz p2, :cond_1c

    invoke-virtual {p2}, Lcom/huawei/hms/update/a/a/c;->a()Z

    move-result v0

    if-nez v0, :cond_27

    .line 113
    :cond_1c
    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, Invalid update info."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 114
    invoke-direct {p0, v3, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    .line 163
    :goto_26
    return-void

    .line 119
    :cond_27
    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v0

    .line 120
    const-string v1, "mounted"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3e

    .line 121
    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, Invalid external storage for downloading file."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 122
    invoke-direct {p0, v5, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto :goto_26

    .line 126
    :cond_3e
    iget-object v0, p2, Lcom/huawei/hms/update/a/a/c;->b:Ljava/lang/String;

    .line 127
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_51

    .line 128
    const-string v0, "UpdateDownload"

    const-string v1, "In DownloadHelper.downloadPackage, Download the package,  packageName is null: "

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 129
    invoke-direct {p0, v3, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto :goto_26

    .line 133
    :cond_51
    iget-object v1, p0, Lcom/huawei/hms/update/a/h;->a:Landroid/content/Context;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ".apk"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/huawei/hms/update/provider/UpdateProvider;->getLocalFile(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;

    move-result-object v0

    iput-object v0, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    .line 134
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    if-nez v0, :cond_7b

    .line 135
    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, Failed to get local file for downloading."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 136
    invoke-direct {p0, v5, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto :goto_26

    .line 141
    :cond_7b
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    .line 142
    if-eqz v0, :cond_8f

    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v1

    if-nez v1, :cond_9a

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v1

    if-nez v1, :cond_9a

    .line 143
    :cond_8f
    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, Failed to create directory for downloading file."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 144
    invoke-direct {p0, v3, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto :goto_26

    .line 149
    :cond_9a
    invoke-virtual {v0}, Ljava/io/File;->getUsableSpace()J

    move-result-wide v0

    iget v2, p2, Lcom/huawei/hms/update/a/a/c;->d:I

    mul-int/lit8 v2, v2, 0x3

    int-to-long v2, v2

    cmp-long v0, v0, v2

    if-gez v0, :cond_b5

    .line 150
    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, No space for downloading file."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 151
    const/16 v0, 0x89b

    invoke-direct {p0, v0, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto/16 :goto_26

    .line 157
    :cond_b5
    :try_start_b5
    invoke-virtual {p0, p2}, Lcom/huawei/hms/update/a/h;->a(Lcom/huawei/hms/update/a/a/c;)V
    :try_end_b8
    .catch Lcom/huawei/hms/update/b/a; {:try_start_b5 .. :try_end_b8} :catch_ba

    goto/16 :goto_26

    .line 160
    :catch_ba
    move-exception v0

    const-string v0, "UpdateDownload"

    const-string v1, "In downloadPackage, Canceled to download the update file."

    invoke-static {v0, v1}, Lcom/huawei/hms/support/log/a;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 161
    const/16 v0, 0x835

    invoke-direct {p0, v0, v4, v4}, Lcom/huawei/hms/update/a/h;->a(III)V

    goto/16 :goto_26
.end method

.method a(Lcom/huawei/hms/update/a/a/c;)V
    .registers 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/huawei/hms/update/b/a;
        }
    .end annotation

    .prologue
    const/4 v1, 0x0

    .line 200
    const-string v0, "UpdateDownload"

    const-string v2, "Enter downloadPackage."

    invoke-static {v0, v2}, Lcom/huawei/hms/support/log/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 204
    :try_start_8
    iget-object v0, p1, Lcom/huawei/hms/update/a/a/c;->b:Ljava/lang/String;

    .line 205
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_27

    .line 206
    const-string v0, "UpdateDownload"

    const-string v2, "In DownloadHelper.downloadPackage, Download the package,  packageName is null: "

    invoke-static {v0, v2}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 207
    const/16 v0, 0x899

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_1e
    .catch Ljava/io/IOException; {:try_start_8 .. :try_end_1e} :catch_cd
    .catchall {:try_start_8 .. :try_end_1e} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    .line 256
    :goto_26
    return-void

    .line 211
    :cond_27
    :try_start_27
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {p0}, Lcom/huawei/hms/update/a/h;->b()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v2, v3, v0}, Lcom/huawei/hms/update/a/a;->a(Landroid/content/Context;Ljava/lang/String;)V

    .line 213
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    iget-object v3, p1, Lcom/huawei/hms/update/a/a/c;->c:Ljava/lang/String;

    iget v4, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    iget-object v5, p1, Lcom/huawei/hms/update/a/a/c;->e:Ljava/lang/String;

    invoke-virtual {v2, v3, v4, v5}, Lcom/huawei/hms/update/a/a;->b(Ljava/lang/String;ILjava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_f7

    .line 215
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {v2}, Lcom/huawei/hms/update/a/a;->b()I

    move-result v2

    iget-object v3, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {v3}, Lcom/huawei/hms/update/a/a;->a()I

    move-result v3

    if-ne v2, v3, :cond_ba

    .line 217
    iget-object v2, p1, Lcom/huawei/hms/update/a/a/c;->e:Ljava/lang/String;

    iget-object v3, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    invoke-static {v2, v3}, Lcom/huawei/hms/update/a/h;->a(Ljava/lang/String;Ljava/io/File;)Z

    move-result v2

    if-eqz v2, :cond_66

    .line 218
    const/16 v0, 0x7d0

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_5d
    .catch Ljava/io/IOException; {:try_start_27 .. :try_end_5d} :catch_cd
    .catchall {:try_start_27 .. :try_end_5d} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    goto :goto_26

    .line 221
    :cond_66
    :try_start_66
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    iget-object v3, p1, Lcom/huawei/hms/update/a/a/c;->c:Ljava/lang/String;

    iget v4, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    iget-object v5, p1, Lcom/huawei/hms/update/a/a/c;->e:Ljava/lang/String;

    invoke-virtual {v2, v3, v4, v5}, Lcom/huawei/hms/update/a/a;->a(Ljava/lang/String;ILjava/lang/String;)V

    .line 222
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    iget v3, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    invoke-direct {p0, v2, v3, v0}, Lcom/huawei/hms/update/a/h;->a(Ljava/io/File;ILjava/lang/String;)Lcom/huawei/hms/update/a/b;

    move-result-object v1

    .line 235
    :goto_79
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    iget-object v2, p1, Lcom/huawei/hms/update/a/a/c;->c:Ljava/lang/String;

    iget-object v3, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {v3}, Lcom/huawei/hms/update/a/a;->b()I

    move-result v3

    iget-object v4, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {v4}, Lcom/huawei/hms/update/a/a;->a()I

    move-result v4

    invoke-interface {v0, v2, v1, v3, v4}, Lcom/huawei/hms/update/b/d;->a(Ljava/lang/String;Ljava/io/OutputStream;II)I

    move-result v0

    .line 236
    const/16 v2, 0xc8

    if-eq v0, v2, :cond_10c

    const/16 v2, 0xce

    if-eq v0, v2, :cond_10c

    .line 237
    const-string v2, "UpdateDownload"

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "In DownloadHelper.downloadPackage, Download the package, HTTP code: "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 238
    const/16 v0, 0x899

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_b0
    .catch Ljava/io/IOException; {:try_start_66 .. :try_end_b0} :catch_cd
    .catchall {:try_start_66 .. :try_end_b0} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    goto/16 :goto_26

    .line 226
    :cond_ba
    :try_start_ba
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    iget v3, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    invoke-direct {p0, v2, v3, v0}, Lcom/huawei/hms/update/a/h;->a(Ljava/io/File;ILjava/lang/String;)Lcom/huawei/hms/update/a/b;

    move-result-object v1

    .line 227
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    invoke-virtual {v0}, Lcom/huawei/hms/update/a/a;->b()I

    move-result v0

    int-to-long v2, v0

    invoke-virtual {v1, v2, v3}, Lcom/huawei/hms/update/a/b;->a(J)V
    :try_end_cc
    .catch Ljava/io/IOException; {:try_start_ba .. :try_end_cc} :catch_cd
    .catchall {:try_start_ba .. :try_end_cc} :catchall_138

    goto :goto_79

    .line 250
    :catch_cd
    move-exception v0

    .line 251
    :try_start_ce
    const-string v2, "UpdateDownload"

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "In DownloadHelper.downloadPackage, Failed to download."

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Lcom/huawei/hms/support/log/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 252
    const/16 v0, 0x899

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_ed
    .catchall {:try_start_ce .. :try_end_ed} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    goto/16 :goto_26

    .line 230
    :cond_f7
    :try_start_f7
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->e:Lcom/huawei/hms/update/a/a;

    iget-object v3, p1, Lcom/huawei/hms/update/a/a/c;->c:Ljava/lang/String;

    iget v4, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    iget-object v5, p1, Lcom/huawei/hms/update/a/a/c;->e:Ljava/lang/String;

    invoke-virtual {v2, v3, v4, v5}, Lcom/huawei/hms/update/a/a;->a(Ljava/lang/String;ILjava/lang/String;)V

    .line 231
    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    iget v3, p1, Lcom/huawei/hms/update/a/a/c;->d:I

    invoke-direct {p0, v2, v3, v0}, Lcom/huawei/hms/update/a/h;->a(Ljava/io/File;ILjava/lang/String;)Lcom/huawei/hms/update/a/b;

    move-result-object v1

    goto/16 :goto_79

    .line 243
    :cond_10c
    iget-object v0, p1, Lcom/huawei/hms/update/a/a/c;->e:Ljava/lang/String;

    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->d:Ljava/io/File;

    invoke-static {v0, v2}, Lcom/huawei/hms/update/a/h;->a(Ljava/lang/String;Ljava/io/File;)Z

    move-result v0

    if-nez v0, :cond_127

    .line 244
    const/16 v0, 0x89a

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_11d
    .catch Ljava/io/IOException; {:try_start_f7 .. :try_end_11d} :catch_cd
    .catchall {:try_start_f7 .. :try_end_11d} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    goto/16 :goto_26

    .line 248
    :cond_127
    const/16 v0, 0x7d0

    const/4 v2, 0x0

    const/4 v3, 0x0

    :try_start_12b
    invoke-direct {p0, v0, v2, v3}, Lcom/huawei/hms/update/a/h;->a(III)V
    :try_end_12e
    .catch Ljava/io/IOException; {:try_start_12b .. :try_end_12e} :catch_cd
    .catchall {:try_start_12b .. :try_end_12e} :catchall_138

    .line 254
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v0}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    goto/16 :goto_26

    .line 254
    :catchall_138
    move-exception v0

    iget-object v2, p0, Lcom/huawei/hms/update/a/h;->b:Lcom/huawei/hms/update/b/d;

    invoke-interface {v2}, Lcom/huawei/hms/update/b/d;->a()V

    .line 255
    invoke-static {v1}, Lcom/huawei/hms/c/e;->a(Ljava/io/OutputStream;)V

    throw v0
.end method

.method public b()Landroid/content/Context;
    .registers 2

    .prologue
    .line 84
    iget-object v0, p0, Lcom/huawei/hms/update/a/h;->a:Landroid/content/Context;

    return-object v0
.end method