AutoInstallIntentService.smali

.class public Lcom/atinst/AutoInstallIntentService;
.super Landroid/app/IntentService;
.source "AutoInstallIntentService.java"


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

.field private static b:J


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

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

    move-result-object v0

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

    move-result-object v0

    sput-object v0, Lcom/atinst/AutoInstallIntentService;->a:Landroid/content/Context;

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

    sput-wide v0, Lcom/atinst/AutoInstallIntentService;->b:J

    return-void
.end method

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

    .prologue
    .line 75
    const-string v0, "AutoInstallIntentService"

    invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 76
    return-void
.end method

.method public static a()V
    .registers 4

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

    move-result-object v0

    new-instance v1, Lcom/atinst/b;

    invoke-direct {v1}, Lcom/atinst/b;-><init>()V

    const-wide/16 v2, 0x1770

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

    .line 137
    return-void
.end method

.method private static a(J)Z
    .registers 6

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

    move-result-wide v0

    .line 225
    const-wide/32 v2, 0x112a880

    sub-long/2addr v0, p0

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(J)J

    move-result-wide v0

    cmp-long v0, v2, v0

    if-gez v0, :cond_12

    .line 226
    const/4 v0, 0x1

    .line 228
    :goto_11
    return v0

    :cond_12
    const/4 v0, 0x0

    goto :goto_11
.end method

.method static synthetic b()V
    .registers 0

    .prologue
    .line 31
    invoke-static {}, Lcom/atinst/AutoInstallIntentService;->e()V

    return-void
.end method

.method static synthetic c()Landroid/content/Context;
    .registers 1

    .prologue
    .line 31
    sget-object v0, Lcom/atinst/AutoInstallIntentService;->a:Landroid/content/Context;

    return-object v0
.end method

.method private static d()Z
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 109
    sget-object v0, Lcom/atinst/AutoInstallIntentService;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/base/util/net/NetworkUtil;->isAllowAccessNetwork(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_a

    .line 125
    :cond_9
    :goto_9
    return v1

    .line 115
    :cond_a
    :try_start_a
    invoke-static {}, Lcom/cm/a/f/a;->a()Z
    :try_end_d
    .catch Ljava/lang/Throwable; {:try_start_a .. :try_end_d} :catch_18

    move-result v0

    .line 119
    :goto_e
    invoke-static {}, Lcom/atinst/AutoInstallIntentService;->f()Z

    move-result v2

    if-eqz v2, :cond_9

    if-eqz v0, :cond_9

    const/4 v1, 0x1

    goto :goto_9

    .line 116
    :catch_18
    move-exception v0

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

    move v0, v1

    goto :goto_e
.end method

.method private static e()V
    .registers 3

    .prologue
    .line 142
    new-instance v0, Lcom/cm/a/f/a;

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

    .line 144
    invoke-static {}, Lcom/atinst/AutoInstallIntentService;->d()Z

    move-result v1

    if-eqz v1, :cond_21

    .line 145
    invoke-static {}, Lcom/atinst/AutoInstallIntentService;->g()V

    .line 147
    new-instance v1, Lcom/atinst/c;

    invoke-direct {v1}, Lcom/atinst/c;-><init>()V

    .line 214
    invoke-virtual {v0, v1}, Lcom/cm/a/f/a;->a(Lcom/cm/a/f/b$e;)V

    .line 216
    const-string v1, "atinstx"

    const-string/jumbo v2, "start "

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

    .line 218
    invoke-virtual {v0}, Lcom/cm/a/f/a;->b()V

    .line 221
    :cond_21
    return-void
.end method

.method private static f()Z
    .registers 4

    .prologue
    const-wide/16 v2, 0x0

    .line 235
    sget-wide v0, Lcom/atinst/AutoInstallIntentService;->b:J

    cmp-long v0, v2, v0

    if-gez v0, :cond_f

    .line 237
    sget-wide v0, Lcom/atinst/AutoInstallIntentService;->b:J

    invoke-static {v0, v1}, Lcom/atinst/AutoInstallIntentService;->a(J)Z

    move-result v0

    .line 244
    :goto_e
    return v0

    .line 241
    :cond_f
    sget-object v0, Lcom/atinst/AutoInstallIntentService;->a:Landroid/content/Context;

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

    move-result-object v0

    .line 242
    const-string v1, "atinst_time_interval_tag_old"

    invoke-virtual {v0, v1, v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLongValue(Ljava/lang/String;J)J

    move-result-wide v0

    .line 244
    invoke-static {v0, v1}, Lcom/atinst/AutoInstallIntentService;->a(J)Z

    move-result v0

    goto :goto_e
.end method

.method private static g()V
    .registers 6

    .prologue
    const-wide/16 v4, 0x0

    .line 251
    sget-object v0, Lcom/atinst/AutoInstallIntentService;->a:Landroid/content/Context;

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

    move-result-object v2

    .line 253
    const-string v0, "atinst_time_interval_tag_new"

    invoke-virtual {v2, v0, v4, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLongValue(Ljava/lang/String;J)J

    move-result-wide v0

    .line 254
    cmp-long v3, v0, v4

    if-nez v3, :cond_18

    .line 256
    const-string v0, "atinst_time_interval_tag"

    invoke-virtual {v2, v0, v4, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLongValue(Ljava/lang/String;J)J

    move-result-wide v0

    .line 259
    :cond_18
    const-string v3, "atinst_time_interval_tag_old"

    invoke-virtual {v2, v3, v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setLongValue(Ljava/lang/String;J)V

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

    move-result-wide v0

    .line 262
    const-string v3, "atinst_time_interval_tag_new"

    invoke-virtual {v2, v3, v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setLongValue(Ljava/lang/String;J)V

    .line 264
    sput-wide v0, Lcom/atinst/AutoInstallIntentService;->b:J

    .line 269
    return-void
.end method


# virtual methods
.method protected onHandleIntent(Landroid/content/Intent;)V
    .registers 2

    .prologue
    .line 85
    if-nez p1, :cond_3

    .line 90
    :goto_2
    return-void

    .line 89
    :cond_3
    invoke-static {}, Lcom/atinst/AutoInstallIntentService;->e()V

    goto :goto_2
.end method