MainEntry.smali

.class public Lcom/keniu/security/MainEntry;
.super Lcom/keniu/security/InsetMainEntry;
.source "MainEntry.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "MainEntry"

.field private static theApp:Lcom/keniu/security/MainEntry;


# instance fields
.field private mMoApp:Lcom/keniu/security/l;

.field private mSubDexsLoaded:Z


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

    .prologue
    .line 64
    const/4 v0, 0x0

    sput-object v0, Lcom/keniu/security/MainEntry;->theApp:Lcom/keniu/security/MainEntry;

    return-void
.end method

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

    .prologue
    .line 68
    invoke-direct {p0}, Lcom/keniu/security/InsetMainEntry;-><init>()V

    .line 65
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    .line 66
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/keniu/security/MainEntry;->mSubDexsLoaded:Z

    .line 69
    sput-object p0, Lcom/keniu/security/MainEntry;->theApp:Lcom/keniu/security/MainEntry;

    .line 70
    return-void
.end method

.method private changeEULAAgreedState()V
    .registers 3

    .prologue
    .line 320
    :try_start_0
    invoke-static {}, Lcom/keniu/security/af;->c()Z

    move-result v0

    if-eqz v0, :cond_7

    .line 335
    :cond_6
    :goto_6
    return-void

    .line 324
    :cond_7
    const v0, 0x77ce42dd

    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/Commons;->getChannelId()I

    move-result v1

    if-eq v0, v1, :cond_6

    const v0, 0x186a8

    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/Commons;->getChannelId()I

    move-result v1

    if-eq v0, v1, :cond_6

    .line 328
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;->isEULAAgreed()Z

    move-result v0

    if-nez v0, :cond_6

    .line 329
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/UIConfigManager;->setUserAllowEULA(Z)V

    .line 330
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setAllowEULA(Z)V
    :try_end_3f
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_3f} :catch_40

    goto :goto_6

    .line 332
    :catch_40
    move-exception v0

    .line 333
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_6
.end method

.method private checkAutoStartPermissionState()V
    .registers 5

    .prologue
    .line 389
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->IsUIProcess()Z

    move-result v0

    if-nez v0, :cond_7

    .line 404
    :goto_6
    return-void

    .line 394
    :cond_7
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getServiceAliveLastTimeStamp()J

    move-result-wide v0

    .line 395
    const-wide/16 v2, 0x0

    cmp-long v2, v0, v2

    if-nez v2, :cond_1d

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

    move-result-wide v0

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

    move-result-wide v2

    .line 399
    sub-long v0, v2, v0

    const-wide/32 v2, 0x493e0

    cmp-long v0, v0, v2

    if-lez v0, :cond_37

    .line 400
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setAutoStartPermissionOpen(Z)V

    goto :goto_6

    .line 402
    :cond_37
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setAutoStartPermissionOpen(Z)V

    goto :goto_6
.end method

.method private closeAndroidPDialog()V
    .registers 5

    .prologue
    .line 299
    :try_start_0
    const-string v0, "android.content.pm.PackageParser$Package"

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    .line 300
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Class;

    const/4 v2, 0x0

    const-class v3, Ljava/lang/String;

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v0

    .line 301
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/lang/reflect/Constructor;->setAccessible(Z)V
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_16} :catch_40

    .line 306
    :goto_16
    :try_start_16
    const-string v0, "android.app.ActivityThread"

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    .line 307
    const-string v1, "currentActivityThread"

    const/4 v2, 0x0

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

    invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 308
    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Method;->setAccessible(Z)V

    .line 309
    const/4 v2, 0x0

    const/4 v3, 0x0

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

    invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    .line 310
    const-string v2, "mHiddenApiWarningShown"

    invoke-virtual {v0, v2}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    .line 311
    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 312
    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Field;->setBoolean(Ljava/lang/Object;Z)V
    :try_end_3f
    .catch Ljava/lang/Exception; {:try_start_16 .. :try_end_3f} :catch_45

    .line 316
    :goto_3f
    return-void

    .line 302
    :catch_40
    move-exception v0

    .line 303
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_16

    .line 313
    :catch_45
    move-exception v0

    .line 314
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_3f
.end method

.method private initMMKV(Landroid/content/Context;)V
    .registers 5

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

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

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

    move-result-object v1

    invoke-virtual {v1}, 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, "/mmkv"

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

    move-result-object v0

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

    move-result-object v0

    .line 182
    new-instance v1, Lcom/keniu/security/j;

    invoke-direct {v1, p0, p1}, Lcom/keniu/security/j;-><init>(Lcom/keniu/security/MainEntry;Landroid/content/Context;)V

    sget-object v2, Lcom/tencent/mmkv/MMKVLogLevel;->LevelInfo:Lcom/tencent/mmkv/MMKVLogLevel;

    invoke-static {v0, v1, v2}, Lcom/tencent/mmkv/MMKV;->initialize(Ljava/lang/String;Lcom/tencent/mmkv/MMKV$LibLoader;Lcom/tencent/mmkv/MMKVLogLevel;)Ljava/lang/String;

    .line 188
    return-void
.end method

.method private initNotificationCount()V
    .registers 2

    .prologue
    .line 165
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isUIProcess()Z

    move-result v0

    if-eqz v0, :cond_e

    .line 167
    :try_start_6
    new-instance v0, Lcom/keniu/security/i;

    invoke-direct {v0, p0}, Lcom/keniu/security/i;-><init>(Lcom/keniu/security/MainEntry;)V

    invoke-static {v0}, Lcom/ijinshan/pluginslive/plugin/reload/BackgroundThread;->a(Ljava/lang/Runnable;)V
    :try_end_e
    .catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_e} :catch_f

    .line 178
    :cond_e
    :goto_e
    return-void

    .line 174
    :catch_f
    move-exception v0

    goto :goto_e
.end method

.method private initWakeUpSdk()V
    .registers 3

    .prologue
    .line 414
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isUIProcess()Z

    move-result v0

    if-eqz v0, :cond_1f

    .line 416
    invoke-static {}, Lcom/sdk/plus/WusManager;->getInstance()Lcom/sdk/plus/WusManager;

    move-result-object v0

    const-class v1, Lcom/keniu/security/update/push/getui/InvokeActivity;

    invoke-virtual {v0, v1}, Lcom/sdk/plus/WusManager;->registerUserActivity(Ljava/lang/Class;)V

    .line 418
    invoke-static {}, Lcom/sdk/plus/WusManager;->getInstance()Lcom/sdk/plus/WusManager;

    move-result-object v0

    const-class v1, Lcom/keniu/security/update/push/getui/MyWakedService;

    invoke-virtual {v0, v1}, Lcom/sdk/plus/WusManager;->registerUserService(Ljava/lang/Class;)V

    .line 423
    :try_start_18
    invoke-static {}, Lcom/sdk/plus/WusManager;->getInstance()Lcom/sdk/plus/WusManager;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/sdk/plus/WusManager;->init(Landroid/content/Context;)V
    :try_end_1f
    .catch Ljava/lang/Exception; {:try_start_18 .. :try_end_1f} :catch_20

    .line 428
    :cond_1f
    :goto_1f
    return-void

    .line 424
    :catch_20
    move-exception v0

    .line 425
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1f
.end method

.method private installReport()V
    .registers 2

    .prologue
    .line 191
    invoke-virtual {p0}, Lcom/keniu/security/MainEntry;->isUIProcess()Z

    move-result v0

    if-nez v0, :cond_c

    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isServiceProcess()Z

    move-result v0

    if-eqz v0, :cond_14

    .line 193
    :cond_c
    :try_start_c
    new-instance v0, Lcom/keniu/security/k;

    invoke-direct {v0, p0}, Lcom/keniu/security/k;-><init>(Lcom/keniu/security/MainEntry;)V

    invoke-static {v0}, Lcom/ijinshan/pluginslive/plugin/reload/BackgroundThread;->a(Ljava/lang/Runnable;)V
    :try_end_14
    .catch Ljava/lang/Error; {:try_start_c .. :try_end_14} :catch_15

    .line 208
    :cond_14
    :goto_14
    return-void

    .line 204
    :catch_15
    move-exception v0

    goto :goto_14
.end method

.method private loadSubDexes(Landroid/content/Context;)V
    .registers 8

    .prologue
    const/4 v1, 0x0

    .line 214
    iget-boolean v0, p0, Lcom/keniu/security/MainEntry;->mSubDexsLoaded:Z

    if-nez v0, :cond_b

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    if-lt v0, v2, :cond_c

    .line 255
    :cond_b
    :goto_b
    return-void

    .line 217
    :cond_c
    const/16 v0, 0x23

    invoke-static {v0}, Lcom/cleanmaster/loader/b;->a(C)V

    .line 222
    :try_start_11
    new-instance v2, Ljava/io/File;

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

    move-result-object v0

    const-string v3, "10270398_subdex.lck"

    invoke-direct {v2, v0, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_1c
    .catch Ljava/io/IOException; {:try_start_11 .. :try_end_1c} :catch_6a
    .catchall {:try_start_11 .. :try_end_1c} :catchall_93

    .line 223
    :try_start_1c
    new-instance v0, Ljava/io/FileOutputStream;

    invoke-direct {v0, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_21
    .catch Ljava/io/IOException; {:try_start_1c .. :try_end_21} :catch_c9
    .catchall {:try_start_1c .. :try_end_21} :catchall_b7

    .line 224
    :try_start_21
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->getChannel()Ljava/nio/channels/FileChannel;

    move-result-object v3

    invoke-virtual {v3}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock;
    :try_end_28
    .catch Ljava/io/IOException; {:try_start_21 .. :try_end_28} :catch_cc
    .catchall {:try_start_21 .. :try_end_28} :catchall_bb

    move-result-object v1

    .line 226
    :try_start_29
    sget-object v3, Lcom/keniu/security/MainEntry;->theApp:Lcom/keniu/security/MainEntry;

    iget-object v4, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    invoke-static {v3, v4}, Lcom/cleanmaster/loader/b;->a(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_30
    .catch Ljava/io/IOException; {:try_start_29 .. :try_end_30} :catch_cc
    .catchall {:try_start_29 .. :try_end_30} :catchall_c2

    .line 233
    if-eqz v1, :cond_35

    .line 235
    :try_start_32
    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->release()V
    :try_end_35
    .catch Ljava/io/IOException; {:try_start_32 .. :try_end_35} :catch_b1

    .line 239
    :cond_35
    :goto_35
    if-eqz v0, :cond_3a

    .line 241
    :try_start_37
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_37 .. :try_end_3a} :catch_65

    .line 246
    :cond_3a
    :goto_3a
    if-eqz v2, :cond_45

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

    move-result v0

    if-eqz v0, :cond_45

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

    .line 252
    :cond_45
    :goto_45
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/keniu/security/MainEntry;->mSubDexsLoaded:Z

    .line 253
    const-string v0, "MainEntry"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "loadSecondaryDexTime "

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

    move-result-object v1

    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->getLoadSubdexDuration()J

    move-result-wide v2

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

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_b

    .line 242
    :catch_65
    move-exception v0

    .line 243
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_3a

    .line 228
    :catch_6a
    move-exception v0

    move-object v0, v1

    move-object v2, v1

    .line 229
    :goto_6d
    const/4 v3, 0x0

    :try_start_6e
    invoke-static {v3}, Lcom/cleanmaster/loader/b;->a(I)V

    .line 231
    sget-object v3, Lcom/keniu/security/MainEntry;->theApp:Lcom/keniu/security/MainEntry;

    iget-object v4, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    invoke-static {v3, v4}, Lcom/cleanmaster/loader/b;->a(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_78
    .catchall {:try_start_6e .. :try_end_78} :catchall_c2

    .line 233
    if-eqz v1, :cond_7d

    .line 235
    :try_start_7a
    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->release()V
    :try_end_7d
    .catch Ljava/io/IOException; {:try_start_7a .. :try_end_7d} :catch_b3

    .line 239
    :cond_7d
    :goto_7d
    if-eqz v0, :cond_82

    .line 241
    :try_start_7f
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_82
    .catch Ljava/io/IOException; {:try_start_7f .. :try_end_82} :catch_8e

    .line 246
    :cond_82
    :goto_82
    if-eqz v2, :cond_45

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

    move-result v0

    if-eqz v0, :cond_45

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

    goto :goto_45

    .line 242
    :catch_8e
    move-exception v0

    .line 243
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_82

    .line 233
    :catchall_93
    move-exception v0

    move-object v2, v1

    move-object v3, v1

    :goto_96
    if-eqz v2, :cond_9b

    .line 235
    :try_start_98
    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->release()V
    :try_end_9b
    .catch Ljava/io/IOException; {:try_start_98 .. :try_end_9b} :catch_b5

    .line 239
    :cond_9b
    :goto_9b
    if-eqz v1, :cond_a0

    .line 241
    :try_start_9d
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
    :try_end_a0
    .catch Ljava/io/IOException; {:try_start_9d .. :try_end_a0} :catch_ac

    .line 246
    :cond_a0
    :goto_a0
    if-eqz v3, :cond_ab

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

    move-result v1

    if-eqz v1, :cond_ab

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

    :cond_ab
    throw v0

    .line 242
    :catch_ac
    move-exception v1

    .line 243
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_a0

    .line 236
    :catch_b1
    move-exception v1

    goto :goto_35

    :catch_b3
    move-exception v1

    goto :goto_7d

    :catch_b5
    move-exception v2

    goto :goto_9b

    .line 233
    :catchall_b7
    move-exception v0

    move-object v3, v2

    move-object v2, v1

    goto :goto_96

    :catchall_bb
    move-exception v3

    move-object v5, v3

    move-object v3, v2

    move-object v2, v1

    move-object v1, v0

    move-object v0, v5

    goto :goto_96

    :catchall_c2
    move-exception v3

    move-object v5, v3

    move-object v3, v2

    move-object v2, v1

    move-object v1, v0

    move-object v0, v5

    goto :goto_96

    .line 228
    :catch_c9
    move-exception v0

    move-object v0, v1

    goto :goto_6d

    :catch_cc
    move-exception v3

    goto :goto_6d
.end method


# virtual methods
.method protected attachBaseContext(Landroid/content/Context;)V
    .registers 5

    .prologue
    .line 75
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setAppStartTime()V

    .line 79
    invoke-static {p1}, Lcom/cleanmaster/hpsharelib/crash/ProbeCrash;->Probe(Landroid/content/Context;)V

    .line 81
    invoke-super {p0, p1}, Lcom/keniu/security/InsetMainEntry;->attachBaseContext(Landroid/content/Context;)V

    .line 86
    invoke-virtual {p0, p1}, Lcom/keniu/security/MainEntry;->getProcessName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    .line 87
    const-string v0, "MainEntry"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "new process "

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

    move-result-object v1

    iget-object v2, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

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

    move-result-object v1

    const-string v2, " created"

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

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 89
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->Init(Ljava/lang/String;)V

    .line 91
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setLoadSubdexStartTime()V

    .line 92
    invoke-direct {p0, p1}, Lcom/keniu/security/MainEntry;->loadSubDexes(Landroid/content/Context;)V

    .line 93
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setLoadSubdexEndTime()V

    .line 95
    invoke-direct {p0, p1}, Lcom/keniu/security/MainEntry;->initMMKV(Landroid/content/Context;)V

    .line 97
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->init(Ljava/lang/String;)V

    .line 99
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/ipc/ServiceManager;->getInstance()Lcom/cleanmaster/hpsharelib/base/ipc/ServiceManager;

    move-result-object v0

    sget-object v1, Lcom/cleanmaster/service/ap;->a:[Lcom/cleanmaster/hpsharelib/base/ipc/data/ServiceClassInfo;

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/base/ipc/ServiceManager;->registerServices([Lcom/cleanmaster/hpsharelib/base/ipc/data/ServiceClassInfo;)V

    .line 102
    :try_start_4e
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isUIProcess()Z

    move-result v0

    if-eqz v0, :cond_79

    .line 103
    const-class v0, Lcom/keniu/security/ab;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;
    :try_end_66
    .catch Ljava/lang/ClassNotFoundException; {:try_start_4e .. :try_end_66} :catch_92
    .catch Ljava/lang/InstantiationException; {:try_start_4e .. :try_end_66} :catch_b0
    .catch Ljava/lang/IllegalAccessException; {:try_start_4e .. :try_end_66} :catch_ce

    .line 123
    :goto_66
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    if-nez v0, :cond_101

    .line 125
    const-string v0, "MainEntry"

    const-string v1, "CRITICAL EXCEPTION!! UNABLE INSTANCE MoSecurityApplication."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 126
    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v0

    invoke-static {v0}, Landroid/os/Process;->killProcess(I)V

    .line 162
    :cond_78
    :goto_78
    return-void

    .line 104
    :cond_79
    :try_start_79
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isServiceProcess()Z

    move-result v0

    if-eqz v0, :cond_97

    .line 105
    const-class v0, Lcom/keniu/security/y;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;
    :try_end_91
    .catch Ljava/lang/ClassNotFoundException; {:try_start_79 .. :try_end_91} :catch_92
    .catch Ljava/lang/InstantiationException; {:try_start_79 .. :try_end_91} :catch_b0
    .catch Ljava/lang/IllegalAccessException; {:try_start_79 .. :try_end_91} :catch_ce

    goto :goto_66

    .line 115
    :catch_92
    move-exception v0

    .line 116
    invoke-virtual {v0}, Ljava/lang/ClassNotFoundException;->printStackTrace()V

    goto :goto_66

    .line 106
    :cond_97
    :try_start_97
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isWorkerProcess()Z

    move-result v0

    if-eqz v0, :cond_b5

    .line 107
    const-class v0, Lcom/keniu/security/ag;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;
    :try_end_af
    .catch Ljava/lang/ClassNotFoundException; {:try_start_97 .. :try_end_af} :catch_92
    .catch Ljava/lang/InstantiationException; {:try_start_97 .. :try_end_af} :catch_b0
    .catch Ljava/lang/IllegalAccessException; {:try_start_97 .. :try_end_af} :catch_ce

    goto :goto_66

    .line 117
    :catch_b0
    move-exception v0

    .line 118
    invoke-virtual {v0}, Ljava/lang/InstantiationException;->printStackTrace()V

    goto :goto_66

    .line 108
    :cond_b5
    :try_start_b5
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isCrashProcess()Z

    move-result v0

    if-eqz v0, :cond_d3

    .line 109
    const-class v0, Lcom/keniu/security/a;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;
    :try_end_cd
    .catch Ljava/lang/ClassNotFoundException; {:try_start_b5 .. :try_end_cd} :catch_92
    .catch Ljava/lang/InstantiationException; {:try_start_b5 .. :try_end_cd} :catch_b0
    .catch Ljava/lang/IllegalAccessException; {:try_start_b5 .. :try_end_cd} :catch_ce

    goto :goto_66

    .line 119
    :catch_ce
    move-exception v0

    .line 120
    invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_66

    .line 110
    :cond_d3
    :try_start_d3
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isDeamonProcess()Z

    move-result v0

    if-eqz v0, :cond_ed

    .line 111
    const-class v0, Lcom/keniu/security/c;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    goto/16 :goto_66

    .line 113
    :cond_ed
    const-class v0, Lcom/keniu/security/u;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/keniu/security/l;

    iput-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;
    :try_end_ff
    .catch Ljava/lang/ClassNotFoundException; {:try_start_d3 .. :try_end_ff} :catch_92
    .catch Ljava/lang/InstantiationException; {:try_start_d3 .. :try_end_ff} :catch_b0
    .catch Ljava/lang/IllegalAccessException; {:try_start_d3 .. :try_end_ff} :catch_ce

    goto/16 :goto_66

    .line 134
    :cond_101
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-virtual {v0, p1}, Lcom/keniu/security/l;->b(Landroid/content/Context;)V

    .line 135
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    iget-object v1, p0, Lcom/keniu/security/MainEntry;->mProcName:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/keniu/security/l;->a(Ljava/lang/String;)V

    .line 137
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-virtual {v0, p0}, Lcom/keniu/security/l;->a(Landroid/app/Application;)V

    .line 139
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-static {v0}, Lorg/acdd/framework/ActivityRecorder;->registerActivityRecorder(Lorg/acdd/android/compat/IActivityRecorder;)V

    .line 140
    invoke-static {}, Lcom/cleanmaster/base/plugin/gj;->a()V

    .line 142
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->installReport()V

    .line 143
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->initNotificationCount()V

    .line 145
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/ijinshan/cloudconfig/init/CloudConfigEnv;->setApplicationContext(Landroid/content/Context;)V

    .line 146
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isServiceProcess()Z

    move-result v0

    if-eqz v0, :cond_13a

    .line 151
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isUIProcess()Z

    move-result v1

    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isServiceProcess()Z

    move-result v2

    invoke-virtual {v0, v1, v2}, Lcom/keniu/security/l;->a(ZZ)V

    .line 154
    :cond_13a
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setAttachBaseContextEndTime()V

    .line 156
    invoke-static {}, Lcom/cleanmaster/e/a/a;->a()V

    .line 157
    invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/hpcommonlib/utils/PackageManagerWrapper;->init(Landroid/content/Context;)V

    .line 158
    invoke-static {}, Lcom/immortal/aegis/a;->a()Lcom/immortal/aegis/a;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/immortal/aegis/a;->a(Landroid/content/Context;)V

    .line 159
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->isUIProcess()Z

    move-result v0

    if-eqz v0, :cond_78

    .line 160
    invoke-static {}, Lcom/cleanmaster/daemon/accountManager/CMAccountManager;->get()Lcom/cleanmaster/daemon/accountManager/CMAccountManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/cleanmaster/daemon/accountManager/CMAccountManager;->init(Landroid/content/Context;)V

    goto/16 :goto_78
.end method

.method public getProcessName(Landroid/content/Context;)Ljava/lang/String;
    .registers 7

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

    const-string v1, "/proc/self/cmdline"

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

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

    move-result v1

    if-eqz v1, :cond_41

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

    move-result v1

    if-nez v1, :cond_41

    .line 348
    const/4 v2, 0x0

    .line 350
    :try_start_14
    new-instance v1, Ljava/io/BufferedReader;

    new-instance v3, Ljava/io/InputStreamReader;

    new-instance v4, Ljava/io/FileInputStream;

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

    invoke-direct {v3, v4}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    invoke-direct {v1, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_23
    .catch Ljava/lang/Exception; {:try_start_14 .. :try_end_23} :catch_7b
    .catchall {:try_start_14 .. :try_end_23} :catchall_8b

    .line 351
    :try_start_23
    invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v0

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

    move-result v2

    if-nez v2, :cond_3c

    .line 354
    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
    :try_end_30
    .catch Ljava/lang/Exception; {:try_start_23 .. :try_end_30} :catch_a1
    .catchall {:try_start_23 .. :try_end_30} :catchall_9e

    move-result-object v0

    .line 358
    if-eqz v1, :cond_36

    .line 360
    :try_start_33
    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
    :try_end_36
    .catch Ljava/lang/Exception; {:try_start_33 .. :try_end_36} :catch_37

    .line 385
    :cond_36
    :goto_36
    return-object v0

    .line 361
    :catch_37
    move-exception v1

    .line 362
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_36

    .line 358
    :cond_3c
    if-eqz v1, :cond_41

    .line 360
    :try_start_3e
    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
    :try_end_41
    .catch Ljava/lang/Exception; {:try_start_3e .. :try_end_41} :catch_76

    .line 368
    :cond_41
    :goto_41
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x15

    if-lt v0, v1, :cond_97

    .line 370
    const-string v0, "activity"

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

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 371
    if-eqz v0, :cond_97

    .line 372
    invoke-virtual {v0}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object v0

    .line 373
    if-eqz v0, :cond_97

    .line 374
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

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

    move-result v0

    if-eqz v0, :cond_97

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

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager$RunningAppProcessInfo;

    .line 375
    iget v2, v0, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v3

    if-ne v2, v3, :cond_5b

    .line 376
    iget-object v0, v0, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

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

    move-result-object v0

    goto :goto_36

    .line 361
    :catch_76
    move-exception v0

    .line 362
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_41

    .line 355
    :catch_7b
    move-exception v0

    move-object v1, v2

    .line 356
    :goto_7d
    :try_start_7d
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_80
    .catchall {:try_start_7d .. :try_end_80} :catchall_9e

    .line 358
    if-eqz v1, :cond_41

    .line 360
    :try_start_82
    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
    :try_end_85
    .catch Ljava/lang/Exception; {:try_start_82 .. :try_end_85} :catch_86

    goto :goto_41

    .line 361
    :catch_86
    move-exception v0

    .line 362
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_41

    .line 358
    :catchall_8b
    move-exception v0

    :goto_8c
    if-eqz v2, :cond_91

    .line 360
    :try_start_8e
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_91
    .catch Ljava/lang/Exception; {:try_start_8e .. :try_end_91} :catch_92

    .line 363
    :cond_91
    :goto_91
    throw v0

    .line 361
    :catch_92
    move-exception v1

    .line 362
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_91

    .line 385
    :cond_97
    invoke-virtual {p0}, Lcom/keniu/security/MainEntry;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v0

    iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->processName:Ljava/lang/String;

    goto :goto_36

    .line 358
    :catchall_9e
    move-exception v0

    move-object v2, v1

    goto :goto_8c

    .line 355
    :catch_a1
    move-exception v0

    goto :goto_7d
.end method

.method public onCreate()V
    .registers 3

    .prologue
    .line 259
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setApp_OnCreate_StartTime()V

    .line 262
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/RuntimeCheck;->IsRebootProcess()Z

    move-result v0

    if-eqz v0, :cond_10

    .line 264
    invoke-static {p0}, Lcom/plug/e/a;->b(Landroid/content/Context;)V

    .line 265
    invoke-static {}, Lcom/ijinshan/pluginslive/plugin/upgrade/process/g;->b()V

    .line 295
    :cond_f
    :goto_f
    return-void

    .line 269
    :cond_10
    invoke-super {p0}, Lcom/keniu/security/InsetMainEntry;->onCreate()V

    .line 276
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-virtual {v0}, Lcom/keniu/security/l;->g()V

    .line 277
    invoke-virtual {p0}, Lcom/keniu/security/MainEntry;->launchPluginUpdateService()V

    .line 278
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-virtual {v0}, Lcom/keniu/security/l;->a()V

    .line 280
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->changeEULAAgreedState()V

    .line 282
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->checkAutoStartPermissionState()V

    .line 283
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/AppBootManager;->checkUIProcessIsStartFromMainActivity()V

    .line 284
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/data/AppBootData;->setApp_OnCreate_EndTime()V

    .line 285
    invoke-static {}, Lcom/cleanmaster/hpsharelib/performance/appboot/AppBootManager;->recordAppBootInfo()V

    .line 290
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->initWakeUpSdk()V

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

    const/16 v1, 0x1c

    if-lt v0, v1, :cond_f

    .line 293
    invoke-direct {p0}, Lcom/keniu/security/MainEntry;->closeAndroidPDialog()V

    goto :goto_f
.end method

.method public onTerminate()V
    .registers 2

    .prologue
    .line 339
    invoke-super {p0}, Lcom/keniu/security/InsetMainEntry;->onTerminate()V

    .line 341
    iget-object v0, p0, Lcom/keniu/security/MainEntry;->mMoApp:Lcom/keniu/security/l;

    invoke-virtual {v0}, Lcom/keniu/security/l;->i()V

    .line 342
    return-void
.end method