.class public Lcom/baidu/mobads/openad/c/b;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/util/Observer;


# static fields
.field private static a:Landroid/app/NotificationManager; = null

.field private static b:I = 0x276b

.field private static g:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lcom/baidu/mobads/openad/c/b;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private c:Lcom/baidu/mobads/command/a;

.field private d:Landroid/content/Context;

.field private e:Lcom/baidu/mobads/b/b;

.field private f:Ljava/lang/String;

.field private h:Landroid/os/Handler;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 60
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/baidu/mobads/openad/c/b;->g:Ljava/util/HashMap;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/baidu/mobads/command/a;)V
    .locals 3

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

    const/4 v0, 0x0

    .line 50
    iput-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    .line 52
    iput-object v0, p0, Lcom/baidu/mobads/openad/c/b;->e:Lcom/baidu/mobads/b/b;

    const-string v0, ""

    .line 54
    iput-object v0, p0, Lcom/baidu/mobads/openad/c/b;->f:Ljava/lang/String;

    .line 173
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v0, p0, Lcom/baidu/mobads/openad/c/b;->h:Landroid/os/Handler;

    .line 85
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v0

    const-string v1, "OAdApkDownloaderObserver"

    const-string v2, "observer created"

    invoke-interface {v0, v1, v2}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 86
    sget-object v0, Lcom/baidu/mobads/openad/c/b;->a:Landroid/app/NotificationManager;

    if-nez v0, :cond_0

    const-string v0, "notification"

    .line 87
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    sput-object v0, Lcom/baidu/mobads/openad/c/b;->a:Landroid/app/NotificationManager;

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

    move-result-object p1

    iput-object p1, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    .line 90
    iput-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    .line 91
    iget-object p1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object p1, p1, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    invoke-static {p1, p0}, Lcom/baidu/mobads/openad/c/b;->a(Ljava/lang/String;Lcom/baidu/mobads/openad/c/b;)V

    return-void
.end method

.method static synthetic a(Lcom/baidu/mobads/openad/c/b;Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)Landroid/app/Notification;
    .locals 0

    .line 43
    invoke-direct {p0, p1}, Lcom/baidu/mobads/openad/c/b;->b(Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)Landroid/app/Notification;

    move-result-object p0

    return-object p0
.end method

.method static synthetic a(Lcom/baidu/mobads/openad/c/b;)Lcom/baidu/mobads/command/a;
    .locals 0

    .line 43
    iget-object p0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    return-object p0
.end method

.method public static declared-synchronized a(Ljava/lang/String;)Lcom/baidu/mobads/openad/c/b;
    .locals 2

    const-class v0, Lcom/baidu/mobads/openad/c/b;

    monitor-enter v0

    .line 64
    :try_start_0
    sget-object v1, Lcom/baidu/mobads/openad/c/b;->g:Ljava/util/HashMap;

    invoke-virtual {v1, p0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/baidu/mobads/openad/c/b;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object p0

    :catchall_0
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method static synthetic a(Lcom/baidu/mobads/openad/c/b;Ljava/lang/String;)V
    .locals 0

    .line 43
    invoke-direct {p0, p1}, Lcom/baidu/mobads/openad/c/b;->d(Ljava/lang/String;)V

    return-void
.end method

.method public static declared-synchronized a(Ljava/lang/String;Lcom/baidu/mobads/openad/c/b;)V
    .locals 2

    const-class v0, Lcom/baidu/mobads/openad/c/b;

    monitor-enter v0

    .line 72
    :try_start_0
    sget-object v1, Lcom/baidu/mobads/openad/c/b;->g:Ljava/util/HashMap;

    invoke-virtual {v1, p0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 73
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p0

    .line 71
    monitor-exit v0

    throw p0
.end method

.method private b(Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)Landroid/app/Notification;
    .locals 12
    .annotation build Landroid/annotation/TargetApi;
        value = 0x10
    .end annotation

    .line 217
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v0, v0, Lcom/baidu/mobads/command/a;->a:Ljava/lang/String;

    .line 220
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "\u6b63\u5728\u4e0b\u8f7d "

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

    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v2, v2, Lcom/baidu/mobads/command/a;->a:Ljava/lang/String;

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

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

    move-result-object v1

    const-string v2, ""

    .line 228
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v4, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->COMPLETED:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    const v5, 0x1080082

    const v6, 0x1080081

    if-ne v3, v4, :cond_0

    .line 229
    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v3}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v3

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

    const-string v3, ": "

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

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

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

    move-result-object v0

    const-string v2, " \u70b9\u51fb\u8fd9\u91cc\u5b89\u88c5\u5e94\u7528"

    goto/16 :goto_1

    .line 232
    :cond_0
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v4, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->PAUSED:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne v3, v4, :cond_2

    .line 233
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v2, v2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v2}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v2

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

    const-string v2, ": "

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

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

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

    move-result-object v0

    const-string v1, "\u5df2\u4e3a\u60a8\u6682\u505c\u4e0b\u8f7d\uff0c \u70b9\u51fb\u901a\u77e5\u680f\u7ee7\u7eed\u4e0b\u8f7d"

    .line 236
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->isPausedManually()Z

    move-result v2

    if-nez v2, :cond_1

    const-string v2, "\u76ee\u524d\u4e0d\u5728wifi\u7f51\u7edc\u4e0b\uff0c \u70b9\u51fb\u8fd9\u91cc\u7ee7\u7eed\u4e0b\u8f7d"

    goto/16 :goto_1

    :cond_1
    const-string v2, "\u70b9\u51fb\u8fd9\u91cc\u7ee7\u7eed\u4e0b\u8f7d"

    goto/16 :goto_1

    .line 242
    :cond_2
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v4, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->ERROR:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne v3, v4, :cond_3

    .line 243
    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v3}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v3

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

    const-string v3, ": "

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

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

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

    move-result-object v0

    const-string v2, " \u7a0d\u540e\u70b9\u51fb\u8fd9\u91cc\u91cd\u65b0\u4e0b\u8f7d"

    goto :goto_1

    .line 246
    :cond_3
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v4, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->DOWNLOADING:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne v3, v4, :cond_5

    .line 247
    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v3}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v3

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

    const-string v3, ": "

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

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

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

    move-result-object v0

    .line 248
    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "\u4e0b\u8f7d\u8fdb\u5ea6: "

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget v3, v3, Lcom/baidu/mobads/command/a;->e:I

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

    const-string v3, "%  \u5e94\u7528\u5927\u5c0f: "

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->f:Ljava/lang/String;

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

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

    move-result-object v2

    :cond_4
    :goto_0
    const v5, 0x1080081

    goto :goto_1

    .line 249
    :cond_5
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v4, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->INITING:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne v3, v4, :cond_4

    .line 250
    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v3}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v3

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

    const-string v3, ": "

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

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

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

    move-result-object v0

    .line 251
    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v2, v2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v2}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getMessage()Ljava/lang/String;

    move-result-object v2

    goto :goto_0

    .line 254
    :goto_1
    new-instance v3, Landroid/content/Intent;

    iget-object v4, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    const-class v6, Lcom/baidu/mobads/AppActivity;

    invoke-direct {v3, v4, v6}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v4, "dealWithDownload"

    const/4 v6, 0x1

    .line 255
    invoke-virtual {v3, v4, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string v4, "pausedManually"

    .line 256
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->isPausedManually()Z

    move-result p1

    invoke-virtual {v3, v4, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string p1, "status"

    .line 257
    iget-object v4, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v4, v4, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    invoke-virtual {v4}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->getCode()I

    move-result v4

    invoke-virtual {v3, p1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string p1, "pk"

    .line 258
    iget-object v4, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v4, v4, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    invoke-virtual {v3, p1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "localApkPath"

    .line 259
    new-instance v4, Ljava/lang/StringBuilder;

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

    iget-object v7, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v7, v7, Lcom/baidu/mobads/command/a;->c:Ljava/lang/String;

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

    iget-object v7, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v7, v7, Lcom/baidu/mobads/command/a;->b:Ljava/lang/String;

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

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

    move-result-object v4

    invoke-virtual {v3, p1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "title"

    .line 260
    invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const/high16 p1, 0x10000000

    .line 261
    invoke-virtual {v3, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 262
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v7

    invoke-static {v7, v8}, Ljava/lang/Long;->toString(J)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v3, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 263
    iget-object p1, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    iget-object v4, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget v4, v4, Lcom/baidu/mobads/command/a;->f:I

    const/high16 v7, 0x8000000

    invoke-static {p1, v4, v3, v7}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    .line 267
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v4, 0x10

    const/4 v7, 0x0

    if-lt v3, v4, :cond_7

    .line 269
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    if-nez v3, :cond_6

    .line 270
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    new-instance v4, Landroid/app/Notification$Builder;

    iget-object v8, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    invoke-direct {v4, v8}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V

    iput-object v4, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    .line 272
    :cond_6
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    check-cast v3, Landroid/app/Notification$Builder;

    invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setTicker(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    move-result-object p1

    invoke-virtual {p1, v6}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;

    move-result-object p1

    const/16 v0, 0x64

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget v1, v1, Lcom/baidu/mobads/command/a;->e:I

    invoke-virtual {p1, v0, v1, v7}, Landroid/app/Notification$Builder;->setProgress(IIZ)Landroid/app/Notification$Builder;

    move-result-object p1

    invoke-virtual {p1}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification;

    move-result-object p1

    goto :goto_2

    .line 279
    :cond_7
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    if-nez v3, :cond_8

    .line 280
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    new-instance v8, Landroid/app/Notification;

    invoke-direct {v8}, Landroid/app/Notification;-><init>()V

    iput-object v8, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    .line 282
    :cond_8
    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->h:Ljava/lang/Object;

    check-cast v3, Landroid/app/Notification;

    .line 283
    iput v5, v3, Landroid/app/Notification;->icon:I

    .line 284
    iget v5, v3, Landroid/app/Notification;->flags:I

    or-int/2addr v4, v5

    iput v4, v3, Landroid/app/Notification;->flags:I

    .line 285
    iput-object v1, v3, Landroid/app/Notification;->tickerText:Ljava/lang/CharSequence;

    .line 286
    iput-object p1, v3, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;

    .line 289
    :try_start_0
    invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    const-string v4, "setLatestEventInfo"

    const/4 v5, 0x4

    new-array v8, v5, [Ljava/lang/Class;

    const-class v9, Landroid/content/Context;

    aput-object v9, v8, v7

    const-class v9, Ljava/lang/CharSequence;

    aput-object v9, v8, v6

    const-class v9, Ljava/lang/CharSequence;

    const/4 v10, 0x2

    aput-object v9, v8, v10

    const-class v9, Landroid/app/PendingIntent;

    const/4 v11, 0x3

    aput-object v9, v8, v11

    invoke-virtual {v1, v4, v8}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 291
    new-array v4, v5, [Ljava/lang/Object;

    iget-object v5, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    aput-object v5, v4, v7

    aput-object v0, v4, v6

    aput-object v2, v4, v10

    aput-object p1, v4, v11

    invoke-virtual {v1, v3, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-object p1, v3

    :goto_2
    return-object p1
.end method

.method static synthetic b()Landroid/app/NotificationManager;
    .locals 1

    .line 43
    sget-object v0, Lcom/baidu/mobads/openad/c/b;->a:Landroid/app/NotificationManager;

    return-object v0
.end method

.method public static declared-synchronized b(Ljava/lang/String;)Lcom/baidu/mobads/openad/c/b;
    .locals 2

    const-class v0, Lcom/baidu/mobads/openad/c/b;

    monitor-enter v0

    .line 68
    :try_start_0
    sget-object v1, Lcom/baidu/mobads/openad/c/b;->g:Ljava/util/HashMap;

    invoke-virtual {v1, p0}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/baidu/mobads/openad/c/b;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object p0

    :catchall_0
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method public static declared-synchronized c(Ljava/lang/String;)I
    .locals 2

    const-class v0, Lcom/baidu/mobads/openad/c/b;

    monitor-enter v0

    .line 76
    :try_start_0
    sget-object v1, Lcom/baidu/mobads/openad/c/b;->g:Ljava/util/HashMap;

    invoke-virtual {v1, p0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/baidu/mobads/openad/c/b;

    if-eqz p0, :cond_0

    .line 77
    invoke-virtual {p0}, Lcom/baidu/mobads/openad/c/b;->a()Lcom/baidu/mobads/command/a;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 78
    invoke-virtual {p0}, Lcom/baidu/mobads/openad/c/b;->a()Lcom/baidu/mobads/command/a;

    move-result-object p0

    iget p0, p0, Lcom/baidu/mobads/command/a;->f:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return p0

    .line 80
    :cond_0
    :try_start_1
    sget p0, Lcom/baidu/mobads/openad/c/b;->b:I

    add-int/lit8 v1, p0, 0x1

    sput v1, Lcom/baidu/mobads/openad/c/b;->b:I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    monitor-exit v0

    return p0

    :catchall_0
    move-exception p0

    .line 75
    monitor-exit v0

    throw p0
.end method

.method private d(Ljava/lang/String;)V
    .locals 2

    .line 210
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    return-void
.end method


# virtual methods
.method public a()Lcom/baidu/mobads/command/a;
    .locals 1

    .line 57
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    return-object v0
.end method

.method public a(Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)V
    .locals 2

    .line 176
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->h:Landroid/os/Handler;

    new-instance v1, Lcom/baidu/mobads/openad/c/c;

    invoke-direct {v1, p0, p1}, Lcom/baidu/mobads/openad/c/c;-><init>(Lcom/baidu/mobads/openad/c/b;Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 7

    .line 101
    check-cast p1, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;

    .line 102
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getState()Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    move-result-object v0

    iput-object v0, p2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    .line 104
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object p2, p2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v0, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->DOWNLOADING:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-ne p2, v0, :cond_1

    .line 105
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-wide v3, p2, Lcom/baidu/mobads/command/a;->d:J

    const-wide/16 v5, 0x0

    cmp-long p2, v3, v5

    if-gez p2, :cond_0

    .line 106
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p2

    invoke-virtual {p2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object p2

    const-string v0, "OAdApkDownloaderObserver"

    const-string v3, "download update---mExtraInfo.contentLength < 0"

    invoke-interface {p2, v0, v3}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 108
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getFileSize()I

    move-result v0

    int-to-long v3, v0

    iput-wide v3, p2, Lcom/baidu/mobads/command/a;->d:J

    .line 109
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getTargetURL()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p2, Lcom/baidu/mobads/command/a;->k:Ljava/lang/String;

    .line 110
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    invoke-virtual {p2, v0}, Lcom/baidu/mobads/command/a;->a(Landroid/content/Context;)V

    .line 111
    sget-object p2, Ljava/util/Locale;->CHINA:Ljava/util/Locale;

    const-string v0, "%.1fM"

    new-array v2, v2, [Ljava/lang/Object;

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-wide v3, v3, Lcom/baidu/mobads/command/a;->d:J

    long-to-float v3, v3

    const/high16 v4, 0x49800000    # 1048576.0f

    div-float/2addr v3, v4

    invoke-static {v3}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v3

    aput-object v3, v2, v1

    invoke-static {p2, v0, v2}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, p0, Lcom/baidu/mobads/openad/c/b;->f:Ljava/lang/String;

    .line 114
    :cond_0
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getProgress()F

    move-result p2

    const/4 v0, 0x0

    cmpl-float p2, p2, v0

    if-lez p2, :cond_7

    .line 115
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getProgress()F

    move-result p2

    float-to-int p2, p2

    .line 116
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget v0, v0, Lcom/baidu/mobads/command/a;->e:I

    if-le p2, v0, :cond_7

    .line 118
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iput p2, v0, Lcom/baidu/mobads/command/a;->e:I

    .line 119
    invoke-virtual {p0, p1}, Lcom/baidu/mobads/openad/c/b;->a(Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)V

    goto/16 :goto_1

    .line 123
    :cond_1
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object p2, p2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v0, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->COMPLETED:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne p2, v0, :cond_4

    .line 124
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p2

    invoke-virtual {p2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getCommonUtils()Lcom/baidu/mobads/utils/d;

    move-result-object p2

    .line 125
    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v1, v1, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    const/16 v2, 0x210

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v3, v3, Lcom/baidu/mobads/command/a;->p:Ljava/lang/String;

    invoke-virtual {p2, v0, v1, v2, v3}, Lcom/baidu/mobads/utils/d;->sendDownloadAdLog(Landroid/content/Context;Ljava/lang/String;ILjava/lang/String;)V

    .line 127
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p2

    invoke-virtual {p2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object p2

    const-string v0, "OAdApkDownloaderObserver"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "download success-->>"

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

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getOutputPath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, 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-interface {p2, v0, v1}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 129
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-boolean p2, p2, Lcom/baidu/mobads/command/a;->l:Z

    .line 132
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v0

    const-string v1, "OAdApkDownloaderObserver"

    const-string v2, "launch installing ............."

    invoke-interface {v0, v1, v2}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 133
    new-instance v0, Ljava/lang/StringBuilder;

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

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v1, v1, Lcom/baidu/mobads/command/a;->c:Ljava/lang/String;

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

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v1, v1, Lcom/baidu/mobads/command/a;->b:Ljava/lang/String;

    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

    .line 134
    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v1, v1, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    const-string v2, "."

    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 136
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getPackageUtils()Lcom/baidu/mobads/utils/l;

    move-result-object v1

    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/utils/l;->getLocalApkFileInfo(Landroid/content/Context;Ljava/lang/String;)Lcom/baidu/mobads/interfaces/utils/IXAdPackageUtils$ApkInfo;

    move-result-object v1

    .line 138
    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v1, v1, Lcom/baidu/mobads/interfaces/utils/IXAdPackageUtils$ApkInfo;->packageName:Ljava/lang/String;

    iput-object v1, v2, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    .line 140
    :cond_2
    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->e:Lcom/baidu/mobads/b/b;

    if-nez v1, :cond_3

    .line 141
    new-instance v1, Lcom/baidu/mobads/b/a;

    iget-object v2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-direct {v1, v2}, Lcom/baidu/mobads/b/a;-><init>(Lcom/baidu/mobads/command/a;)V

    .line 142
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 143
    new-instance v0, Lcom/baidu/mobads/b/b;

    iget-object v3, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    iget-object v4, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object v4, v4, Lcom/baidu/mobads/command/a;->i:Ljava/lang/String;

    invoke-direct {v0, v3, v4, v2, p2}, Lcom/baidu/mobads/b/b;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/io/File;Z)V

    iput-object v0, p0, Lcom/baidu/mobads/openad/c/b;->e:Lcom/baidu/mobads/b/b;

    .line 144
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->e:Lcom/baidu/mobads/b/b;

    invoke-virtual {p2, v1}, Lcom/baidu/mobads/b/b;->a(Landroid/content/BroadcastReceiver;)V

    .line 145
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->e:Lcom/baidu/mobads/b/b;

    invoke-virtual {p2}, Lcom/baidu/mobads/b/b;->a()V

    .line 151
    :cond_3
    invoke-static {}, Lcom/baidu/mobads/c/a;->a()Lcom/baidu/mobads/c/a;

    move-result-object p2

    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-virtual {p2, v0, v1}, Lcom/baidu/mobads/c/a;->a(Landroid/content/Context;Lcom/baidu/mobads/command/a;)V

    .line 152
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-static {p2}, Lcom/baidu/mobads/command/a/a;->a(Lcom/baidu/mobads/command/a;)Lcom/baidu/mobads/interfaces/download/activate/IXAppInfo;

    move-result-object p2

    if-eqz p2, :cond_6

    .line 154
    invoke-static {}, Lcom/baidu/mobads/production/a;->c()Lcom/baidu/mobads/interfaces/IXAdContainerFactory;

    move-result-object v0

    iget-object v1, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    invoke-static {}, Lcom/baidu/mobads/utils/k;->a()Lcom/baidu/mobads/utils/k;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Lcom/baidu/mobads/interfaces/IXAdContainerFactory;->getXMonitorActivation(Landroid/content/Context;Lcom/baidu/mobads/interfaces/utils/IXAdLogger;)Lcom/baidu/mobads/interfaces/download/activate/IXMonitorActivation;

    move-result-object v0

    invoke-interface {v0, p2}, Lcom/baidu/mobads/interfaces/download/activate/IXMonitorActivation;->addAppInfoForMonitor(Lcom/baidu/mobads/interfaces/download/activate/IXAppInfo;)V

    goto :goto_0

    .line 158
    :cond_4
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object p2, p2, Lcom/baidu/mobads/command/a;->g:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v0, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->ERROR:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne p2, v0, :cond_5

    .line 159
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getTargetURL()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p2, Lcom/baidu/mobads/command/a;->k:Ljava/lang/String;

    .line 160
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p2

    invoke-virtual {p2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object p2

    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/Object;

    const-string v3, "OAdApkDownloaderObserver"

    aput-object v3, v0, v1

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v3, "download failed-->>"

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

    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getOutputPath()Ljava/lang/String;

    move-result-object v3

    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

    aput-object v1, v0, v2

    invoke-interface {p2, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->e([Ljava/lang/Object;)I

    .line 162
    invoke-static {}, Lcom/baidu/mobads/c/a;->a()Lcom/baidu/mobads/c/a;

    move-result-object p2

    iget-object v0, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    invoke-virtual {p2, v0}, Lcom/baidu/mobads/c/a;->a(Lcom/baidu/mobads/command/a;)V

    goto :goto_0

    .line 163
    :cond_5
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;->getState()Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    move-result-object p2

    sget-object v0, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->INITING:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne p2, v0, :cond_6

    .line 165
    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget v0, p2, Lcom/baidu/mobads/command/a;->q:I

    add-int/2addr v0, v2

    iput v0, p2, Lcom/baidu/mobads/command/a;->q:I

    .line 168
    :cond_6
    :goto_0
    invoke-virtual {p0, p1}, Lcom/baidu/mobads/openad/c/b;->a(Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader;)V

    .line 169
    iget-object p1, p0, Lcom/baidu/mobads/openad/c/b;->c:Lcom/baidu/mobads/command/a;

    iget-object p2, p0, Lcom/baidu/mobads/openad/c/b;->d:Landroid/content/Context;

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/command/a;->a(Landroid/content/Context;)V

    :cond_7
    :goto_1
    return-void
.end method
