U.smali

.class public Lcom/baidu/sofire/ac/U;
.super Ljava/lang/Thread;
.source "U.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/baidu/sofire/ac/U$UpgradeResult;
    }
.end annotation


# static fields
.field public static final FROM_DAILY_ALARM:I = 0x6

.field public static final FROM_DEFAULT:I = 0x0

.field public static final FROM_HANDLE_REMOVE:I = 0x4

.field public static final FROM_INIT:I = 0x1

.field public static final FROM_INIT_ALARM:I = 0x2

.field public static final FROM_NET_CHANGE:I = 0x3

.field public static final FROM_OUT_FLASH:I = 0x5

.field public static final NETWORK_TYPE_2G:I = 0x1

.field public static final NETWORK_TYPE_3G:I = 0x2

.field public static final NETWORK_TYPE_4G:I = 0x3

.field public static final NETWORK_TYPE_MOBILE:I = 0x5

.field public static final NETWORK_TYPE_UNCONNECTED:I = -0x1

.field public static final NETWORK_TYPE_UNKNOWN:I = -0x2

.field public static final NETWORK_TYPE_WIFI:I = 0x4

.field public static final OUT_AES_FAIL:I = 0x8

.field public static final OUT_FINISH:I = 0x1

.field public static final OUT_NO_INTERNET:I = 0x3

.field public static final OUT_NULL_APPKEY:I = 0x5

.field public static final OUT_NULL_HOST_PKGINFO:I = 0x6

.field public static final OUT_NULL_PLUGIN_JSON:I = 0xa

.field public static final OUT_NULL_RESPONSE_JSON:I = 0x9

.field public static final OUT_OTHER_THROWABLE:I = 0xb

.field public static final OUT_PING_FAIL:I = 0x4

.field public static final OUT_RESPONSE_EMPTY:I = 0x7

.field public static final OUT_TIME_TOO_CLOSE:I = 0x2

.field public static final OUT_UNSET:I = 0x0

.field public static final TYPE_END:I = 0x1

.field public static final TYPE_START:I = 0x0

.field public static final UPGRADE_DECRYPT_FAIL:I = 0x7

.field public static final UPGRADE_DOWNLOAD_FAIL:I = 0x4

.field public static final UPGRADE_ERROR_CRASH_TIMES:I = 0x6

.field public static final UPGRADE_LOAD_FAIL:I = 0x5

.field public static final UPGRADE_MD5_FAIL:I = 0x8

.field public static final UPGRADE_NETWORK_CHECK_FAIL:I = 0x3

.field public static final UPGRADE_RESULT_EXCEPTION:I = 0x2

.field public static final UPGRADE_RESULT_SUCCESS:I = 0x1

.field private static sLastCheckTime:J

.field public static sMonitorNetworkWhenUpgradeNoNet:Z

.field private static volatile sOutGoing:Z

.field private static sPidRegister:Z

.field public static sRealtimeMd5Map:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static sRetryDownoadHostCareApksTimesCount:I

.field private static sRetryPingTimesCount:I

.field private static sSetRetrmAlarm:Z


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

.field private forHostAPP:Lcom/baidu/sofire/core/d;

.field private loadedPluginDB:Lcom/baidu/sofire/c/a;

.field private mCloudKeyMap:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field mDownloadPluginsList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private mEndReason:I

.field private mFrom:I

.field private mOut:Z

.field private mStartKeyMap:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mStartNetwork:I

.field mUnloadPluginsList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private mUpgradeResultMap:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/Integer;",
            "Lcom/baidu/sofire/ac/U$UpgradeResult;",
            ">;"
        }
    .end annotation
.end field

.field private mWholeJson:Lorg/json/JSONObject;

.field private preference:Lcom/baidu/sofire/e;

.field private tmpDir:Ljava/io/File;


# direct methods
.method static constructor <clinit>()V
    .registers 3

    .prologue
    const/4 v2, 0x0

    .line 97
    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/baidu/sofire/ac/U;->sLastCheckTime:J

    .line 98
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z

    .line 99
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sPidRegister:Z

    .line 104
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    .line 105
    sput v2, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    .line 106
    sput v2, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    .line 107
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    .prologue
    const/4 v0, 0x0

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

    .line 101
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 102
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 103
    iput-boolean v0, p0, Lcom/baidu/sofire/ac/U;->mOut:Z

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    .line 111
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    .line 112
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    .line 114
    const/4 v0, -0x2

    iput v0, p0, Lcom/baidu/sofire/ac/U;->mStartNetwork:I

    .line 155
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;IZ)V
    .registers 7

    .prologue
    const/4 v0, 0x0

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

    .line 101
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 102
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 103
    iput-boolean v0, p0, Lcom/baidu/sofire/ac/U;->mOut:Z

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    .line 111
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    .line 112
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    .line 114
    const/4 v0, -0x2

    iput v0, p0, Lcom/baidu/sofire/ac/U;->mStartNetwork:I

    .line 134
    iput-object p1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    .line 135
    invoke-static {p1}, Lcom/baidu/sofire/c/a;->a(Landroid/content/Context;)Lcom/baidu/sofire/c/a;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    .line 136
    new-instance v0, Lcom/baidu/sofire/e;

    invoke-direct {v0, p1}, Lcom/baidu/sofire/e;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 137
    invoke-static {p1}, Lcom/baidu/sofire/core/d;->a(Landroid/content/Context;)Lcom/baidu/sofire/core/d;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    .line 138
    new-instance v0, Ljava/io/File;

    invoke-virtual {p1}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v1

    const-string v2, ".tmp"

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

    .line 139
    iput p2, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 140
    iput-boolean p3, p0, Lcom/baidu/sofire/ac/U;->mOut:Z

    .line 141
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;IZLorg/json/JSONObject;)V
    .registers 8

    .prologue
    const/4 v0, 0x0

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

    .line 101
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 102
    iput v0, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 103
    iput-boolean v0, p0, Lcom/baidu/sofire/ac/U;->mOut:Z

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    .line 111
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    .line 112
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

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

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    .line 114
    const/4 v0, -0x2

    iput v0, p0, Lcom/baidu/sofire/ac/U;->mStartNetwork:I

    .line 144
    iput-object p1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    .line 145
    invoke-static {p1}, Lcom/baidu/sofire/c/a;->a(Landroid/content/Context;)Lcom/baidu/sofire/c/a;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    .line 146
    new-instance v0, Lcom/baidu/sofire/e;

    invoke-direct {v0, p1}, Lcom/baidu/sofire/e;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 147
    invoke-static {p1}, Lcom/baidu/sofire/core/d;->a(Landroid/content/Context;)Lcom/baidu/sofire/core/d;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    .line 148
    new-instance v0, Ljava/io/File;

    invoke-virtual {p1}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v1

    const-string v2, ".tmp"

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

    .line 149
    iput p2, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 150
    iput-boolean p3, p0, Lcom/baidu/sofire/ac/U;->mOut:Z

    .line 151
    iput-object p4, p0, Lcom/baidu/sofire/ac/U;->mWholeJson:Lorg/json/JSONObject;

    .line 152
    return-void
.end method

.method static synthetic access$000(Lcom/baidu/sofire/ac/U;Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;Ljava/io/File;I)Z
    .registers 6

    .prologue
    .line 44
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/baidu/sofire/ac/U;->handlePluginDownload(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;Ljava/io/File;I)Z

    move-result v0

    return v0
.end method

.method static synthetic access$100(Lcom/baidu/sofire/ac/U;Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;ILjava/util/List;)V
    .registers 5

    .prologue
    .line 44
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/baidu/sofire/ac/U;->handlePluginDownError(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;ILjava/util/List;)V

    return-void
.end method

.method static synthetic access$200(Lcom/baidu/sofire/ac/U;)Lcom/baidu/sofire/c/a;
    .registers 2

    .prologue
    .line 44
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    return-object v0
.end method

.method private handlePluginDownError(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;ILjava/util/List;)V
    .registers 15
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/sofire/core/ApkInfo;",
            "Ljava/io/File;",
            "I",
            "Ljava/util/List",
            "<",
            "Ljava/lang/Integer;",
            ">;)V"
        }
    .end annotation

    .prologue
    const-wide/16 v8, 0x0

    const/4 v4, 0x1

    const/4 v6, 0x0

    .line 925
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_2c

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 926
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2c

    .line 927
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 928
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    new-instance v2, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/16 v3, 0x8

    invoke-direct {v2, p0, p3, v3}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 930
    :cond_2c
    iget v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    if-eq v0, v4, :cond_3a

    iget v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v1, 0x2

    if-eq v0, v1, :cond_3a

    iget v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_7e

    .line 931
    :cond_3a
    if-eqz p4, :cond_5b

    iget v0, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    invoke-interface {p4, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5b

    sget-boolean v0, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    if-nez v0, :cond_5b

    .line 933
    sput-boolean v4, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    .line 934
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget v1, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    invoke-static {v0, v1, v6}, Lcom/baidu/sofire/i/b;->a(Landroid/content/Context;IZ)V

    .line 936
    sget v0, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    add-int/lit8 v0, v0, 0x1

    sput v0, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    .line 938
    :cond_5b
    sget-boolean v0, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    if-nez v0, :cond_7e

    .line 939
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 941
    sget-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    if-nez v1, :cond_ea

    .line 942
    new-instance v1, Lcom/baidu/sofire/MyReceiver;

    invoke-direct {v1}, Lcom/baidu/sofire/MyReceiver;-><init>()V

    invoke-virtual {v1}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    move-result-object v1

    sput-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    .line 946
    :goto_75
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget-object v2, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-static {v1, v2, v0}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Z

    .line 947
    sput-boolean v4, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

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

    move-result-wide v2

    iget-object v4, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 7154
    iget-object v0, v4, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    const-string v1, "pu_ap_fd"

    invoke-interface {v0, v1, v8, v9}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    .line 7155
    cmp-long v5, v0, v8

    if-nez v5, :cond_97

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

    move-result-wide v0

    .line 7157
    invoke-virtual {v4}, Lcom/baidu/sofire/e;->d()V

    .line 952
    :cond_97
    sub-long v0, v2, v0

    const-wide/32 v2, 0x5265c00

    cmp-long v0, v0, v2

    if-lez v0, :cond_111

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

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

    .line 955
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/sofire/i/d;->e(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_f0

    .line 956
    const-string v1, "0"

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->e()I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 957
    const-string v1, "1"

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->f()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 962
    :goto_cd
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1, v6}, Lcom/baidu/sofire/e;->a(I)V

    .line 963
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1, v6}, Lcom/baidu/sofire/e;->b(I)V

    .line 964
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1}, Lcom/baidu/sofire/e;->d()V

    .line 965
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    const-string v2, "1003116"

    invoke-static {v1, v2, v0}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V

    .line 974
    :goto_e3
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 975
    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    .line 976
    return-void

    .line 944
    :cond_ea
    sget-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-virtual {v1}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    goto :goto_75

    .line 959
    :cond_f0
    const-string v1, "0"

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->e()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 960
    const-string v1, "1"

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->f()I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_cd

    .line 967
    :cond_111
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/baidu/sofire/i/d;->e(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_127

    .line 968
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1}, Lcom/baidu/sofire/e;->e()I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/e;->a(I)V

    goto :goto_e3

    .line 970
    :cond_127
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1}, Lcom/baidu/sofire/e;->f()I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/e;->b(I)V

    goto :goto_e3
.end method

.method private handlePluginDownload(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;Ljava/io/File;I)Z
    .registers 11

    .prologue
    const/4 v1, 0x0

    .line 853
    :try_start_1
    invoke-virtual {p2}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_a

    .line 854
    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    .line 856
    :cond_a
    const-string v0, "com.baidu.input_huawei"

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

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

    move-result v0

    if-eqz v0, :cond_21

    .line 857
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v0}, Lcom/baidu/sofire/e;->B()Z

    move-result v0

    if-nez v0, :cond_21

    .line 919
    :cond_20
    :goto_20
    return v1

    .line 862
    :cond_21
    new-instance v0, Lcom/baidu/sofire/i/m;

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-direct {v0, v2}, Lcom/baidu/sofire/i/m;-><init>(Landroid/content/Context;)V

    iget-object v2, p1, Lcom/baidu/sofire/core/ApkInfo;->downloadURL:Ljava/lang/String;

    invoke-virtual {v0, v2, p2}, Lcom/baidu/sofire/i/m;->a(Ljava/lang/String;Ljava/io/File;)Z

    move-result v0

    .line 864
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 867
    if-eqz v0, :cond_f5

    .line 868
    invoke-virtual {p3}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_3f

    .line 869
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 870
    invoke-virtual {p3}, Ljava/io/File;->delete()Z

    .line 873
    :cond_3f
    new-instance v2, Lcom/baidu/sofire/jni/Asc;

    invoke-direct {v2}, Lcom/baidu/sofire/jni/Asc;-><init>()V

    .line 875
    iget-object v3, p1, Lcom/baidu/sofire/core/ApkInfo;->signMD5:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    .line 876
    iget-object v4, p1, Lcom/baidu/sofire/core/ApkInfo;->signMD5:Ljava/lang/String;

    const/4 v5, 0x0

    div-int/lit8 v3, v3, 0x2

    invoke-virtual {v4, v5, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    .line 877
    const-string v4, "utf-8"

    invoke-virtual {v3, v4}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v3

    .line 878
    const-string v4, "12"

    invoke-static {v4}, Lcom/baidu/sofire/i/d;->e(Ljava/lang/String;)V

    .line 879
    invoke-static {p2, p3, v3}, Lcom/baidu/sofire/i/a;->a(Ljava/io/File;Ljava/io/File;[B)I

    move-result v4

    .line 880
    if-eqz v4, :cond_b3

    .line 881
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 882
    invoke-virtual {p3}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_70

    .line 883
    invoke-virtual {p3}, Ljava/io/File;->delete()Z

    .line 886
    :cond_70
    const-string v4, "13"

    invoke-static {v4}, Lcom/baidu/sofire/i/d;->e(Ljava/lang/String;)V

    .line 887
    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v2, v4, v5, v3}, Lcom/baidu/sofire/jni/Asc;->df(Ljava/lang/String;Ljava/lang/String;[B)I

    move-result v2

    .line 888
    if-eqz v2, :cond_b3

    .line 889
    const-string v0, "14"

    invoke-static {v0}, Lcom/baidu/sofire/i/d;->e(Ljava/lang/String;)V

    .line 890
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 891
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_b2

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    iget v2, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 892
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_b2

    .line 893
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v2, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    new-instance v3, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/4 v4, 0x7

    invoke-direct {v3, p0, p4, v4}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_b2
    move v0, v1

    .line 908
    :cond_b3
    :goto_b3
    new-instance v2, Ljava/lang/StringBuilder;

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 909
    invoke-static {p3}, Lcom/baidu/sofire/i/o;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object v2

    .line 910
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "ds="

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

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

    move-result-object v3

    const-string v4, ", fm="

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

    move-result-object v3

    iget-object v4, p1, Lcom/baidu/sofire/core/ApkInfo;->apkMD5:Ljava/lang/String;

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

    move-result-object v3

    const-string v4, ", am="

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

    move-result-object v3

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 912
    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    .line 913
    if-eqz v0, :cond_20

    iget-object v0, p1, Lcom/baidu/sofire/core/ApkInfo;->apkMD5:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_20

    .line 914
    const/4 v1, 0x1

    goto/16 :goto_20

    .line 901
    :cond_f5
    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v2, :cond_b3

    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v2}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v2

    iget v3, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 902
    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_b3

    .line 903
    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v3, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    new-instance v4, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/4 v5, 0x4

    invoke-direct {v4, p0, p4, v5}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v2, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_11c
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_11c} :catch_11d

    goto :goto_b3

    .line 917
    :catch_11d
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto/16 :goto_20
.end method

.method private handlePluginUpgrade(Lcom/baidu/sofire/core/ApkInfo;)V
    .registers 16

    .prologue
    const/4 v13, 0x3

    const/4 v12, 0x2

    const v11, 0x989680

    const/4 v7, 0x1

    const/4 v8, 0x0

    .line 980
    :try_start_7
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/baidu/sofire/i/d;->k(Landroid/content/Context;)I

    move-result v5

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

    const-string v1, "a="

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 982
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v0}, Lcom/baidu/sofire/e;->r()Ljava/util/List;

    move-result-object v6

    .line 983
    iget v0, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    invoke-interface {v6, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5e

    .line 984
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->network:I

    invoke-static {v0, v1}, Lcom/baidu/sofire/i/d;->b(Landroid/content/Context;I)Z

    move-result v0

    .line 985
    if-nez v0, :cond_5e

    .line 986
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_5d

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 987
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5d

    .line 988
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    new-instance v2, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/4 v3, 0x3

    invoke-direct {v2, p0, v5, v3}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 1175
    :cond_5d
    :goto_5d
    return-void

    .line 994
    :cond_5e
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

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

    move-result v0

    if-nez v0, :cond_6b

    .line 995
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

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

    .line 997
    :cond_6b
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    add-int/2addr v1, v11

    .line 998
    invoke-virtual {v0, v1}, Lcom/baidu/sofire/c/a;->a(I)Lcom/baidu/sofire/core/ApkInfo;

    move-result-object v10

    .line 999
    new-instance v3, Ljava/io/File;

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

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

    iget v2, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v1

    const-string v2, "-"

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

    move-result-object v1

    iget-object v2, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v1

    const-string v2, ".tmp"

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

    move-result-object v1

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

    move-result-object v1

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

    .line 1000
    new-instance v4, Ljava/io/File;

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

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

    iget v2, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v1

    const-string v2, "-"

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

    move-result-object v1

    iget-object v2, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v1

    const-string v2, ".zip"

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

    move-result-object v1

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

    move-result-object v1

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

    .line 1005
    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_2e8

    .line 1007
    invoke-static {v4}, Lcom/baidu/sofire/i/o;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object v0

    .line 1008
    iget-object v1, p1, Lcom/baidu/sofire/core/ApkInfo;->apkMD5:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_1b8

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

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

    iget-object v1, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v0

    const-string v1, " exists! "

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

    move-result-object v0

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    move v0, v8

    move v9, v7

    .line 1016
    :goto_f1
    if-eqz v0, :cond_2e4

    .line 1017
    iget-boolean v0, p1, Lcom/baidu/sofire/core/ApkInfo;->isNextLoad:Z

    if-eqz v0, :cond_1cf

    .line 1019
    new-instance v0, Lcom/baidu/sofire/ac/U$2;

    move-object v1, p0

    move-object v2, p1

    invoke-direct/range {v0 .. v6}, Lcom/baidu/sofire/ac/U$2;-><init>(Lcom/baidu/sofire/ac/U;Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;Ljava/io/File;ILjava/util/List;)V

    .line 1044
    invoke-virtual {v0}, Lcom/baidu/sofire/ac/U$2;->start()V

    move v2, v8

    move v0, v9

    .line 1060
    :goto_103
    if-eqz v0, :cond_209

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

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

    iget-object v1, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v0

    const-string v1, " "

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

    move-result-object v0

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1063
    invoke-direct {p0, v4, p1, v5}, Lcom/baidu/sofire/ac/U;->pluginUpdate(Ljava/io/File;Lcom/baidu/sofire/core/ApkInfo;I)V

    .line 1129
    :cond_121
    :goto_121
    if-eqz v2, :cond_5d

    .line 1131
    invoke-direct {p0, p1, v4, v5, v6}, Lcom/baidu/sofire/ac/U;->handlePluginDownError(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;ILjava/util/List;)V
    :try_end_126
    .catch Ljava/lang/Throwable; {:try_start_7 .. :try_end_126} :catch_128

    goto/16 :goto_5d

    .line 1135
    :catch_128
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    .line 1137
    :try_start_12c
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_159

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 1138
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_159

    .line 1139
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/baidu/sofire/i/d;->k(Landroid/content/Context;)I

    move-result v0

    .line 1140
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v2, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    new-instance v3, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/4 v4, 0x2

    invoke-direct {v3, p0, v0, v4}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_159
    .catch Ljava/lang/Throwable; {:try_start_12c .. :try_end_159} :catch_2cf

    .line 1147
    :cond_159
    :goto_159
    :try_start_159
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v0}, Lcom/baidu/sofire/e;->r()Ljava/util/List;

    move-result-object v0

    .line 1148
    iget v1, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    if-eq v1, v7, :cond_16b

    iget v1, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    if-eq v1, v12, :cond_16b

    iget v1, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    if-ne v1, v13, :cond_5d

    .line 1149
    :cond_16b
    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_18c

    sget-boolean v0, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    if-nez v0, :cond_18c

    .line 1151
    const/4 v0, 0x1

    sput-boolean v0, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    .line 1152
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget v1, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Lcom/baidu/sofire/i/b;->a(Landroid/content/Context;IZ)V

    .line 1154
    sget v0, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    add-int/lit8 v0, v0, 0x1

    sput v0, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    .line 1156
    :cond_18c
    sget-boolean v0, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    if-nez v0, :cond_5d

    .line 1157
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 1159
    sget-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    if-nez v1, :cond_2d5

    .line 1160
    new-instance v1, Lcom/baidu/sofire/MyReceiver;

    invoke-direct {v1}, Lcom/baidu/sofire/MyReceiver;-><init>()V

    invoke-virtual {v1}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    move-result-object v1

    sput-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    .line 1164
    :goto_1a6
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget-object v2, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-static {v1, v2, v0}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Z

    .line 1166
    const/4 v0, 0x1

    sput-boolean v0, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z
    :try_end_1b0
    .catch Ljava/lang/Throwable; {:try_start_159 .. :try_end_1b0} :catch_1b2

    goto/16 :goto_5d

    .line 1171
    :catch_1b2
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto/16 :goto_5d

    .line 1013
    :cond_1b8
    :try_start_1b8
    new-instance v0, Ljava/lang/StringBuilder;

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

    iget-object v1, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v0

    const-string v1, " exists! but mdf "

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

    move v0, v7

    move v9, v8

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    goto/16 :goto_f1

    .line 1046
    :cond_1cf
    invoke-direct {p0, p1, v3, v4, v5}, Lcom/baidu/sofire/ac/U;->handlePluginDownload(Lcom/baidu/sofire/core/ApkInfo;Ljava/io/File;Ljava/io/File;I)Z

    move-result v1

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

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1048
    if-nez v1, :cond_207

    move v0, v7

    .line 1049
    :goto_1e1
    if-eqz v10, :cond_203

    .line 1050
    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v3, v10, Lcom/baidu/sofire/core/ApkInfo;->key:I

    add-int/2addr v3, v11

    invoke-virtual {v2, v3}, Lcom/baidu/sofire/c/a;->h(I)V

    .line 1051
    iget-object v2, v10, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_203

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

    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

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

    .line 1053
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_203

    .line 1054
    invoke-virtual {v2}, Ljava/io/File;->delete()Z

    :cond_203
    move v2, v0

    move v0, v1

    goto/16 :goto_103

    :cond_207
    move v0, v8

    .line 1048
    goto :goto_1e1

    .line 1068
    :cond_209
    if-eqz v10, :cond_2e2

    .line 1069
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1070
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/c/a;->a(I)Lcom/baidu/sofire/core/ApkInfo;

    move-result-object v0

    .line 1071
    if-eqz v0, :cond_225

    .line 1073
    iget-object v1, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    iget-object v0, v0, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    .line 1074
    invoke-static {v1, v0}, Lcom/baidu/sofire/i/d;->b(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2df

    .line 1075
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    :cond_225
    move v0, v7

    .line 1081
    :goto_226
    iget-object v1, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_2dc

    .line 1082
    iget-object v1, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    iget-object v3, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result v1

    if-eqz v1, :cond_2dc

    .line 1083
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1085
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v1, v10, Lcom/baidu/sofire/core/ApkInfo;->key:I

    add-int/2addr v1, v11

    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v0, v1, v3}, Lcom/baidu/sofire/c/a;->a(ILjava/lang/String;)V

    move v1, v8

    .line 1090
    :goto_246
    const/4 v0, 0x0

    .line 1091
    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_256

    .line 1092
    new-instance v0, Ljava/io/File;

    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

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

    .line 1094
    :cond_256
    if-eqz v0, :cond_2cd

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

    move-result v3

    if-eqz v3, :cond_2cd

    if-eqz v1, :cond_2cd

    .line 1096
    invoke-static {v0}, Lcom/baidu/sofire/i/o;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object v1

    .line 1097
    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->apkMD5:Ljava/lang/String;

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

    move-result v1

    if-eqz v1, :cond_2be

    .line 1098
    iget v1, v10, Lcom/baidu/sofire/core/ApkInfo;->key:I

    sub-int/2addr v1, v11

    iput v1, v10, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 1099
    iget-object v1, v10, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_28a

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

    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

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

    .line 1101
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->reverse()Ljava/lang/StringBuilder;

    move-result-object v1

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

    move-result-object v1

    iput-object v1, v10, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    .line 1103
    :cond_28a
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget-object v3, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1105
    invoke-direct {p0, v0, v10, v5}, Lcom/baidu/sofire/ac/U;->pluginUpdate(Ljava/io/File;Lcom/baidu/sofire/core/ApkInfo;I)V

    move v0, v7

    .line 1117
    :goto_29b
    if-nez v0, :cond_121

    .line 1118
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 1119
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

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

    move-result-object v0

    invoke-static {v0}, Lcom/baidu/sofire/core/g;->a(Landroid/content/Context;)Lcom/baidu/sofire/core/g;

    move-result-object v0

    .line 1122
    iget-object v1, p1, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    .line 1123
    invoke-virtual {v0, v1}, Lcom/baidu/sofire/core/g;->d(Ljava/lang/String;)Lcom/baidu/sofire/core/ApkInfo;

    move-result-object v0

    .line 1124
    if-nez v0, :cond_121

    .line 1125
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    iget v1, p1, Lcom/baidu/sofire/core/ApkInfo;->key:I

    iget-object v3, p1, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    const/4 v8, 0x0

    invoke-virtual {v0, v1, v3, v8}, Lcom/baidu/sofire/core/d;->a(ILjava/lang/String;Landroid/content/pm/PackageInfo;)Z

    goto/16 :goto_121

    .line 1108
    :cond_2be
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v3, v10, Lcom/baidu/sofire/core/ApkInfo;->key:I

    add-int/2addr v3, v11

    iget-object v9, v10, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v1, v3, v9}, Lcom/baidu/sofire/c/a;->a(ILjava/lang/String;)V

    .line 1111
    invoke-virtual {v0}, Ljava/io/File;->delete()Z
    :try_end_2cb
    .catch Ljava/lang/Throwable; {:try_start_1b8 .. :try_end_2cb} :catch_128

    move v0, v8

    .line 1113
    goto :goto_29b

    :cond_2cd
    move v0, v8

    .line 1114
    goto :goto_29b

    .line 1144
    :catch_2cf
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto/16 :goto_159

    .line 1162
    :cond_2d5
    :try_start_2d5
    sget-object v1, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-virtual {v1}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;
    :try_end_2da
    .catch Ljava/lang/Throwable; {:try_start_2d5 .. :try_end_2da} :catch_1b2

    goto/16 :goto_1a6

    :cond_2dc
    move v1, v0

    goto/16 :goto_246

    :cond_2df
    move v0, v8

    goto/16 :goto_226

    :cond_2e2
    move v0, v8

    goto :goto_29b

    :cond_2e4
    move v2, v8

    move v0, v9

    goto/16 :goto_103

    :cond_2e8
    move v0, v7

    move v9, v8

    goto/16 :goto_f1
.end method

.method private handleThreadEnd(Ljava/lang/String;)V
    .registers 10

    .prologue
    .line 668
    :try_start_0
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1}, Lcom/baidu/sofire/e;->x()I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/e;->g(I)V

    .line 669
    iget v0, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-eqz v0, :cond_24

    .line 670
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v1, 0x1

    iget v2, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    iget-object v3, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v4, 0x1

    iget v5, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 671
    invoke-virtual {v3, v4, v5}, Lcom/baidu/sofire/e;->a(II)I

    move-result v3

    add-int/lit8 v3, v3, 0x1

    .line 670
    invoke-virtual {v0, v1, v2, v3}, Lcom/baidu/sofire/e;->a(III)V
    :try_end_24
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_24} :catch_cf

    .line 677
    :cond_24
    :goto_24
    :try_start_24
    new-instance v2, Ljava/util/HashMap;

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

    .line 678
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mStartKeyMap:Ljava/util/Map;

    if-eqz v0, :cond_43

    .line 679
    const-string v0, "1"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mStartKeyMap:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 680
    const-string v0, "2"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mStartKeyMap:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 682
    :cond_43
    const-string v0, "3"

    iget v1, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 683
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    if-eqz v0, :cond_68

    .line 684
    const-string v0, "4"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 685
    const-string v0, "5"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 687
    :cond_68
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    if-eqz v0, :cond_73

    .line 688
    const-string v0, "6"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 690
    :cond_73
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    if-eqz v0, :cond_7e

    .line 691
    const-string v0, "7"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 693
    :cond_7e
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_da

    .line 694
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    .line 695
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_91
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_d5

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map$Entry;

    .line 696
    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5}, Lorg/json/JSONObject;-><init>()V

    .line 697
    invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    .line 698
    invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/baidu/sofire/ac/U$UpgradeResult;

    .line 699
    if-eqz v0, :cond_c2

    .line 700
    const-string v6, "1"

    iget v7, v0, Lcom/baidu/sofire/ac/U$UpgradeResult;->networkId:I

    invoke-virtual {v5, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 701
    const-string v6, "0"

    iget v0, v0, Lcom/baidu/sofire/ac/U$UpgradeResult;->resultId:I

    invoke-virtual {v5, v6, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 703
    :cond_c2
    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_c9
    .catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_c9} :catch_ca

    goto :goto_91

    .line 721
    :catch_ca
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    .line 724
    :goto_ce
    return-void

    .line 674
    :catch_cf
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto/16 :goto_24

    .line 705
    :cond_d5
    :try_start_d5
    const-string v0, "8"

    invoke-interface {v2, v0, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 707
    :cond_da
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    invoke-virtual {v0}, Lcom/baidu/sofire/c/a;->b()Ljava/util/Map;

    move-result-object v0

    .line 709
    const-string v1, "9"

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v3

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 710
    const-string v1, "10"

    invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v0

    invoke-interface {v2, v1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 712
    const-string v0, "11"

    iget v1, p0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

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

    move-result v0

    if-nez v0, :cond_120

    .line 714
    const-string v0, "12"

    const-string v1, "\n"

    const-string v3, ""

    .line 715
    invoke-virtual {p1, v1, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v1

    const-string v3, "\t"

    const-string v4, ""

    invoke-virtual {v1, v3, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v1

    const-string v3, "\r"

    const-string v4, ""

    invoke-virtual {v1, v3, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 717
    :cond_120
    const-string v0, "13"

    iget v1, p0, Lcom/baidu/sofire/ac/U;->mStartNetwork:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 718
    const-string v0, "14"

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/sofire/i/d;->k(Landroid/content/Context;)I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v2, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 719
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    const-string v1, "1003129"

    invoke-static {v0, v1, v2}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V
    :try_end_141
    .catch Ljava/lang/Throwable; {:try_start_d5 .. :try_end_141} :catch_ca

    goto :goto_ce
.end method

.method private handleThreadStart()V
    .registers 15

    .prologue
    const/16 v13, 0xb

    const/4 v12, 0x6

    const-wide/16 v10, 0x0

    const/4 v0, 0x1

    .line 731
    :try_start_6
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 6682
    iget-object v1, v1, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    const-string v2, "slruct"

    const-wide/16 v4, 0x0

    invoke-interface {v1, v2, v4, v5}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v2

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

    move-result-wide v4

    .line 733
    cmp-long v1, v2, v10

    if-lez v1, :cond_dd

    sub-long v6, v4, v2

    const-wide/32 v8, 0x5265c00

    cmp-long v1, v6, v8

    if-lez v1, :cond_dd

    .line 734
    new-instance v2, Ljava/util/HashMap;

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

    .line 735
    const-string v1, "1"

    iget-object v3, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v3}, Lcom/baidu/sofire/e;->w()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 736
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Lcom/baidu/sofire/e;->f(I)V

    .line 737
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    move v1, v0

    .line 738
    :goto_43
    if-gt v1, v12, :cond_5d

    .line 739
    iget-object v6, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v7, 0x0

    invoke-virtual {v6, v7, v1}, Lcom/baidu/sofire/e;->a(II)I

    move-result v6

    .line 740
    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v3, v7, v6}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 741
    iget-object v6, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v7, 0x0

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v1, v8}, Lcom/baidu/sofire/e;->a(III)V

    .line 738
    add-int/lit8 v1, v1, 0x1

    goto :goto_43

    .line 743
    :cond_5d
    const-string v1, "2"

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 744
    const-string v1, "3"

    iget-object v3, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v3}, Lcom/baidu/sofire/e;->x()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 745
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Lcom/baidu/sofire/e;->g(I)V

    .line 746
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    move v1, v0

    .line 747
    :goto_7d
    if-gt v1, v13, :cond_97

    .line 748
    iget-object v6, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v7, 0x1

    invoke-virtual {v6, v7, v1}, Lcom/baidu/sofire/e;->a(II)I

    move-result v6

    .line 749
    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v3, v7, v6}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 750
    iget-object v6, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v7, 0x1

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v1, v8}, Lcom/baidu/sofire/e;->a(III)V

    .line 747
    add-int/lit8 v1, v1, 0x1

    goto :goto_7d

    .line 752
    :cond_97
    const-string v1, "4"

    invoke-interface {v2, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 753
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    const-string v3, "1003128"

    invoke-static {v1, v3, v2}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V

    .line 754
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1, v4, v5}, Lcom/baidu/sofire/e;->a(J)V
    :try_end_a8
    .catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_a8} :catch_e7

    .line 777
    :cond_a8
    :goto_a8
    :try_start_a8
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    invoke-virtual {v0}, Lcom/baidu/sofire/c/a;->b()Ljava/util/Map;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->mStartKeyMap:Ljava/util/Map;

    .line 778
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1}, Lcom/baidu/sofire/e;->w()I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/e;->f(I)V

    .line 779
    iget v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    if-eqz v0, :cond_d4

    .line 780
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v1, 0x0

    iget v2, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    iget-object v3, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v4, 0x0

    iget v5, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 781
    invoke-virtual {v3, v4, v5}, Lcom/baidu/sofire/e;->a(II)I

    move-result v3

    add-int/lit8 v3, v3, 0x1

    .line 780
    invoke-virtual {v0, v1, v2, v3}, Lcom/baidu/sofire/e;->a(III)V

    .line 783
    :cond_d4
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/baidu/sofire/i/d;->k(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/baidu/sofire/ac/U;->mStartNetwork:I
    :try_end_dc
    .catch Ljava/lang/Throwable; {:try_start_a8 .. :try_end_dc} :catch_115

    .line 788
    :goto_dc
    return-void

    .line 755
    :cond_dd
    cmp-long v1, v2, v10

    if-nez v1, :cond_a8

    .line 757
    :try_start_e1
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v1, v4, v5}, Lcom/baidu/sofire/e;->a(J)V
    :try_end_e6
    .catch Ljava/lang/Throwable; {:try_start_e1 .. :try_end_e6} :catch_e7

    goto :goto_a8

    :catch_e7
    move-exception v1

    .line 762
    :try_start_e8
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/baidu/sofire/e;->f(I)V

    .line 763
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/baidu/sofire/e;->g(I)V

    move v1, v0

    .line 764
    :goto_f5
    if-gt v1, v12, :cond_101

    .line 765
    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v1, v4}, Lcom/baidu/sofire/e;->a(III)V

    .line 764
    add-int/lit8 v1, v1, 0x1

    goto :goto_f5

    .line 767
    :cond_101
    :goto_101
    if-gt v0, v13, :cond_111

    .line 768
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    const/4 v2, 0x1

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v0, v3}, Lcom/baidu/sofire/e;->a(III)V
    :try_end_10a
    .catch Ljava/lang/Throwable; {:try_start_e8 .. :try_end_10a} :catch_10d

    .line 767
    add-int/lit8 v0, v0, 0x1

    goto :goto_101

    .line 771
    :catch_10d
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    .line 773
    :cond_111
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto :goto_a8

    .line 785
    :catch_115
    move-exception v0

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto :goto_dc
.end method

.method private pluginUpdate(Ljava/io/File;Lcom/baidu/sofire/core/ApkInfo;I)V
    .registers 11

    .prologue
    const/4 v6, 0x1

    .line 791
    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0, v6}, Lcom/baidu/sofire/i/d;->a(Ljava/lang/String;Z)V

    .line 793
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v0}, Lcom/baidu/sofire/e;->c()Z

    move-result v0

    if-eqz v0, :cond_50

    .line 794
    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v1

    const-string v2, ".b"

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

    .line 795
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-nez v1, :cond_26

    .line 796
    invoke-virtual {v0}, Ljava/io/File;->mkdir()Z

    .line 799
    :cond_26
    new-instance v1, Ljava/io/File;

    new-instance v2, Ljava/lang/StringBuilder;

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

    iget v3, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v2

    const-string v3, "-"

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

    move-result-object v2

    iget-object v3, p2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v2

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

    move-result-object v2

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

    .line 800
    invoke-static {p1, v1}, Lcom/baidu/sofire/i/d;->a(Ljava/io/File;Ljava/io/File;)V

    .line 801
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    iget v2, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 802
    invoke-static {v0, v2, p1, v1}, Lcom/baidu/sofire/c;->a(Landroid/content/Context;ILjava/io/File;Ljava/io/File;)V

    .line 805
    :cond_50
    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p2, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

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

    const-string v1, "before update, time="

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

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

    move-result-wide v2

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

    move-result-object v0

    const-string v1, ", downloadAPK path:"

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

    move-result-object v0

    .line 808
    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

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

    move-result-object v0

    const-string v1, ", exists="

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

    move-result-object v0

    .line 809
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v1

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

    move-result-object v0

    const-string v1, ", canRead="

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

    move-result-object v0

    invoke-virtual {p1}, Ljava/io/File;->canRead()Z

    move-result v1

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

    move-result-object v0

    const-string v1, ", isFile="

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

    move-result-object v0

    .line 810
    invoke-virtual {p1}, Ljava/io/File;->isFile()Z

    move-result v1

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

    move-result-object v0

    const-string v1, ",length"

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

    move-result-object v0

    .line 811
    invoke-virtual {p1}, Ljava/io/File;->length()J

    move-result-wide v2

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

    move-result-object v0

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

    move-result-object v0

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

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "before update, time="

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

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

    move-result-wide v4

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ", "

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

    move-result-object v2

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

    move-result-object v2

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

    .line 815
    iget-object v2, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v3, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v2, v3}, Lcom/baidu/sofire/c/a;->a(I)Lcom/baidu/sofire/core/ApkInfo;

    move-result-object v2

    .line 816
    if-nez v2, :cond_130

    .line 817
    const-string v2, "apkInDB == null"

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

    .line 825
    :goto_dc
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    .line 826
    invoke-virtual {v1, p2, v0}, Lcom/baidu/sofire/core/d;->a(Lcom/baidu/sofire/core/ApkInfo;Ljava/lang/String;)Z

    move-result v0

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

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

    iget-object v2, p2, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

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

    move-result-object v1

    const-string v2, " s="

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

    move-result-object v1

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 828
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v2, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    const v3, 0x989680

    add-int/2addr v2, v3

    iget-object v3, p2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Lcom/baidu/sofire/c/a;->a(ILjava/lang/String;)V

    .line 830
    if-nez v0, :cond_187

    .line 831
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_12f

    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    iget v1, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 832
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_12f

    .line 833
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v1, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    new-instance v2, Lcom/baidu/sofire/ac/U$UpgradeResult;

    const/4 v3, 0x5

    invoke-direct {v2, p0, p3, v3}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 848
    :cond_12f
    :goto_12f
    return-void

    .line 819
    :cond_130
    new-instance v3, Ljava/io/File;

    iget-object v2, v2, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

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

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

    const-string v4, "origAPK path:"

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

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v4

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

    move-result-object v2

    const-string v4, ", exists="

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

    move-result-object v2

    .line 821
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v4

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

    move-result-object v2

    const-string v4, ", canRead="

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

    move-result-object v2

    invoke-virtual {v3}, Ljava/io/File;->canRead()Z

    move-result v4

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

    move-result-object v2

    const-string v4, ", isFile="

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

    move-result-object v2

    .line 822
    invoke-virtual {v3}, Ljava/io/File;->isFile()Z

    move-result v4

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

    move-result-object v2

    const-string v4, ",length"

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

    move-result-object v2

    .line 823
    invoke-virtual {v3}, Ljava/io/File;->length()J

    move-result-wide v4

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

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

    move-result-object v2

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

    goto/16 :goto_dc

    .line 838
    :cond_187
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v1, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v0, v1}, Lcom/baidu/sofire/c/a;->g(I)I

    move-result v0

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

    const-string v2, "new plugin now loadStatus :"

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

    iget v2, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v1

    const-string v2, " "

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

    move-result-object v1

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 840
    const/4 v1, 0x3

    if-ge v0, v1, :cond_1b7

    const/4 v1, -0x1

    if-eq v0, v1, :cond_1b7

    .line 841
    iget-object v1, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v2, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {v1, v2, v0}, Lcom/baidu/sofire/c/a;->b(II)V

    .line 843
    :cond_1b7
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    if-eqz v0, :cond_12f

    .line 844
    iget-object v0, p0, Lcom/baidu/sofire/ac/U;->mUpgradeResultMap:Ljava/util/Map;

    iget v1, p2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    new-instance v2, Lcom/baidu/sofire/ac/U$UpgradeResult;

    invoke-direct {v2, p0, p3, v6}, Lcom/baidu/sofire/ac/U$UpgradeResult;-><init>(Lcom/baidu/sofire/ac/U;II)V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto/16 :goto_12f
.end method


# virtual methods
.method public handleWork(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 6

    .prologue
    .line 158
    iput-object p1, p0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    .line 159
    invoke-static {p1}, Lcom/baidu/sofire/c/a;->a(Landroid/content/Context;)Lcom/baidu/sofire/c/a;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    .line 160
    new-instance v0, Lcom/baidu/sofire/e;

    invoke-direct {v0, p1}, Lcom/baidu/sofire/e;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 161
    new-instance v0, Ljava/io/File;

    invoke-virtual {p1}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v1

    const-string v2, ".tmp"

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

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->tmpDir:Ljava/io/File;

    .line 162
    invoke-static {p1}, Lcom/baidu/sofire/core/d;->a(Landroid/content/Context;)Lcom/baidu/sofire/core/d;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    .line 163
    const-string v0, "from"

    const/4 v1, 0x0

    invoke-virtual {p2, v0, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/baidu/sofire/ac/U;->mFrom:I

    .line 164
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 165
    invoke-virtual {p0}, Lcom/baidu/sofire/ac/U;->start()V

    .line 166
    return-void
.end method

.method public declared-synchronized run()V
    .registers 26

    .prologue
    .line 171
    monitor-enter p0

    :try_start_1
    move-object/from16 v0, p0

    iget-boolean v2, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-eqz v2, :cond_10

    .line 172
    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_9
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_9} :catch_6a
    .catchall {:try_start_1 .. :try_end_9} :catchall_67

    if-eqz v2, :cond_d

    .line 663
    :cond_b
    :goto_b
    monitor-exit p0

    return-void

    .line 175
    :cond_d
    const/4 v2, 0x1

    :try_start_e
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_10
    .catch Ljava/lang/Throwable; {:try_start_e .. :try_end_10} :catch_6a
    .catchall {:try_start_e .. :try_end_10} :catchall_67

    .line 183
    :cond_10
    :goto_10
    :try_start_10
    const-class v11, Lcom/baidu/sofire/ac/U;

    monitor-enter v11
    :try_end_13
    .catch Ljava/lang/Throwable; {:try_start_10 .. :try_end_13} :catch_1ed
    .catchall {:try_start_10 .. :try_end_13} :catchall_206

    .line 184
    :try_start_13
    invoke-super/range {p0 .. p0}, Ljava/lang/Thread;->run()V

    .line 185
    invoke-direct/range {p0 .. p0}, Lcom/baidu/sofire/ac/U;->handleThreadStart()V

    .line 186
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x1

    if-eq v2, v3, :cond_6f

    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x2

    if-eq v2, v3, :cond_6f

    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x3

    if-eq v2, v3, :cond_6f

    move-object/from16 v0, p0

    iget-boolean v2, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-nez v2, :cond_6f

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

    move-result-wide v2

    sget-wide v4, Lcom/baidu/sofire/ac/U;->sLastCheckTime:J

    sub-long/2addr v2, v4

    const-wide/32 v4, 0x927c0

    cmp-long v2, v2, v4

    if-gez v2, :cond_6f

    .line 189
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v2, :cond_53

    .line 190
    const/4 v2, 0x2

    move-object/from16 v0, p0

    iput v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 191
    const/4 v2, 0x0

    move-object/from16 v0, p0

    invoke-direct {v0, v2}, Lcom/baidu/sofire/ac/U;->handleThreadEnd(Ljava/lang/String;)V

    .line 193
    :cond_53
    monitor-exit v11
    :try_end_54
    .catchall {:try_start_13 .. :try_end_54} :catchall_1ea

    .line 656
    :try_start_54
    move-object/from16 v0, p0

    iget-boolean v2, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-eqz v2, :cond_b

    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z

    if-eqz v2, :cond_b

    .line 657
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_61
    .catch Ljava/lang/Throwable; {:try_start_54 .. :try_end_61} :catch_62
    .catchall {:try_start_54 .. :try_end_61} :catchall_67

    goto :goto_b

    .line 660
    :catch_62
    move-exception v2

    :try_start_63
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_66
    .catchall {:try_start_63 .. :try_end_66} :catchall_67

    goto :goto_b

    .line 171
    :catchall_67
    move-exception v2

    monitor-exit p0

    throw v2

    .line 179
    :catch_6a
    move-exception v2

    :try_start_6b
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_6e
    .catchall {:try_start_6b .. :try_end_6e} :catchall_67

    goto :goto_10

    .line 195
    :cond_6f
    :try_start_6f
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v2}, Lcom/baidu/sofire/i/d;->f(Landroid/content/Context;)Z

    move-result v2

    if-eqz v2, :cond_7f

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

    move-result-wide v2

    sput-wide v2, Lcom/baidu/sofire/ac/U;->sLastCheckTime:J

    .line 198
    :cond_7f
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;
    :try_end_83
    .catchall {:try_start_6f .. :try_end_83} :catchall_1ea

    .line 2025
    :try_start_83
    new-instance v4, Lcom/baidu/sofire/e;

    invoke-direct {v4, v3}, Lcom/baidu/sofire/e;-><init>(Landroid/content/Context;)V

    .line 2027
    invoke-virtual {v4}, Lcom/baidu/sofire/e;->v()I

    move-result v2

    int-to-long v6, v2

    const-wide/32 v8, 0x36ee80

    mul-long/2addr v6, v8

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

    const-string v5, "sjh-alarm gap "

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

    invoke-virtual {v4}, Lcom/baidu/sofire/e;->v()I

    move-result v5

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 2031
    const-string v2, "alarm"

    invoke-virtual {v3, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/AlarmManager;

    .line 2033
    new-instance v5, Landroid/content/Intent;

    const-string v8, "com.baidu.action.SOFIRE.VIEW"

    invoke-direct {v5, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 2034
    const-class v8, Lcom/baidu/sofire/MyService;

    invoke-virtual {v5, v3, v8}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 2035
    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v5, v8}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 2036
    const-string v8, "com.baidu.category.SOFIRE"

    invoke-virtual {v5, v8}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 2037
    const-string v8, "android.intent.category.DEFAULT"

    invoke-virtual {v5, v8}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 2039
    const-string v8, "from_plugin_package"

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 2040
    const-string v8, "target_class"

    const-class v9, Lcom/baidu/sofire/ac/U;

    invoke-virtual {v9}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 2041
    const-string v8, "target_method"

    const-string v9, "handleWork"

    invoke-virtual {v5, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 2042
    const-string v8, "from"

    const/4 v9, 0x6

    invoke-virtual {v5, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 2044
    const/16 v8, 0x3e8

    const/high16 v9, 0x8000000

    .line 2045
    invoke-static {v3, v8, v5, v9}, Landroid/app/PendingIntent;->getService(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v3

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

    move-result-wide v8

    add-long/2addr v8, v6

    const-wide/32 v12, 0x927c0

    sub-long/2addr v8, v12

    const-wide v12, 0x41324f8000000000L    # 1200000.0

    .line 2056
    invoke-static {}, Ljava/lang/Math;->random()D

    move-result-wide v14

    mul-double/2addr v12, v14

    double-to-long v12, v12

    add-long/2addr v8, v12

    .line 2079
    iget-object v5, v4, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    const-string v10, "npuct"

    invoke-interface {v5, v10, v8, v9}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    .line 2080
    iget-object v4, v4, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v4}, Landroid/content/SharedPreferences$Editor;->commit()Z

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

    const-string v5, "b=false,"

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

    invoke-virtual {v4, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ","

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

    move-result-object v4

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

    move-result-object v4

    const-string v5, ","

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

    move-result-object v4

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

    move-result-wide v6

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V
    :try_end_136
    .catch Ljava/lang/Throwable; {:try_start_83 .. :try_end_136} :catch_21e
    .catchall {:try_start_83 .. :try_end_136} :catchall_1ea

    .line 2063
    :try_start_136
    invoke-virtual {v2, v3}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V
    :try_end_139
    .catch Ljava/lang/Throwable; {:try_start_136 .. :try_end_139} :catch_215
    .catchall {:try_start_136 .. :try_end_139} :catchall_1ea

    .line 2069
    :goto_139
    const/4 v4, 0x0

    :try_start_13a
    invoke-virtual {v2, v4, v8, v9, v3}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V
    :try_end_13d
    .catch Ljava/lang/Throwable; {:try_start_13a .. :try_end_13d} :catch_224
    .catchall {:try_start_13a .. :try_end_13d} :catchall_1ea

    .line 199
    :goto_13d
    :try_start_13d
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v2}, Lcom/baidu/sofire/core/j;->a(Landroid/content/Context;)V

    .line 201
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x1

    if-eq v2, v3, :cond_152

    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x3

    if-ne v2, v3, :cond_164

    .line 202
    :cond_152
    const/4 v2, 0x0

    sput v2, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    .line 203
    const/4 v2, 0x0

    sput v2, Lcom/baidu/sofire/ac/U;->sRetryDownoadHostCareApksTimesCount:I

    .line 204
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    const/4 v3, 0x0

    const/4 v4, 0x1

    invoke-static {v2, v3, v4}, Lcom/baidu/sofire/i/b;->a(Landroid/content/Context;IZ)V

    .line 205
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    .line 207
    :cond_164
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x2

    if-ne v2, v3, :cond_16e

    .line 208
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    .line 211
    :cond_16e
    const/4 v2, 0x0

    .line 212
    const-string v3, "com.baidu.input_huawei"

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

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

    move-result v3

    if-eqz v3, :cond_18f

    .line 213
    new-instance v2, Lcom/baidu/sofire/e;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-direct {v2, v3}, Lcom/baidu/sofire/e;-><init>(Landroid/content/Context;)V

    .line 214
    invoke-virtual {v2}, Lcom/baidu/sofire/e;->B()Z

    move-result v2

    if-nez v2, :cond_22d

    const/4 v2, 0x1

    .line 217
    :cond_18f
    :goto_18f
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v3}, Lcom/baidu/sofire/i/d;->f(Landroid/content/Context;)Z

    move-result v3

    if-eqz v3, :cond_19b

    if-eqz v2, :cond_238

    .line 219
    :cond_19b
    move-object/from16 v0, p0

    iget v3, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v4, 0x1

    if-eq v3, v4, :cond_1b0

    move-object/from16 v0, p0

    iget v3, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v4, 0x2

    if-eq v3, v4, :cond_1b0

    move-object/from16 v0, p0

    iget v3, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v4, 0x3

    if-ne v3, v4, :cond_1d5

    .line 221
    :cond_1b0
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 223
    const/4 v3, 0x1

    sput-boolean v3, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    .line 224
    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.conn.CONNECTIVITY_CHANGE"

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

    .line 226
    sget-object v4, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    if-nez v4, :cond_1cc

    .line 227
    new-instance v4, Lcom/baidu/sofire/MyReceiver;

    invoke-direct {v4}, Lcom/baidu/sofire/MyReceiver;-><init>()V

    invoke-virtual {v4}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    move-result-object v4

    sput-object v4, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    .line 229
    :cond_1cc
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget-object v5, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-static {v4, v5, v3}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Z

    .line 232
    :cond_1d5
    move-object/from16 v0, p0

    iget v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v3, :cond_1e0

    .line 233
    const/4 v3, 0x3

    move-object/from16 v0, p0

    iput v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 235
    :cond_1e0
    if-eqz v2, :cond_230

    .line 236
    new-instance v2, Landroid/accounts/NetworkErrorException;

    const-string v3, "blocked by Huawei Input"

    invoke-direct {v2, v3}, Landroid/accounts/NetworkErrorException;-><init>(Ljava/lang/String;)V

    throw v2

    .line 624
    :catchall_1ea
    move-exception v2

    monitor-exit v11
    :try_end_1ec
    .catchall {:try_start_13d .. :try_end_1ec} :catchall_1ea

    :try_start_1ec
    throw v2
    :try_end_1ed
    .catch Ljava/lang/Throwable; {:try_start_1ec .. :try_end_1ed} :catch_1ed
    .catchall {:try_start_1ec .. :try_end_1ed} :catchall_206

    .line 629
    :catch_1ed
    move-exception v2

    .line 630
    :try_start_1ee
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v3}, Lcom/baidu/sofire/i/d;->i(Landroid/content/Context;)Z

    move-result v3

    if-eqz v3, :cond_9d3

    instance-of v3, v2, Ljava/lang/UnsupportedOperationException;

    if-eqz v3, :cond_9d3

    .line 631
    new-instance v3, Ljava/lang/UnsupportedOperationException;

    invoke-virtual {v2}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object v2

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

    throw v3
    :try_end_206
    .catchall {:try_start_1ee .. :try_end_206} :catchall_206

    .line 655
    :catchall_206
    move-exception v2

    .line 656
    :try_start_207
    move-object/from16 v0, p0

    iget-boolean v3, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-eqz v3, :cond_214

    sget-boolean v3, Lcom/baidu/sofire/ac/U;->sOutGoing:Z

    if-eqz v3, :cond_214

    .line 657
    const/4 v3, 0x0

    sput-boolean v3, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_214
    .catch Ljava/lang/Throwable; {:try_start_207 .. :try_end_214} :catch_a39
    .catchall {:try_start_207 .. :try_end_214} :catchall_67

    .line 661
    :cond_214
    :goto_214
    :try_start_214
    throw v2
    :try_end_215
    .catchall {:try_start_214 .. :try_end_215} :catchall_67

    .line 2065
    :catch_215
    move-exception v4

    :try_start_216
    invoke-virtual {v4}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    invoke-static {}, Lcom/baidu/sofire/b;->c()V
    :try_end_21c
    .catch Ljava/lang/Throwable; {:try_start_216 .. :try_end_21c} :catch_21e
    .catchall {:try_start_216 .. :try_end_21c} :catchall_1ea

    goto/16 :goto_139

    .line 2074
    :catch_21e
    move-exception v2

    :try_start_21f
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_222
    .catchall {:try_start_21f .. :try_end_222} :catchall_1ea

    goto/16 :goto_13d

    .line 2071
    :catch_224
    move-exception v2

    :try_start_225
    invoke-virtual {v2}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    invoke-static {}, Lcom/baidu/sofire/b;->c()V
    :try_end_22b
    .catch Ljava/lang/Throwable; {:try_start_225 .. :try_end_22b} :catch_21e
    .catchall {:try_start_225 .. :try_end_22b} :catchall_1ea

    goto/16 :goto_13d

    .line 214
    :cond_22d
    const/4 v2, 0x0

    goto/16 :goto_18f

    .line 238
    :cond_230
    :try_start_230
    new-instance v2, Landroid/accounts/NetworkErrorException;

    const-string v3, "no internet"

    invoke-direct {v2, v3}, Landroid/accounts/NetworkErrorException;-><init>(Ljava/lang/String;)V

    throw v2

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

    move-result-wide v2

    sput-wide v2, Lcom/baidu/sofire/ac/U;->sLastCheckTime:J

    .line 243
    sget-object v2, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    if-eqz v2, :cond_257

    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    if-nez v2, :cond_24a

    sget-boolean v2, Lcom/baidu/sofire/i/d;->a:Z
    :try_end_248
    .catchall {:try_start_230 .. :try_end_248} :catchall_1ea

    if-eqz v2, :cond_257

    .line 247
    :cond_24a
    :try_start_24a
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    sget-object v3, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    .line 248
    invoke-virtual {v2, v3}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_257
    .catch Ljava/lang/Throwable; {:try_start_24a .. :try_end_257} :catch_2ea
    .catchall {:try_start_24a .. :try_end_257} :catchall_1ea

    .line 254
    :cond_257
    :goto_257
    const/4 v2, 0x0

    :try_start_258
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    .line 255
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/i/d;->a:Z

    .line 257
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x1

    if-eq v2, v3, :cond_270

    .line 258
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v2}, Lcom/baidu/sofire/i/d;->o(Landroid/content/Context;)Lorg/json/JSONObject;

    move-result-object v2

    move-object/from16 v0, p0

    iput-object v2, v0, Lcom/baidu/sofire/ac/U;->mWholeJson:Lorg/json/JSONObject;

    .line 260
    :cond_270
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->mWholeJson:Lorg/json/JSONObject;

    if-nez v2, :cond_2fc

    .line 261
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x1

    if-eq v2, v3, :cond_28f

    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x2

    if-eq v2, v3, :cond_28f

    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mFrom:I

    const/4 v3, 0x3

    if-ne v2, v3, :cond_2b0

    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    if-nez v2, :cond_2b0

    :cond_28f
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 264
    invoke-virtual {v2}, Lcom/baidu/sofire/e;->r()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_2b0

    .line 265
    const/4 v2, 0x1

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sSetRetrmAlarm:Z

    .line 266
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget v3, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Lcom/baidu/sofire/i/b;->a(Landroid/content/Context;IZ)V

    .line 267
    sget v2, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    add-int/lit8 v2, v2, 0x1

    sput v2, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    .line 269
    :cond_2b0
    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 271
    sget-object v3, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    if-nez v3, :cond_2f0

    .line 272
    new-instance v3, Lcom/baidu/sofire/MyReceiver;

    invoke-direct {v3}, Lcom/baidu/sofire/MyReceiver;-><init>()V

    invoke-virtual {v3}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    move-result-object v3

    sput-object v3, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    .line 276
    :goto_2c6
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    sget-object v4, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-static {v3, v4, v2}, Lcom/baidu/sofire/i/d;->a(Landroid/content/Context;Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Z

    .line 278
    const/4 v2, 0x1

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sMonitorNetworkWhenUpgradeNoNet:Z

    .line 279
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v2, :cond_2e2

    .line 280
    sget v2, Lcom/baidu/sofire/i/d;->d:I

    if-eqz v2, :cond_2f6

    .line 281
    sget v2, Lcom/baidu/sofire/i/d;->d:I

    move-object/from16 v0, p0

    iput v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 286
    :cond_2e2
    :goto_2e2
    new-instance v2, Landroid/accounts/NetworkErrorException;

    const-string v3, "ping faild"

    invoke-direct {v2, v3}, Landroid/accounts/NetworkErrorException;-><init>(Ljava/lang/String;)V

    throw v2

    .line 250
    :catch_2ea
    move-exception v2

    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    goto/16 :goto_257

    .line 274
    :cond_2f0
    sget-object v3, Lcom/baidu/sofire/i/d;->e:Lcom/baidu/sofire/MyReceiver;

    invoke-virtual {v3}, Lcom/baidu/sofire/MyReceiver;->a()Lcom/baidu/sofire/MyReceiver;

    goto :goto_2c6

    .line 283
    :cond_2f6
    const/4 v2, 0x4

    move-object/from16 v0, p0

    iput v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    goto :goto_2e2

    .line 289
    :cond_2fc
    const/4 v2, 0x0

    sput v2, Lcom/baidu/sofire/ac/U;->sRetryPingTimesCount:I

    .line 291
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->mWholeJson:Lorg/json/JSONObject;

    invoke-virtual {v2, v3}, Lcom/baidu/sofire/core/d;->a(Lorg/json/JSONObject;)V

    .line 293
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    invoke-virtual {v2}, Lcom/baidu/sofire/c/a;->d()V

    .line 296
    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sPidRegister:Z

    if-nez v2, :cond_353

    .line 297
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 2543
    iget-object v3, v3, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    const-string v4, "pdcg"

    const/4 v5, 0x0

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    .line 297
    add-int/lit8 v3, v3, 0x1

    .line 3538
    iget-object v4, v2, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    const-string v5, "pdcg"

    invoke-interface {v4, v5, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 3539
    iget-object v2, v2, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 298
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
    :try_end_33b
    .catchall {:try_start_258 .. :try_end_33b} :catchall_1ea

    move-result-wide v4

    .line 3548
    const-wide/16 v6, 0x0

    cmp-long v2, v4, v6

    if-nez v2, :cond_3b6

    .line 3549
    :try_start_342
    iget-object v2, v3, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    const-string v4, "pdcgts"

    const-string v5, ""

    invoke-interface {v2, v4, v5}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 3550
    iget-object v2, v3, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z
    :try_end_350
    .catch Ljava/lang/Throwable; {:try_start_342 .. :try_end_350} :catch_3e3
    .catchall {:try_start_342 .. :try_end_350} :catchall_1ea

    .line 299
    :cond_350
    :goto_350
    const/4 v2, 0x1

    :try_start_351
    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sPidRegister:Z

    .line 301
    :cond_353
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    .line 4525
    iget-object v3, v3, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    const-string v4, "rtqe"

    const/4 v5, 0x0

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    .line 301
    add-int/lit8 v3, v3, 0x1

    .line 5520
    iget-object v4, v2, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    const-string v5, "rtqe"

    invoke-interface {v4, v5, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 5521
    iget-object v2, v2, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 303
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    invoke-virtual {v2}, Lcom/baidu/sofire/c/a;->a()Ljava/util/List;

    move-result-object v12

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

    const-string v3, "a="

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 305
    new-instance v13, Ljava/util/ArrayList;

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

    .line 307
    new-instance v14, Ljava/util/ArrayList;

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

    .line 308
    new-instance v15, Ljava/util/ArrayList;

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

    .line 310
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->mWholeJson:Lorg/json/JSONObject;

    const-string v3, "5"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v16

    .line 312
    if-nez v16, :cond_410

    .line 313
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v2, :cond_3ae

    .line 314
    const/16 v2, 0xa

    move-object/from16 v0, p0

    iput v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 316
    :cond_3ae
    new-instance v2, Landroid/accounts/NetworkErrorException;

    const-string v3, "plugin json is null"

    invoke-direct {v2, v3}, Landroid/accounts/NetworkErrorException;-><init>(Ljava/lang/String;)V

    throw v2
    :try_end_3b6
    .catchall {:try_start_351 .. :try_end_3b6} :catchall_1ea

    .line 3553
    :cond_3b6
    :try_start_3b6
    iget-object v2, v3, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    const-string v6, "pdcgts"

    const-string v7, ""

    invoke-interface {v2, v6, v7}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

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

    move-result v6

    if-eqz v6, :cond_3e9

    .line 3555
    invoke-static {v4, v5}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v2

    .line 3563
    :goto_3ca
    new-instance v4, Ljava/lang/StringBuilder;

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 3564
    iget-object v4, v3, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    const-string v5, "pdcgts"

    invoke-interface {v4, v5, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 3565
    iget-object v2, v3, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v2}, Landroid/content/SharedPreferences$Editor;->commit()Z
    :try_end_3e1
    .catch Ljava/lang/Throwable; {:try_start_3b6 .. :try_end_3e1} :catch_3e3
    .catchall {:try_start_3b6 .. :try_end_3e1} :catchall_1ea

    goto/16 :goto_350

    .line 3567
    :catch_3e3
    move-exception v2

    :try_start_3e4
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_3e7
    .catchall {:try_start_3e4 .. :try_end_3e7} :catchall_1ea

    goto/16 :goto_350

    .line 3557
    :cond_3e9
    :try_start_3e9
    const-string v6, "_"

    invoke-virtual {v2, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    .line 3558
    array-length v6, v6

    const/16 v7, 0x14

    if-ge v6, v7, :cond_350

    .line 3561
    new-instance v6, Ljava/lang/StringBuilder;

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

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

    move-result-object v2

    const-string v6, "_"

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

    move-result-object v2

    invoke-static {v4, v5}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v4

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

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_40e
    .catch Ljava/lang/Throwable; {:try_start_3e9 .. :try_end_40e} :catch_3e3
    .catchall {:try_start_3e9 .. :try_end_40e} :catchall_1ea

    move-result-object v2

    goto :goto_3ca

    .line 319
    :cond_410
    :try_start_410
    move-object/from16 v0, v16

    instance-of v2, v0, Lorg/json/JSONObject;

    if-eqz v2, :cond_7f5

    .line 320
    invoke-virtual/range {v16 .. v16}, Lorg/json/JSONObject;->keys()Ljava/util/Iterator;

    move-result-object v17

    .line 322
    :cond_41a
    :goto_41a
    invoke-interface/range {v17 .. v17}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_7f5

    .line 323
    invoke-interface/range {v17 .. v17}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    .line 324
    move-object/from16 v0, v16

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v18

    .line 325
    const-string v2, "l"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v3

    .line 326
    const-string v2, "v"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 327
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    if-eqz v2, :cond_44d

    .line 328
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->mCloudKeyMap:Ljava/util/Map;

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-interface {v2, v6, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 330
    :cond_44d
    const-string v2, "u"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 331
    const-string v2, "m"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    .line 332
    const-string v2, "sm"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 333
    if-eqz v7, :cond_46b

    .line 334
    invoke-virtual {v7}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v7

    .line 336
    :cond_46b
    new-instance v8, Ljava/lang/StringBuilder;

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

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

    move-result-object v8

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

    move-result-object v8

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

    move-result-object v8

    .line 337
    sget-object v9, Lcom/baidu/sofire/ac/U;->sRealtimeMd5Map:Ljava/util/Map;

    if-nez v9, :cond_487

    .line 338
    new-instance v9, Ljava/util/HashMap;

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

    sput-object v9, Lcom/baidu/sofire/ac/U;->sRealtimeMd5Map:Ljava/util/Map;

    .line 340
    :cond_487
    invoke-static {v8}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_498

    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_498

    .line 341
    sget-object v9, Lcom/baidu/sofire/ac/U;->sRealtimeMd5Map:Ljava/util/Map;

    invoke-interface {v9, v8, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 343
    :cond_498
    if-eqz v2, :cond_a3f

    .line 344
    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    move-object v10, v2

    .line 346
    :goto_49f
    const-string v2, "o"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    const/4 v8, 0x1

    if-ne v2, v8, :cond_4f9

    const/4 v2, 0x1

    move v9, v2

    .line 347
    :goto_4ac
    const-string v2, "d"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    const/4 v8, 0x1

    if-ne v2, v8, :cond_4fc

    const/4 v2, 0x1

    .line 348
    :goto_4b8
    const-string v8, "r"

    move-object/from16 v0, v18

    invoke-virtual {v0, v8}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v8

    .line 349
    if-eqz v9, :cond_4f0

    .line 350
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    move-object/from16 v19, v0

    .line 6140
    move-object/from16 v0, v19

    iget-object v0, v0, Lcom/baidu/sofire/e;->a:Landroid/content/SharedPreferences;

    move-object/from16 v20, v0

    const-string v21, "opi"

    const/16 v22, 0x0

    invoke-interface/range {v20 .. v22}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v20

    .line 6141
    move/from16 v0, v20

    if-le v8, v0, :cond_4f0

    .line 6142
    move-object/from16 v0, v19

    iget-object v0, v0, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    move-object/from16 v20, v0

    const-string v21, "opi"

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    invoke-interface {v0, v1, v8}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 6143
    move-object/from16 v0, v19

    iget-object v8, v0, Lcom/baidu/sofire/e;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v8}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 352
    :cond_4f0
    if-eqz v9, :cond_4fe

    if-eqz v2, :cond_4fe

    .line 353
    invoke-interface {v15, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_4f7
    .catchall {:try_start_410 .. :try_end_4f7} :catchall_1ea

    goto/16 :goto_41a

    .line 346
    :cond_4f9
    const/4 v2, 0x0

    move v9, v2

    goto :goto_4ac

    .line 347
    :cond_4fc
    const/4 v2, 0x0

    goto :goto_4b8

    .line 358
    :cond_4fe
    :try_start_4fe
    new-instance v8, Landroid/content/pm/PackageInfo;

    invoke-direct {v8}, Landroid/content/pm/PackageInfo;-><init>()V

    .line 359
    const-string v2, "p"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v8, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    .line 360
    iput-object v5, v8, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    .line 361
    new-instance v2, Landroid/content/pm/ApplicationInfo;

    invoke-direct {v2}, Landroid/content/pm/ApplicationInfo;-><init>()V

    .line 362
    const-string v19, "n"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v19

    move-object/from16 v0, v19

    iput-object v0, v2, Landroid/content/pm/ApplicationInfo;->className:Ljava/lang/String;

    .line 363
    iget-object v0, v2, Landroid/content/pm/ApplicationInfo;->className:Ljava/lang/String;

    move-object/from16 v19, v0

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

    move-result v19

    if-nez v19, :cond_54f

    iget-object v0, v2, Landroid/content/pm/ApplicationInfo;->className:Ljava/lang/String;

    move-object/from16 v19, v0

    const-string v20, "."

    .line 364
    invoke-virtual/range {v19 .. v20}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v19

    if-eqz v19, :cond_54f

    .line 365
    new-instance v19, Ljava/lang/StringBuilder;

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

    move-object/from16 v0, v19

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

    move-result-object v19

    iget-object v0, v2, Landroid/content/pm/ApplicationInfo;->className:Ljava/lang/String;

    move-object/from16 v20, v0

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

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

    move-result-object v19

    move-object/from16 v0, v19

    iput-object v0, v2, Landroid/content/pm/ApplicationInfo;->className:Ljava/lang/String;

    .line 367
    :cond_54f
    const-string v19, "t"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v19

    move/from16 v0, v19

    iput v0, v2, Landroid/content/pm/ApplicationInfo;->theme:I

    .line 368
    iput-object v2, v8, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    .line 369
    const-string v2, "a"

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v19

    .line 370
    if-eqz v19, :cond_615

    invoke-virtual/range {v19 .. v19}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-lez v2, :cond_615

    .line 371
    new-instance v20, Ljava/util/ArrayList;

    invoke-direct/range {v20 .. v20}, Ljava/util/ArrayList;-><init>()V

    .line 372
    const/4 v2, 0x0

    :goto_571
    invoke-virtual/range {v19 .. v19}, Lorg/json/JSONArray;->length()I
    :try_end_574
    .catch Ljava/lang/Throwable; {:try_start_4fe .. :try_end_574} :catch_60f
    .catchall {:try_start_4fe .. :try_end_574} :catchall_1ea

    move-result v21

    move/from16 v0, v21

    if-ge v2, v0, :cond_6c6

    .line 374
    :try_start_579
    move-object/from16 v0, v19

    invoke-virtual {v0, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v21

    .line 375
    if-eqz v21, :cond_606

    .line 376
    new-instance v22, Landroid/content/pm/ActivityInfo;

    invoke-direct/range {v22 .. v22}, Landroid/content/pm/ActivityInfo;-><init>()V

    .line 377
    const-string v23, "n"

    move-object/from16 v0, v21

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v23

    move-object/from16 v0, v23

    move-object/from16 v1, v22

    iput-object v0, v1, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    .line 378
    move-object/from16 v0, v22

    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    move-object/from16 v23, v0

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

    move-result v23

    if-nez v23, :cond_5cf

    move-object/from16 v0, v22

    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    move-object/from16 v23, v0

    const-string v24, "."

    .line 379
    invoke-virtual/range {v23 .. v24}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v23

    if-eqz v23, :cond_5cf

    .line 380
    new-instance v23, Ljava/lang/StringBuilder;

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

    move-object/from16 v0, v23

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

    move-result-object v23

    move-object/from16 v0, v22

    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    move-object/from16 v24, v0

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

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

    move-result-object v23

    move-object/from16 v0, v23

    move-object/from16 v1, v22

    iput-object v0, v1, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    .line 382
    :cond_5cf
    move-object/from16 v0, v22

    iput-object v4, v0, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;

    .line 383
    const-string v23, "t"

    move-object/from16 v0, v21

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v23

    move/from16 v0, v23

    move-object/from16 v1, v22

    iput v0, v1, Landroid/content/pm/ActivityInfo;->theme:I

    .line 384
    const-string v23, "l"

    move-object/from16 v0, v21

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v21

    move/from16 v0, v21

    move-object/from16 v1, v22

    iput v0, v1, Landroid/content/pm/ActivityInfo;->labelRes:I

    .line 385
    move-object/from16 v0, v22

    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    move-object/from16 v21, v0

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

    move-result v21

    if-nez v21, :cond_606

    .line 386
    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_606
    .catch Ljava/lang/Throwable; {:try_start_579 .. :try_end_606} :catch_60a
    .catchall {:try_start_579 .. :try_end_606} :catchall_1ea

    .line 372
    :cond_606
    :goto_606
    add-int/lit8 v2, v2, 0x1

    goto/16 :goto_571

    .line 390
    :catch_60a
    move-exception v21

    :try_start_60b
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_60e
    .catch Ljava/lang/Throwable; {:try_start_60b .. :try_end_60e} :catch_60f
    .catchall {:try_start_60b .. :try_end_60e} :catchall_1ea

    goto :goto_606

    .line 400
    :catch_60f
    move-exception v2

    const/4 v2, 0x0

    move-object v8, v2

    .line 401
    :try_start_612
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V

    .line 404
    :cond_615
    :goto_615
    new-instance v2, Lcom/baidu/sofire/core/ApkInfo;

    invoke-direct/range {v2 .. v7}, Lcom/baidu/sofire/core/ApkInfo;-><init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 406
    if-eqz v9, :cond_6de

    const/4 v5, 0x1

    :goto_61d
    iput v5, v2, Lcom/baidu/sofire/core/ApkInfo;->isOnce:I
    :try_end_61f
    .catchall {:try_start_612 .. :try_end_61f} :catchall_1ea

    .line 408
    :try_start_61f
    const-string v5, "pr"

    move-object/from16 v0, v18

    invoke-virtual {v0, v5}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I

    move-result v5

    iput v5, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I
    :try_end_629
    .catch Ljava/lang/Throwable; {:try_start_61f .. :try_end_629} :catch_6e1
    .catchall {:try_start_61f .. :try_end_629} :catchall_1ea

    .line 412
    :goto_629
    :try_start_629
    const-string v5, "mem"

    move-object/from16 v0, v18

    invoke-virtual {v0, v5}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v5

    const/4 v6, 0x1

    if-ne v5, v6, :cond_6e7

    const/4 v5, 0x1

    :goto_635
    iput-boolean v5, v2, Lcom/baidu/sofire/core/ApkInfo;->isMem:Z

    .line 413
    if-eqz v8, :cond_63b

    .line 414
    iput-object v8, v2, Lcom/baidu/sofire/core/ApkInfo;->cloudPkgInfo:Landroid/content/pm/PackageInfo;

    .line 416
    :cond_63b
    const-string v5, "e"

    move-object/from16 v0, v18

    invoke-virtual {v0, v5}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v5

    .line 417
    if-eqz v5, :cond_655

    .line 418
    const-string v6, "d"

    invoke-virtual {v5, v6}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v6

    .line 419
    const-string v7, "n"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v5

    .line 420
    iput v6, v2, Lcom/baidu/sofire/core/ApkInfo;->duration:I

    .line 421
    iput v5, v2, Lcom/baidu/sofire/core/ApkInfo;->network:I

    .line 423
    :cond_655
    const/4 v5, 0x0

    .line 424
    const-string v6, "ext"

    move-object/from16 v0, v18

    invoke-virtual {v0, v6}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v6

    .line 425
    if-eqz v6, :cond_6f3

    .line 426
    const-string v5, "nl"

    const/4 v7, 0x0

    invoke-virtual {v6, v5, v7}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v5

    const/4 v7, 0x1

    if-ne v5, v7, :cond_6ea

    const/4 v5, 0x1

    .line 427
    :goto_66b
    new-instance v7, Ljava/lang/StringBuilder;

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

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

    move-result-object v4

    const-string v7, " nlld "

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

    move-result-object v4

    invoke-static {v5}, Ljava/lang/Boolean;->toString(Z)Ljava/lang/String;

    move-result-object v7

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 428
    const-string v4, "a"

    invoke-virtual {v6, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    .line 429
    const/4 v6, 0x1

    if-ne v4, v6, :cond_6f3

    .line 430
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v4}, Lcom/baidu/sofire/e;->r()Ljava/util/List;

    move-result-object v6

    .line 434
    if-lez v3, :cond_6f3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-interface {v6, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_6f3

    .line 435
    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-interface {v6, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 436
    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v3

    new-array v7, v3, [I

    .line 437
    const/4 v3, 0x0

    move v4, v3

    :goto_6b0
    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v3

    if-ge v4, v3, :cond_6ec

    .line 438
    invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Integer;

    invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I

    move-result v3

    aput v3, v7, v4
    :try_end_6c2
    .catchall {:try_start_629 .. :try_end_6c2} :catchall_1ea

    .line 437
    add-int/lit8 v3, v4, 0x1

    move v4, v3

    goto :goto_6b0

    .line 393
    :cond_6c6
    :try_start_6c6
    invoke-interface/range {v20 .. v20}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_615

    .line 395
    invoke-interface/range {v20 .. v20}, Ljava/util/List;->size()I

    move-result v2

    new-array v2, v2, [Landroid/content/pm/ActivityInfo;

    .line 396
    move-object/from16 v0, v20

    invoke-interface {v0, v2}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v2

    check-cast v2, [Landroid/content/pm/ActivityInfo;

    iput-object v2, v8, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;
    :try_end_6dc
    .catch Ljava/lang/Throwable; {:try_start_6c6 .. :try_end_6dc} :catch_60f
    .catchall {:try_start_6c6 .. :try_end_6dc} :catchall_1ea

    goto/16 :goto_615

    .line 406
    :cond_6de
    const/4 v5, 0x0

    goto/16 :goto_61d

    .line 410
    :catch_6e1
    move-exception v5

    const/4 v5, -0x1

    :try_start_6e3
    iput v5, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    goto/16 :goto_629

    .line 412
    :cond_6e7
    const/4 v5, 0x0

    goto/16 :goto_635

    .line 426
    :cond_6ea
    const/4 v5, 0x0

    goto :goto_66b

    .line 440
    :cond_6ec
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v3, v7}, Lcom/baidu/sofire/e;->a([I)V

    :cond_6f3
    move v4, v5

    .line 445
    iput-object v10, v2, Lcom/baidu/sofire/core/ApkInfo;->signMD5:Ljava/lang/String;

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

    move-result-wide v6

    iput-wide v6, v2, Lcom/baidu/sofire/core/ApkInfo;->startTime:J

    .line 447
    invoke-interface {v12, v2}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result v5

    .line 448
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v6, "t="

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

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

    move-result-object v3

    const-string v6, ", i="

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

    move-result-object v3

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 449
    new-instance v3, Lcom/baidu/sofire/core/ApkInfo;

    invoke-direct {v3, v2}, Lcom/baidu/sofire/core/ApkInfo;-><init>(Lcom/baidu/sofire/core/ApkInfo;)V

    .line 450
    iget-object v6, v2, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    invoke-static {v6}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-nez v6, :cond_735

    .line 451
    new-instance v6, Ljava/lang/StringBuilder;

    iget-object v7, v3, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

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

    .line 452
    invoke-virtual {v6}, Ljava/lang/StringBuilder;->reverse()Ljava/lang/StringBuilder;

    move-result-object v6

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

    move-result-object v6

    iput-object v6, v3, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    .line 454
    :cond_735
    invoke-interface {v12, v3}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result v3

    .line 455
    if-ltz v3, :cond_73e

    .line 456
    invoke-interface {v12, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 458
    :cond_73e
    if-ltz v5, :cond_7dd

    .line 460
    invoke-interface {v12, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/baidu/sofire/core/ApkInfo;

    .line 461
    iget-object v6, v2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    iget-object v7, v3, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    .line 462
    invoke-static {v6, v7}, Lcom/baidu/sofire/i/d;->b(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_7c4

    sget-object v6, Lcom/baidu/sofire/core/d;->c:Ljava/util/List;

    if-eqz v6, :cond_768

    sget-object v6, Lcom/baidu/sofire/core/d;->c:Ljava/util/List;

    if-eqz v6, :cond_766

    sget-object v6, Lcom/baidu/sofire/core/d;->c:Ljava/util/List;

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 466
    invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    invoke-interface {v6, v7}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_768

    :cond_766
    if-eqz v4, :cond_7c4

    .line 468
    :cond_768
    iget v6, v3, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    if-eq v6, v7, :cond_779

    .line 469
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    iget v8, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    invoke-virtual {v6, v7, v8}, Lcom/baidu/sofire/c/a;->c(II)V

    .line 472
    :cond_779
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v3, v3, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v6, v3}, Lcom/baidu/sofire/c/a;->e(I)Z

    move-result v3

    if-nez v3, :cond_7bf

    .line 473
    if-eqz v4, :cond_7a9

    .line 474
    new-instance v3, Ljava/lang/StringBuilder;

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

    iget-object v4, v2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v3

    const-string v4, " "

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

    move-result-object v3

    iget v4, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v3

    const-string v4, " nl is t"

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 475
    const/4 v3, 0x1

    iput-boolean v3, v2, Lcom/baidu/sofire/core/ApkInfo;->isNextLoad:Z

    .line 477
    :cond_7a9
    invoke-interface {v14, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 478
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    if-eqz v3, :cond_7bf

    .line 479
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    iget v2, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 491
    :cond_7bf
    :goto_7bf
    invoke-interface {v12, v5}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    goto/16 :goto_41a

    .line 483
    :cond_7c4
    iget v4, v3, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    iget v6, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    if-eq v4, v6, :cond_7d9

    .line 484
    iget v4, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    iput v4, v3, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    .line 485
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v6, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    iget v2, v2, Lcom/baidu/sofire/core/ApkInfo;->priority:I

    invoke-virtual {v4, v6, v2}, Lcom/baidu/sofire/c/a;->c(II)V

    .line 489
    :cond_7d9
    invoke-interface {v13, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_7bf

    .line 494
    :cond_7dd
    invoke-interface {v14, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 495
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    if-eqz v3, :cond_41a

    .line 496
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->mDownloadPluginsList:Ljava/util/List;

    iget v2, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto/16 :goto_41a

    .line 501
    :cond_7f5
    sget-object v2, Lcom/baidu/sofire/core/d;->c:Ljava/util/List;

    if-eqz v2, :cond_7fe

    .line 502
    sget-object v2, Lcom/baidu/sofire/core/d;->c:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 505
    :cond_7fe
    new-instance v2, Ljava/lang/StringBuilder;

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 508
    invoke-interface {v12}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_80d
    :goto_80d
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_83e

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/baidu/sofire/core/ApkInfo;

    .line 509
    iget-object v4, v2, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    invoke-interface {v15, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_80d

    .line 512
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    if-eqz v4, :cond_834

    .line 513
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->mUnloadPluginsList:Ljava/util/List;

    iget v5, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 515
    :cond_834
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    iget-object v2, v2, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v4, v2}, Lcom/baidu/sofire/core/d;->a(Ljava/lang/String;)V

    goto :goto_80d

    .line 517
    :cond_83e
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    invoke-static {v2}, Lcom/baidu/sofire/i/d;->c(Landroid/content/Context;)V

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

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

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 520
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

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

    move-result-object v2

    invoke-static {v2}, Lcom/baidu/sofire/core/g;->a(Landroid/content/Context;)Lcom/baidu/sofire/core/g;

    move-result-object v5

    .line 523
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->s()Ljava/util/List;

    move-result-object v3

    .line 524
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v2}, Lcom/baidu/sofire/e;->r()Ljava/util/List;

    move-result-object v4

    .line 526
    const/4 v2, 0x0

    :goto_86d
    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v6

    if-ge v2, v6, :cond_887

    .line 527
    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    invoke-interface {v3, v6}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_884

    .line 528
    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    invoke-interface {v3, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 526
    :cond_884
    add-int/lit8 v2, v2, 0x1

    goto :goto_86d

    .line 531
    :cond_887
    new-instance v6, Ljava/util/ArrayList;

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

    .line 532
    invoke-interface {v6, v13}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 533
    invoke-interface {v6, v14}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 534
    new-instance v2, Lcom/baidu/sofire/ac/U$1;

    move-object/from16 v0, p0

    invoke-direct {v2, v0, v3}, Lcom/baidu/sofire/ac/U$1;-><init>(Lcom/baidu/sofire/ac/U;Ljava/util/List;)V

    invoke-static {v6, v2}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    .line 572
    const/4 v2, 0x0

    move v4, v2

    :goto_89e
    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v2

    if-ge v4, v2, :cond_9ac

    .line 573
    invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/baidu/sofire/core/ApkInfo;

    .line 574
    invoke-interface {v13, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_994

    .line 575
    iget-object v3, v2, Lcom/baidu/sofire/core/ApkInfo;->packageName:Ljava/lang/String;

    .line 576
    invoke-virtual {v5, v3}, Lcom/baidu/sofire/core/g;->d(Ljava/lang/String;)Lcom/baidu/sofire/core/ApkInfo;

    move-result-object v3

    .line 577
    if-nez v3, :cond_933

    .line 579
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v3, v7}, Lcom/baidu/sofire/c/a;->g(I)I

    move-result v7

    .line 580
    const/4 v3, 0x1

    .line 581
    const/4 v8, 0x3

    if-ne v7, v8, :cond_8ca

    .line 582
    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    .line 583
    const/4 v3, 0x0

    .line 585
    :cond_8ca
    move-object/from16 v0, p0

    iget-object v7, v0, Lcom/baidu/sofire/ac/U;->preference:Lcom/baidu/sofire/e;

    invoke-virtual {v7}, Lcom/baidu/sofire/e;->c()Z

    move-result v7

    if-eqz v7, :cond_938

    if-eqz v3, :cond_938

    .line 586
    new-instance v3, Ljava/io/File;

    move-object/from16 v0, p0

    iget-object v7, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    .line 587
    invoke-virtual {v7}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v7

    const-string v8, ".b"

    invoke-direct {v3, v7, v8}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 588
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v7

    if-nez v7, :cond_8ee

    .line 589
    invoke-virtual {v3}, Ljava/io/File;->mkdir()Z

    .line 592
    :cond_8ee
    new-instance v7, Ljava/io/File;

    iget-object v8, v2, Lcom/baidu/sofire/core/ApkInfo;->pkgPath:Ljava/lang/String;

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

    .line 593
    new-instance v8, Ljava/io/File;

    new-instance v9, Ljava/lang/StringBuilder;

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

    iget v10, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v9

    const-string v10, "-"

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

    move-result-object v9

    iget-object v10, v2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v9

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

    move-result-object v9

    invoke-direct {v8, v3, v9}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 595
    invoke-static {v8}, Lcom/baidu/sofire/i/d;->a(Ljava/io/File;)Z

    move-result v3

    if-nez v3, :cond_91e

    .line 596
    invoke-static {v7, v8}, Lcom/baidu/sofire/i/d;->a(Ljava/io/File;Ljava/io/File;)V

    .line 598
    :cond_91e
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    iget v9, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    .line 599
    invoke-static {v3, v9, v7, v8}, Lcom/baidu/sofire/c;->a(Landroid/content/Context;ILjava/io/File;Ljava/io/File;)V

    .line 614
    :cond_927
    :goto_927
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    iget-object v2, v2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

    const/4 v8, 0x0

    invoke-virtual {v3, v7, v2, v8}, Lcom/baidu/sofire/core/d;->a(ILjava/lang/String;Landroid/content/pm/PackageInfo;)Z

    .line 572
    :cond_933
    :goto_933
    add-int/lit8 v2, v4, 0x1

    move v4, v2

    goto/16 :goto_89e

    .line 602
    :cond_938
    new-instance v3, Ljava/io/File;

    move-object/from16 v0, p0

    iget-object v7, v0, Lcom/baidu/sofire/ac/U;->context:Landroid/content/Context;

    .line 603
    invoke-virtual {v7}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v7

    const-string v8, ".b"

    invoke-direct {v3, v7, v8}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 604
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v7

    if-eqz v7, :cond_927

    .line 605
    new-instance v7, Ljava/io/File;

    new-instance v8, Ljava/lang/StringBuilder;

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

    iget v9, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

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

    move-result-object v8

    const-string v9, "-"

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

    move-result-object v8

    iget-object v9, v2, Lcom/baidu/sofire/core/ApkInfo;->versionName:Ljava/lang/String;

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

    move-result-object v8

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

    move-result-object v8

    invoke-direct {v7, v3, v8}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 607
    invoke-static {v7}, Lcom/baidu/sofire/i/d;->a(Ljava/io/File;)Z

    move-result v3

    if-eqz v3, :cond_927

    .line 608
    invoke-static {v7}, Lcom/baidu/sofire/c;->a(Ljava/io/File;)V

    .line 609
    invoke-virtual {v7}, Ljava/io/File;->delete()Z

    move-result v3

    .line 610
    new-instance v8, Ljava/lang/StringBuilder;

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

    invoke-virtual {v7}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v7

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

    move-result-object v7

    const-string v8, " s="

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

    move-result-object v7

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

    invoke-static {}, Lcom/baidu/sofire/b;->a()V

    goto :goto_927

    .line 617
    :cond_994
    invoke-interface {v14, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_933

    .line 618
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->loadedPluginDB:Lcom/baidu/sofire/c/a;

    iget v7, v2, Lcom/baidu/sofire/core/ApkInfo;->key:I

    invoke-virtual {v3, v7}, Lcom/baidu/sofire/c/a;->e(I)Z

    move-result v3

    if-nez v3, :cond_933

    .line 620
    move-object/from16 v0, p0

    invoke-direct {v0, v2}, Lcom/baidu/sofire/ac/U;->handlePluginUpgrade(Lcom/baidu/sofire/core/ApkInfo;)V

    goto :goto_933

    .line 624
    :cond_9ac
    monitor-exit v11
    :try_end_9ad
    .catchall {:try_start_6e3 .. :try_end_9ad} :catchall_1ea

    .line 625
    :try_start_9ad
    move-object/from16 v0, p0

    iget v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v2, :cond_9b8

    .line 626
    const/4 v2, 0x1

    move-object/from16 v0, p0

    iput v2, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 628
    :cond_9b8
    const/4 v2, 0x0

    move-object/from16 v0, p0

    invoke-direct {v0, v2}, Lcom/baidu/sofire/ac/U;->handleThreadEnd(Ljava/lang/String;)V
    :try_end_9be
    .catch Ljava/lang/Throwable; {:try_start_9ad .. :try_end_9be} :catch_1ed
    .catchall {:try_start_9ad .. :try_end_9be} :catchall_206

    .line 656
    :try_start_9be
    move-object/from16 v0, p0

    iget-boolean v2, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-eqz v2, :cond_b

    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z

    if-eqz v2, :cond_b

    .line 657
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_9cb
    .catch Ljava/lang/Throwable; {:try_start_9be .. :try_end_9cb} :catch_9cd
    .catchall {:try_start_9be .. :try_end_9cb} :catchall_67

    goto/16 :goto_b

    .line 660
    :catch_9cd
    move-exception v2

    :try_start_9ce
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_9d1
    .catchall {:try_start_9ce .. :try_end_9d1} :catchall_67

    goto/16 :goto_b

    .line 633
    :cond_9d3
    :try_start_9d3
    invoke-static {v2}, Lcom/baidu/sofire/b;->a(Ljava/lang/Throwable;)Ljava/lang/String;

    invoke-static {}, Lcom/baidu/sofire/b;->b()V
    :try_end_9d9
    .catchall {:try_start_9d3 .. :try_end_9d9} :catchall_206

    .line 635
    :try_start_9d9
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/baidu/sofire/ac/U;->forHostAPP:Lcom/baidu/sofire/core/d;

    invoke-virtual {v3}, Lcom/baidu/sofire/core/d;->c()V
    :try_end_9e0
    .catch Ljava/lang/Throwable; {:try_start_9d9 .. :try_end_9e0} :catch_a15
    .catchall {:try_start_9d9 .. :try_end_9e0} :catchall_206

    .line 640
    :goto_9e0
    :try_start_9e0
    move-object/from16 v0, p0

    iget v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    if-nez v3, :cond_9f7

    .line 641
    invoke-virtual {v2}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object v3

    const-string v4, "response is empty"

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

    move-result v3

    if-eqz v3, :cond_a1a

    .line 642
    const/4 v3, 0x7

    move-object/from16 v0, p0

    iput v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I

    .line 649
    :cond_9f7
    :goto_9f7
    invoke-static {v2}, Lcom/baidu/sofire/b;->a(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object v2

    move-object/from16 v0, p0

    invoke-direct {v0, v2}, Lcom/baidu/sofire/ac/U;->handleThreadEnd(Ljava/lang/String;)V
    :try_end_a00
    .catch Ljava/lang/Throwable; {:try_start_9e0 .. :try_end_a00} :catch_a2d
    .catchall {:try_start_9e0 .. :try_end_a00} :catchall_206

    .line 656
    :goto_a00
    :try_start_a00
    move-object/from16 v0, p0

    iget-boolean v2, v0, Lcom/baidu/sofire/ac/U;->mOut:Z

    if-eqz v2, :cond_b

    sget-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z

    if-eqz v2, :cond_b

    .line 657
    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/sofire/ac/U;->sOutGoing:Z
    :try_end_a0d
    .catch Ljava/lang/Throwable; {:try_start_a00 .. :try_end_a0d} :catch_a0f
    .catchall {:try_start_a00 .. :try_end_a0d} :catchall_67

    goto/16 :goto_b

    .line 660
    :catch_a0f
    move-exception v2

    :try_start_a10
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_a13
    .catchall {:try_start_a10 .. :try_end_a13} :catchall_67

    goto/16 :goto_b

    .line 637
    :catch_a15
    move-exception v3

    :try_start_a16
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_a19
    .catchall {:try_start_a16 .. :try_end_a19} :catchall_206

    goto :goto_9e0

    .line 643
    :cond_a1a
    :try_start_a1a
    invoke-virtual {v2}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object v3

    const-string v4, "aes is fail"

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

    move-result v3

    if-eqz v3, :cond_a32

    .line 644
    const/16 v3, 0x8

    move-object/from16 v0, p0

    iput v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I
    :try_end_a2c
    .catch Ljava/lang/Throwable; {:try_start_a1a .. :try_end_a2c} :catch_a2d
    .catchall {:try_start_a1a .. :try_end_a2c} :catchall_206

    goto :goto_9f7

    .line 651
    :catch_a2d
    move-exception v2

    :try_start_a2e
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_a31
    .catchall {:try_start_a2e .. :try_end_a31} :catchall_206

    goto :goto_a00

    .line 646
    :cond_a32
    const/16 v3, 0xb

    :try_start_a34
    move-object/from16 v0, p0

    iput v3, v0, Lcom/baidu/sofire/ac/U;->mEndReason:I
    :try_end_a38
    .catch Ljava/lang/Throwable; {:try_start_a34 .. :try_end_a38} :catch_a2d
    .catchall {:try_start_a34 .. :try_end_a38} :catchall_206

    goto :goto_9f7

    .line 660
    :catch_a39
    move-exception v3

    :try_start_a3a
    invoke-static {}, Lcom/baidu/sofire/i/d;->a()V
    :try_end_a3d
    .catchall {:try_start_a3a .. :try_end_a3d} :catchall_67

    goto/16 :goto_214

    :cond_a3f
    move-object v10, v2

    goto/16 :goto_49f
.end method