m.smali

.class public abstract Lcom/keniu/security/m;
.super Ljava/lang/Object;
.source "MoSecurityApplication.java"

# interfaces
.implements Lorg/acdd/android/compat/IActivityRecorder;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/keniu/security/m$b;,
        Lcom/keniu/security/m$a;
    }
.end annotation


# static fields
.field protected static d:Landroid/content/Context;

.field protected static e:Landroid/app/Application;

.field private static i:Lcom/keniu/security/m;


# instance fields
.field public a:Lcom/cleanmaster/base/widget/CustomToast;

.field protected b:Landroid/view/WindowManager$LayoutParams;

.field protected c:J

.field private f:Ljava/util/Locale;

.field private g:Ljava/lang/String;

.field private h:J

.field private j:Landroid/os/Handler;


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

    .prologue
    const/4 v0, 0x0

    .line 99
    sput-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    .line 100
    sput-object v0, Lcom/keniu/security/m;->e:Landroid/app/Application;

    return-void
.end method

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

    .prologue
    const-wide/16 v2, 0x0

    const/4 v1, 0x0

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

    .line 73
    iput-object v1, p0, Lcom/keniu/security/m;->a:Lcom/cleanmaster/base/widget/CustomToast;

    .line 75
    iput-object v1, p0, Lcom/keniu/security/m;->b:Landroid/view/WindowManager$LayoutParams;

    .line 91
    iput-wide v2, p0, Lcom/keniu/security/m;->c:J

    .line 92
    iput-object v1, p0, Lcom/keniu/security/m;->f:Ljava/util/Locale;

    .line 93
    const-string v0, ""

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

    .line 103
    iput-wide v2, p0, Lcom/keniu/security/m;->h:J

    .line 390
    iput-object v1, p0, Lcom/keniu/security/m;->j:Landroid/os/Handler;

    .line 79
    sput-object p0, Lcom/keniu/security/m;->i:Lcom/keniu/security/m;

    .line 80
    const/4 v0, 0x0

    sput-boolean v0, Lcom/keniu/security/MoEnvContextUtil;->DEBUG:Z

    .line 81
    return-void
.end method

.method public static d()Landroid/content/Context;
    .registers 1

    .prologue
    .line 84
    sget-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    return-object v0
.end method

.method public static e()Lcom/keniu/security/m;
    .registers 1

    .prologue
    .line 88
    sget-object v0, Lcom/keniu/security/m;->i:Lcom/keniu/security/m;

    return-object v0
.end method

.method public static g()Landroid/app/Application;
    .registers 1

    .prologue
    .line 136
    sget-object v0, Lcom/keniu/security/m;->e:Landroid/app/Application;

    return-object v0
.end method

.method private t()V
    .registers 8

    .prologue
    .line 338
    :try_start_0
    const-string v0, "android.app.ActivityThread"

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

    move-result-object v0

    .line 339
    const-string v1, "android.app.IApplicationThread"

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

    move-result-object v1

    .line 340
    const-string v2, "currentActivityThread"

    const/4 v3, 0x0

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

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

    move-result-object v2

    .line 341
    const-string v3, "getApplicationThread"

    const/4 v4, 0x0

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

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

    move-result-object v0

    .line 342
    const-string/jumbo v3, "scheduleTrimMemory"

    const/4 v4, 0x1

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

    const/4 v5, 0x0

    sget-object v6, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    aput-object v6, v4, v5

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

    move-result-object v1

    .line 344
    const/4 v3, 0x0

    const/4 v4, 0x0

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

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

    move-result-object v2

    .line 345
    const/4 v3, 0x0

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

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

    move-result-object v0

    .line 346
    const/4 v2, 0x1

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

    const/4 v3, 0x0

    const/16 v4, 0x50

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

    move-result-object v4

    aput-object v4, v2, v3

    invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_4b
    .catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_4b} :catch_4e
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_4b} :catch_4c

    .line 350
    :goto_4b
    return-void

    .line 348
    :catch_4c
    move-exception v0

    goto :goto_4b

    .line 347
    :catch_4e
    move-exception v0

    goto :goto_4b
.end method


# virtual methods
.method a()V
    .registers 1

    .prologue
    .line 205
    invoke-virtual {p0}, Lcom/keniu/security/m;->b()V

    .line 206
    invoke-virtual {p0}, Lcom/keniu/security/m;->r()V

    .line 207
    return-void
.end method

.method public a(J)V
    .registers 4

    .prologue
    .line 106
    iput-wide p1, p0, Lcom/keniu/security/m;->h:J

    .line 107
    return-void
.end method

.method public a(Landroid/app/Application;)V
    .registers 4

    .prologue
    .line 128
    sput-object p1, Lcom/keniu/security/m;->e:Landroid/app/Application;

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

    move-result-object v0

    sput-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    .line 132
    sget-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    invoke-static {}, Lcom/keniu/security/update/u;->a()Lcom/keniu/security/update/u;

    move-result-object v1

    invoke-virtual {v1}, Lcom/keniu/security/update/u;->q()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/cleanmaster/bitmapcache/DbPath;->init(Landroid/content/Context;Ljava/lang/String;)V

    .line 133
    return-void
.end method

.method public a(Ljava/lang/String;)V
    .registers 2

    .prologue
    .line 114
    iput-object p1, p0, Lcom/keniu/security/m;->g:Ljava/lang/String;

    .line 115
    return-void
.end method

.method protected a(ZZ)V
    .registers 7

    .prologue
    .line 258
    invoke-static {}, Lcom/cleanmaster/base/a;->s()Ljava/lang/String;

    move-result-object v0

    const-string v1, "cleanmaster"

    const/4 v2, 0x1

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/ijinshan/cloudconfig/init/CloudConfigEnv;->init(Ljava/lang/String;Ljava/lang/String;ZZ)V

    .line 259
    invoke-static {}, Lcom/ijinshan/cloudconfig/deepcloudconfig/PullCloudConfig;->getInstance()Lcom/ijinshan/cloudconfig/deepcloudconfig/PullCloudConfig;

    move-result-object v0

    invoke-virtual {v0, p1, p2}, Lcom/ijinshan/cloudconfig/deepcloudconfig/PullCloudConfig;->init(ZZ)V

    .line 260
    new-instance v0, Lcom/cleanmaster/recommendapps/a;

    invoke-direct {v0}, Lcom/cleanmaster/recommendapps/a;-><init>()V

    invoke-static {v0}, Lcom/ijinshan/cloudconfig/callback/CloudBridgeHelper;->initCallBack(Lcom/ijinshan/cloudconfig/callback/IBridgeCallBack;)V

    .line 261
    if-eqz p2, :cond_29

    .line 262
    invoke-static {}, Lcom/ijinshan/cloudconfig/deepcloudconfig/CloudConfig;->getInstance()Lcom/ijinshan/cloudconfig/deepcloudconfig/CloudConfig;

    move-result-object v0

    .line 263
    invoke-virtual {v0}, Lcom/ijinshan/cloudconfig/deepcloudconfig/CloudConfig;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_29

    .line 264
    invoke-virtual {v0}, Lcom/ijinshan/cloudconfig/deepcloudconfig/CloudConfig;->loadDefault()V

    .line 267
    :cond_29
    invoke-static {}, Lcom/ijinshan/cloudconfig/init/CloudConfigEnv;->setInitRcmdFinished()V

    .line 268
    return-void
.end method

.method public addActivity(Landroid/app/Activity;)V
    .registers 2

    .prologue
    .line 323
    return-void
.end method

.method protected abstract b()V
.end method

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

    .prologue
    .line 119
    sput-object p1, Lcom/keniu/security/m;->d:Landroid/content/Context;

    .line 122
    invoke-static {p1}, Lcom/keniu/security/MoEnvContextUtil;->initContex(Landroid/content/Context;)V

    .line 123
    invoke-static {p1}, Lcom/cleanmaster/bitmapcache/MyVolley;->setAppContext(Landroid/content/Context;)V

    .line 124
    return-void
.end method

.method abstract c()V
.end method

.method public f()J
    .registers 3

    .prologue
    .line 110
    iget-wide v0, p0, Lcom/keniu/security/m;->h:J

    return-wide v0
.end method

.method public h()V
    .registers 3

    .prologue
    .line 148
    invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;

    move-result-object v0

    new-instance v1, Lcom/keniu/security/n;

    invoke-direct {v1, p0}, Lcom/keniu/security/n;-><init>(Lcom/keniu/security/m;)V

    invoke-virtual {v0, v1}, Lorg/acdd/framework/ACDD;->setCrashReporter(Lorg/acdd/android/compat/ICrashReporter;)V

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

    move-result v0

    if-nez v0, :cond_18

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

    move-result v0

    if-eqz v0, :cond_20

    .line 162
    :cond_18
    new-instance v0, Lcom/keniu/security/o;

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

    invoke-static {v0}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->post(Ljava/lang/Runnable;)V

    .line 187
    :cond_20
    new-instance v0, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v0}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 190
    new-instance v0, Lcom/keniu/security/p;

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

    invoke-static {v0}, Lcom/cleanmaster/crash/JunkCustomCrashReporter;->setCustomCrashReporter(Lcom/cleanmaster/crash/ICustomCrashReporter;)V

    .line 197
    sget-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    invoke-static {v0}, Lcom/keniu/security/y;->a(Landroid/content/Context;)V

    .line 198
    return-void
.end method

.method protected i()V
    .registers 7

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

    const/16 v1, 0x11

    if-ne v0, v1, :cond_16

    .line 243
    :try_start_6
    sget-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    const-string v1, "accessibility"

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

    move-result-object v0

    check-cast v0, Landroid/view/accessibility/AccessibilityManager;

    .line 244
    invoke-virtual {v0}, Landroid/view/accessibility/AccessibilityManager;->isEnabled()Z

    move-result v1

    if-nez v1, :cond_17

    .line 254
    :cond_16
    :goto_16
    return-void

    .line 247
    :cond_17
    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    const-string/jumbo v2, "setState"

    const/4 v3, 0x1

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

    const/4 v4, 0x0

    sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    aput-object v5, v3, v4

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

    move-result-object v1

    .line 248
    const/4 v2, 0x1

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

    .line 249
    const/4 v2, 0x1

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

    const/4 v3, 0x0

    const/4 v4, 0x0

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

    move-result-object v4

    aput-object v4, v2, v3

    invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_3c
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_3c} :catch_3d

    goto :goto_16

    .line 250
    :catch_3d
    move-exception v0

    .line 251
    const-string v1, "MoSecurityApplication"

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

    goto :goto_16
.end method

.method public j()V
    .registers 2

    .prologue
    .line 278
    invoke-static {}, Lcom/cleanmaster/hpsharelib/utils/MonitorManagerUtil;->uninitialize()V

    .line 279
    invoke-static {}, Lcom/cleanmaster/hpsharelib/func/cache/LocalStringDBUtil;->getInstance()Lcom/cleanmaster/hpsharelib/func/cache/LocalStringDBUtil;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/func/cache/LocalStringDBUtil;->closeAllDB()V

    .line 280
    invoke-static {}, Lcom/cm/plugincluster/softmgr/plugin/SoftMgrCommonPluginDelegate;->getSoftMgrPluginModule()Lcom/cm/plugincluster/softmgr/interfaces/plugin/ISoftCommonPluginModule;

    move-result-object v0

    invoke-interface {v0}, Lcom/cm/plugincluster/softmgr/interfaces/plugin/ISoftCommonPluginModule;->daemonApplicationOnAppExit()V

    .line 281
    invoke-static {}, Lcom/cleanmaster/hpcommonlib/utils/PackageManagerWrapper;->uninit()V

    .line 282
    return-void
.end method

.method public k()Ljava/lang/String;
    .registers 2

    .prologue
    .line 286
    iget-object v0, p0, Lcom/keniu/security/m;->g:Ljava/lang/String;

    return-object v0
.end method

.method public declared-synchronized l()Landroid/os/Handler;
    .registers 3

    .prologue
    .line 297
    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/keniu/security/m;->j:Landroid/os/Handler;

    if-nez v0, :cond_12

    .line 298
    sget-object v0, Lcom/keniu/security/m;->d:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;

    move-result-object v0

    .line 299
    new-instance v1, Landroid/os/Handler;

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

    iput-object v1, p0, Lcom/keniu/security/m;->j:Landroid/os/Handler;

    .line 301
    :cond_12
    iget-object v0, p0, Lcom/keniu/security/m;->j:Landroid/os/Handler;
    :try_end_14
    .catchall {:try_start_1 .. :try_end_14} :catchall_16

    monitor-exit p0

    return-object v0

    .line 297
    :catchall_16
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public m()Ljava/io/File;
    .registers 4

    .prologue
    const/4 v0, 0x0

    .line 309
    :try_start_1
    sget-object v1, Lcom/keniu/security/m;->d:Landroid/content/Context;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/content/Context;->getExternalFilesDir(Ljava/lang/String;)Ljava/io/File;
    :try_end_7
    .catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_7} :catch_d
    .catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_7} :catch_b
    .catch Ljava/lang/ArrayIndexOutOfBoundsException; {:try_start_1 .. :try_end_7} :catch_9

    move-result-object v0

    .line 316
    :goto_8
    return-object v0

    .line 315
    :catch_9
    move-exception v1

    goto :goto_8

    .line 312
    :catch_b
    move-exception v1

    goto :goto_8

    .line 310
    :catch_d
    move-exception v1

    goto :goto_8
.end method

.method public n()V
    .registers 4

    .prologue
    .line 353
    invoke-static {}, Lorg/acdd/framework/ActivityRecorder;->getActivities()Ljava/util/LinkedHashMap;

    move-result-object v1

    .line 354
    invoke-virtual {v1}, Ljava/util/LinkedHashMap;->entrySet()Ljava/util/Set;

    move-result-object v0

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

    move-result-object v2

    :cond_c
    :goto_c
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2c

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

    move-result-object v0

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

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

    move-result-object v0

    check-cast v0, Ljava/lang/ref/WeakReference;

    .line 356
    if-eqz v0, :cond_c

    .line 359
    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 360
    if-eqz v0, :cond_c

    .line 363
    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    goto :goto_c

    .line 365
    :cond_2c
    invoke-virtual {v1}, Ljava/util/LinkedHashMap;->clear()V

    .line 366
    return-void
.end method

.method public o()J
    .registers 3

    .prologue
    .line 369
    iget-wide v0, p0, Lcom/keniu/security/m;->c:J

    return-wide v0
.end method

.method public p()I
    .registers 2

    .prologue
    .line 381
    invoke-static {}, Lorg/acdd/framework/ActivityRecorder;->getActivities()Ljava/util/LinkedHashMap;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/LinkedHashMap;->size()I

    move-result v0

    return v0
.end method

.method public q()Ljava/lang/String;
    .registers 2

    .prologue
    .line 385
    invoke-static {}, Lorg/acdd/framework/ActivityRecorder;->getTopActivityName()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public r()V
    .registers 5

    .prologue
    .line 393
    sget-boolean v0, Lcom/keniu/security/h;->a:Z

    if-eqz v0, :cond_1b

    .line 394
    new-instance v0, Lcom/keniu/security/q;

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

    invoke-static {v0}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->post(Ljava/lang/Runnable;)V

    .line 408
    :goto_c
    invoke-static {}, Lcom/keniu/security/m;->g()Landroid/app/Application;

    move-result-object v0

    invoke-static {v0}, Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor;->init(Landroid/app/Application;)V

    .line 409
    invoke-static {}, Lcom/keniu/security/m;->g()Landroid/app/Application;

    move-result-object v0

    invoke-static {v0}, Lcom/cmcm/a/a;->a(Landroid/content/Context;)V

    .line 411
    return-void

    .line 400
    :cond_1b
    invoke-static {}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->getHandler()Landroid/os/Handler;

    move-result-object v0

    new-instance v1, Lcom/keniu/security/r;

    invoke-direct {v1, p0}, Lcom/keniu/security/r;-><init>(Lcom/keniu/security/m;)V

    const-wide/16 v2, 0x12c

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

    goto :goto_c
.end method

.method public removeActivity(Landroid/app/Activity;)V
    .registers 3

    .prologue
    .line 327
    invoke-static {}, Lorg/acdd/framework/ActivityRecorder;->getActivities()Ljava/util/LinkedHashMap;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/LinkedHashMap;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_d

    .line 329
    invoke-direct {p0}, Lcom/keniu/security/m;->t()V

    .line 331
    :cond_d
    return-void
.end method

.method protected s()V
    .registers 3

    .prologue
    .line 414
    new-instance v0, Lcom/cleanmaster/hpsharelib/sync/binder/BinderConnector;

    new-instance v1, Lcom/keniu/security/s;

    invoke-direct {v1, p0}, Lcom/keniu/security/s;-><init>(Lcom/keniu/security/m;)V

    invoke-direct {v0, v1}, Lcom/cleanmaster/hpsharelib/sync/binder/BinderConnector;-><init>(Lcom/cleanmaster/hpsharelib/sync/binder/BinderConnector$BinderConnCallBack;)V

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

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/sync/binder/BinderConnector;->onCreate(Landroid/content/Context;)V

    .line 420
    return-void
.end method