a.smali

.class public Lcom/cleanmaster/watcher/a;
.super Ljava/lang/Object;
.source "AppOpenFrequencyDataCache.java"

# interfaces
.implements Lcom/cm/plugincluster/monitor/interfaces/IMonitor;


# static fields
.field private static a:Lcom/cleanmaster/watcher/a;


# instance fields
.field private b:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private c:J


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

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

    sput-object v0, Lcom/cleanmaster/watcher/a;->a:Lcom/cleanmaster/watcher/a;

    return-void
.end method

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

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

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

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

    iput-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

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

    iput-wide v0, p0, Lcom/cleanmaster/watcher/a;->c:J

    .line 41
    const/4 v0, 0x5

    const v1, 0x4fffffff    # 8.5899341E9f

    invoke-static {v0, p0, v1}, Lcom/cleanmaster/hpsharelib/utils/MonitorManagerUtil;->addMonitor(ILcom/cm/plugincluster/monitor/interfaces/IMonitor;I)Z

    .line 43
    return-void
.end method

.method public static a()Lcom/cleanmaster/watcher/a;
    .registers 1

    .prologue
    .line 31
    sget-object v0, Lcom/cleanmaster/watcher/a;->a:Lcom/cleanmaster/watcher/a;

    if-nez v0, :cond_b

    .line 32
    new-instance v0, Lcom/cleanmaster/watcher/a;

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

    sput-object v0, Lcom/cleanmaster/watcher/a;->a:Lcom/cleanmaster/watcher/a;

    .line 35
    :cond_b
    sget-object v0, Lcom/cleanmaster/watcher/a;->a:Lcom/cleanmaster/watcher/a;

    return-object v0
.end method

.method private a(Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 112
    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    if-eqz v0, :cond_11

    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_11

    .line 113
    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 115
    :cond_11
    return-void
.end method


# virtual methods
.method public a(Lcom/cleanmaster/hpsharelib/common/model/AppOpenFrequencyModel;)V
    .registers 2

    .prologue
    .line 51
    return-void
.end method

.method public b()V
    .registers 2

    .prologue
    .line 58
    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    if-eqz v0, :cond_9

    .line 59
    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 61
    :cond_9
    return-void
.end method

.method public c()Ljava/util/ArrayList;
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v0, 0x0

    .line 72
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/Commons;->isShowFrequence()Z

    move-result v1

    if-nez v1, :cond_8

    .line 95
    :goto_7
    return-object v0

    .line 76
    :cond_8
    iget-object v1, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    if-eqz v1, :cond_22

    iget-object v1, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_22

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

    move-result-wide v2

    iget-wide v4, p0, Lcom/cleanmaster/watcher/a;->c:J

    sub-long/2addr v2, v4

    const-wide/32 v4, 0xdbba00

    cmp-long v1, v2, v4

    if-lez v1, :cond_46

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

    move-result-object v1

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

    move-result-object v1

    .line 79
    iget-object v2, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    if-eqz v2, :cond_33

    .line 80
    iget-object v2, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 84
    :cond_33
    :try_start_33
    invoke-static {v1}, Lcom/cleanmaster/hpsharelib/dao/DaoFactory;->getAppOpenFrequencyDao(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/dao/AppOpenFrequencyDaoImpl;

    move-result-object v1

    const/4 v2, 0x0

    const/16 v3, 0x32

    invoke-virtual {v1, v2, v3}, Lcom/cleanmaster/hpsharelib/dao/AppOpenFrequencyDaoImpl;->getFrequencyList(ZI)Ljava/util/ArrayList;

    move-result-object v1

    iput-object v1, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;
    :try_end_40
    .catch Ljava/lang/Exception; {:try_start_33 .. :try_end_40} :catch_49

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

    move-result-wide v0

    iput-wide v0, p0, Lcom/cleanmaster/watcher/a;->c:J

    .line 95
    :cond_46
    iget-object v0, p0, Lcom/cleanmaster/watcher/a;->b:Ljava/util/ArrayList;

    goto :goto_7

    .line 85
    :catch_49
    move-exception v1

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

    goto :goto_7
.end method

.method public monitorNotify(ILjava/lang/Object;Ljava/lang/Object;)I
    .registers 6

    .prologue
    const/4 v1, 0x0

    .line 100
    const/4 v0, 0x5

    if-ne p1, v0, :cond_1b

    if-eqz p3, :cond_1b

    .line 101
    check-cast p3, Landroid/content/Intent;

    .line 102
    const-string v0, "android.intent.extra.REPLACING"

    invoke-virtual {p3, v0, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    .line 103
    if-nez v0, :cond_1b

    .line 104
    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v0}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;

    move-result-object v0

    .line 105
    invoke-direct {p0, v0}, Lcom/cleanmaster/watcher/a;->a(Ljava/lang/String;)V

    .line 108
    :cond_1b
    return v1
.end method