KSearchStringTreeHelper.smali
.class public Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;
.super Ljava/lang/Object;
.source "KSearchStringTreeHelper.java"
# static fields
.field private static final WEI_CHAT_FILE_PATH:Ljava/lang/String; = "/storage/emulated/0/tencent/MicroMsg"
.field private static mContext:Landroid/content/Context;
.field private static mIsInit:Z
.field private static mIsRunning:Z
.field private static mMediaInfoList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/cleanmaster/junk/bean/FilePathInfo;",
">;"
}
.end annotation
.end field
.field private static mMediaStoreObserve:Landroid/database/ContentObserver;
.field private static mWaitTime:I
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
const/4 v0, 0x0
.line 21
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
.line 22
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsRunning:Z
.line 23
sput v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mWaitTime:I
.line 215
new-instance v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper$1;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper$1;-><init>(Landroid/os/Handler;)V
sput-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaStoreObserve:Landroid/database/ContentObserver;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 19
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static checkInit()Z
.registers 1
.prologue
.line 224
sget-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
if-nez v0, :cond_9
.line 225
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->initSearchTree(Landroid/content/Context;)V
.line 227
:cond_9
sget-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
return v0
.end method
.method public static findListByPath(Ljava/lang/String;JZ)Ljava/util/ArrayList;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"JZ)",
"Ljava/util/ArrayList",
"<",
"Lcom/cleanmaster/junk/bean/FilePathInfo;",
">;"
}
.end annotation
.prologue
const/4 v6, 0x1
const/4 v4, 0x0
const/4 v2, -0x1
.line 178
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 179
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->waitInit()Z
move-result v1
if-nez v1, :cond_f
.line 198
:cond_e
:goto_e
return-object v0
.line 182
:cond_f
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->checkInit()Z
move-result v1
if-eqz v1, :cond_e
.line 185
invoke-static {p0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->findPrefixStringPosition(Ljava/lang/String;)[I
move-result-object v3
.line 186
if-eqz v3, :cond_e
aget v1, v3, v4
if-eq v1, v2, :cond_e
aget v1, v3, v6
if-eq v1, v2, :cond_e
.line 187
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
.line 188
aget v0, v3, v4
move v1, v0
:goto_2b
aget v0, v3, v6
if-ge v1, v0, :cond_5c
.line 190
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/junk/bean/FilePathInfo;
iget-wide v4, v0, Lcom/cleanmaster/junk/bean/FilePathInfo;->modifyTime:J
.line 191
if-eqz p3, :cond_4c
cmp-long v0, v4, p1
if-gez v0, :cond_4c
.line 192
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 188
:cond_48
:goto_48
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_2b
.line 193
:cond_4c
if-nez p3, :cond_48
cmp-long v0, v4, p1
if-lez v0, :cond_48
.line 194
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_48
:cond_5c
move-object v0, v2
goto :goto_e
.end method
.method public static findListByPath(Ljava/lang/String;Lcom/cm/plugincluster/junkengine/util/INameFilter;)Ljava/util/ArrayList;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Lcom/cm/plugincluster/junkengine/util/INameFilter;",
")",
"Ljava/util/ArrayList",
"<",
"Lcom/cleanmaster/junk/bean/FilePathInfo;",
">;"
}
.end annotation
.prologue
const/4 v8, 0x1
const/4 v7, -0x1
const/4 v6, 0x0
.line 121
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
.line 122
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->waitInit()Z
move-result v0
if-nez v0, :cond_10
move-object v0, v2
.line 146
:goto_f
return-object v0
.line 125
:cond_10
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->checkInit()Z
move-result v0
if-nez v0, :cond_18
move-object v0, v2
.line 126
goto :goto_f
.line 128
:cond_18
invoke-static {p0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->findPrefixStringPosition(Ljava/lang/String;)[I
move-result-object v3
.line 132
if-eqz v3, :cond_65
aget v0, v3, v6
if-eq v0, v7, :cond_65
aget v0, v3, v8
if-eq v0, v7, :cond_65
.line 133
aget v0, v3, v6
move v1, v0
:goto_29
aget v0, v3, v8
if-ge v1, v0, :cond_65
.line 134
const/16 v0, 0x2f
invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(I)I
move-result v4
.line 135
if-eq v4, v7, :cond_47
.line 136
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/junk/bean/FilePathInfo;
iget-object v0, v0, Lcom/cleanmaster/junk/bean/FilePathInfo;->format:Ljava/lang/String;
const-string v5, "12289"
invoke-virtual {v0, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4b
.line 133
:cond_47
:goto_47
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_29
.line 139
:cond_4b
invoke-virtual {p0, v6, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v0
add-int/lit8 v4, v4, 0x1
invoke-virtual {p0, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v4
invoke-interface {p1, v0, v4, v6}, Lcom/cm/plugincluster/junkengine/util/INameFilter;->accept(Ljava/lang/String;Ljava/lang/String;Z)Z
move-result v0
.line 140
if-eqz v0, :cond_47
.line 141
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_47
:cond_65
move-object v0, v2
.line 146
goto :goto_f
.end method
.method public static findMatchList(Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/lang/String;",
")",
"Ljava/util/ArrayList",
"<",
"Lcom/cleanmaster/junk/bean/FilePathInfo;",
">;"
}
.end annotation
.prologue
const/4 v8, 0x1
const/4 v6, 0x0
const/4 v1, -0x1
.line 150
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
.line 151
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->waitInit()Z
move-result v0
if-nez v0, :cond_10
move-object v0, v2
.line 174
:goto_f
return-object v0
.line 154
:cond_10
invoke-static {}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->checkInit()Z
move-result v0
if-nez v0, :cond_18
move-object v0, v2
.line 155
goto :goto_f
.line 157
:cond_18
invoke-static {p0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->findPrefixStringPosition(Ljava/lang/String;)[I
move-result-object v3
.line 159
invoke-static {p0}, Lcom/cleanmaster/junk/util/FileUtils;->addSlash(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
.line 160
if-eqz v3, :cond_6f
aget v0, v3, v6
if-eq v0, v1, :cond_6f
aget v0, v3, v8
if-eq v0, v1, :cond_6f
.line 161
invoke-static {p1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object v0
.line 162
const-string v1, ""
invoke-virtual {v0, v1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v5
.line 163
aget v0, v3, v6
move v1, v0
:goto_37
aget v0, v3, v8
if-ge v1, v0, :cond_6f
.line 164
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/junk/bean/FilePathInfo;
iget-object v0, v0, Lcom/cleanmaster/junk/bean/FilePathInfo;->path:Ljava/lang/String;
.line 165
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v6
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v7
if-ge v6, v7, :cond_53
.line 163
:cond_4f
:goto_4f
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_37
.line 168
:cond_53
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v6
invoke-virtual {v0, v6}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v5, v0}, Ljava/util/regex/Matcher;->reset(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v0
invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z
move-result v0
.line 169
if-eqz v0, :cond_4f
.line 170
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_4f
:cond_6f
move-object v0, v2
.line 174
goto :goto_f
.end method
.method private static findPrefixStringPosition(Ljava/lang/String;)[I
.registers 2
.prologue
.line 202
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
invoke-static {v0, p0}, Lcom/cleanmaster/junk/scan/KSearchPrefixString;->findPrefixStringPosition(Ljava/util/List;Ljava/lang/String;)[I
move-result-object v0
return-object v0
.end method
.method private static initListFromMediaStore(Landroid/content/Context;)Ljava/util/ArrayList;
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
")",
"Ljava/util/ArrayList",
"<",
"Lcom/cleanmaster/junk/bean/FilePathInfo;",
">;"
}
.end annotation
.prologue
const/4 v5, 0x3
const/4 v6, 0x0
const/4 v4, 0x2
const/4 v3, 0x1
const/4 v1, 0x0
.line 52
.line 54
const/4 v0, 0x5
new-array v2, v0, [Ljava/lang/String;
const-string v0, "_data"
aput-object v0, v2, v1
const-string v0, "format"
aput-object v0, v2, v3
const-string v0, "date_modified"
aput-object v0, v2, v4
const-string v0, "_size"
aput-object v0, v2, v5
const/4 v0, 0x4
const-string v1, "mime_type"
aput-object v1, v2, v0
.line 61
const-string v3, "_data > ? AND _data < ? and title!=\'.nomedia\'"
.line 63
:try_start_1f
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "external"
.line 64
invoke-static {v1}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/String;
const/4 v5, 0x0
const-string v7, "/storage/emulated/0/tencent/MicroMsg"
.line 67
invoke-static {v7}, Lcom/cleanmaster/junk/util/FileUtils;->addSlash(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
aput-object v7, v4, v5
const/4 v5, 0x1
const-string v7, "/storage/emulated/0/tencent/MicroMsg"
invoke-static {v7}, Lcom/cleanmaster/junk/util/FileUtils;->replaceEndSlashBy0(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
aput-object v7, v4, v5
const/4 v5, 0x0
.line 64
invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
:try_end_42
.catch Ljava/lang/Exception; {:try_start_1f .. :try_end_42} :catch_b3
.catch Ljava/lang/OutOfMemoryError; {:try_start_1f .. :try_end_42} :catch_9b
.catchall {:try_start_1f .. :try_end_42} :catchall_a4
move-result-object v1
.line 70
if-eqz v1, :cond_94
.line 71
:try_start_45
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
:try_end_4a
.catch Ljava/lang/Exception; {:try_start_45 .. :try_end_4a} :catch_b6
.catch Ljava/lang/OutOfMemoryError; {:try_start_45 .. :try_end_4a} :catch_ae
.catchall {:try_start_45 .. :try_end_4a} :catchall_ac
.line 72
:goto_4a
:try_start_4a
invoke-interface {v1}, Landroid/database/Cursor;->moveToNext()Z
move-result v2
if-eqz v2, :cond_95
.line 73
new-instance v3, Lcom/cleanmaster/junk/bean/FilePathInfo;
invoke-direct {v3}, Lcom/cleanmaster/junk/bean/FilePathInfo;-><init>()V
.line 74
const/4 v2, 0x0
invoke-interface {v1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v2
.line 75
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
if-eqz v4, :cond_62
.line 76
const-string v2, ""
.line 78
:cond_62
iput-object v2, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->path:Ljava/lang/String;
.line 79
const/4 v2, 0x1
invoke-interface {v1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v2
iput-object v2, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->format:Ljava/lang/String;
.line 80
const/4 v2, 0x2
invoke-interface {v1, v2}, Landroid/database/Cursor;->getLong(I)J
move-result-wide v4
iput-wide v4, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->modifyTime:J
.line 81
const/4 v2, 0x3
invoke-interface {v1, v2}, Landroid/database/Cursor;->getLong(I)J
move-result-wide v4
iput-wide v4, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->size:J
.line 82
const/4 v2, 0x4
invoke-interface {v1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lcom/cleanmaster/junk/bean/FilePathInfo;->MediaTypeByMimeStr(Ljava/lang/String;)I
move-result v2
iput v2, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->mediaType:I
.line 83
sget-byte v2, Lcom/cleanmaster/junk/bean/FilePathInfo;->SIZEINFO_SRC_MEDIASTORE:B
iput-byte v2, v3, Lcom/cleanmaster/junk/bean/FilePathInfo;->sizeInfoSrc:B
.line 84
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:try_end_8b
.catch Ljava/lang/Exception; {:try_start_4a .. :try_end_8b} :catch_8c
.catch Ljava/lang/OutOfMemoryError; {:try_start_4a .. :try_end_8b} :catch_b1
.catchall {:try_start_4a .. :try_end_8b} :catchall_ac
goto :goto_4a
.line 88
:catch_8c
move-exception v2
move-object v6, v1
.line 91
:goto_8e
if-eqz v6, :cond_93
.line 92
invoke-interface {v6}, Landroid/database/Cursor;->close()V
.line 95
:cond_93
:goto_93
return-object v0
:cond_94
move-object v0, v6
.line 91
:cond_95
if-eqz v1, :cond_93
.line 92
invoke-interface {v1}, Landroid/database/Cursor;->close()V
goto :goto_93
.line 89
:catch_9b
move-exception v0
move-object v0, v6
move-object v1, v6
.line 91
:goto_9e
if-eqz v1, :cond_93
.line 92
invoke-interface {v1}, Landroid/database/Cursor;->close()V
goto :goto_93
.line 91
:catchall_a4
move-exception v0
move-object v1, v6
:goto_a6
if-eqz v1, :cond_ab
.line 92
invoke-interface {v1}, Landroid/database/Cursor;->close()V
:cond_ab
throw v0
.line 91
:catchall_ac
move-exception v0
goto :goto_a6
.line 89
:catch_ae
move-exception v0
move-object v0, v6
goto :goto_9e
:catch_b1
move-exception v2
goto :goto_9e
.line 88
:catch_b3
move-exception v0
move-object v0, v6
goto :goto_8e
:catch_b6
move-exception v0
move-object v0, v6
move-object v6, v1
goto :goto_8e
.end method
.method public static declared-synchronized initSearchTree(Landroid/content/Context;)V
.registers 4
.prologue
.line 28
const-class v1, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;
monitor-enter v1
if-nez p0, :cond_9
.line 29
:try_start_5
invoke-static {}, Lcom/cleanmaster/hpcommonlib/HostHelper;->getApplication()Landroid/app/Application;
:try_end_8
.catchall {:try_start_5 .. :try_end_8} :catchall_38
move-result-object p0
.line 31
:cond_9
if-nez p0, :cond_d
.line 49
:cond_b
:goto_b
monitor-exit v1
return-void
.line 34
:cond_d
:try_start_d
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sput-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mContext:Landroid/content/Context;
.line 35
sget-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
if-nez v0, :cond_b
.line 38
const/4 v0, 0x1
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsRunning:Z
.line 39
invoke-static {p0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->initListFromMediaStore(Landroid/content/Context;)Ljava/util/ArrayList;
move-result-object v0
sput-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
.line 40
const/4 v0, 0x0
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsRunning:Z
.line 41
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
:try_end_25
.catchall {:try_start_d .. :try_end_25} :catchall_38
if-eqz v0, :cond_b
.line 43
:try_start_27
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaInfoList:Ljava/util/ArrayList;
new-instance v2, Lcom/cleanmaster/junk/bean/FilePathInfo;
invoke-direct {v2}, Lcom/cleanmaster/junk/bean/FilePathInfo;-><init>()V
invoke-static {v0, v2}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
:try_end_31
.catch Ljava/lang/OutOfMemoryError; {:try_start_27 .. :try_end_31} :catch_3b
.catchall {:try_start_27 .. :try_end_31} :catchall_38
.line 46
:goto_31
const/4 v0, 0x1
:try_start_32
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
.line 47
invoke-static {p0}, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->registerMediaStoreListener(Landroid/content/Context;)V
:try_end_37
.catchall {:try_start_32 .. :try_end_37} :catchall_38
goto :goto_b
.line 28
:catchall_38
move-exception v0
monitor-exit v1
throw v0
.line 44
:catch_3b
move-exception v0
goto :goto_31
.end method
.method private static registerMediaStoreListener(Landroid/content/Context;)V
.registers 5
.prologue
.line 206
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "external"
invoke-static {v1}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v2, 0x0
sget-object v3, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaStoreObserve:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
.line 207
return-void
.end method
.method public static reset()V
.registers 1
.prologue
const/4 v0, 0x0
.line 99
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsInit:Z
.line 100
sput-boolean v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsRunning:Z
.line 101
return-void
.end method
.method public static unregisterMediaStoreListener(Landroid/content/Context;)V
.registers 3
.prologue
.line 210
sget-object v0, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaStoreObserve:Landroid/database/ContentObserver;
if-eqz v0, :cond_d
.line 211
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
sget-object v1, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mMediaStoreObserve:Landroid/database/ContentObserver;
invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V
.line 213
:cond_d
return-void
.end method
.method private static waitInit()Z
.registers 6
.prologue
const/4 v0, 0x0
.line 104
const/16 v1, 0x10
.line 105
const/16 v2, 0x7d0
.line 106
:cond_5
sget-boolean v3, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mIsRunning:Z
if-eqz v3, :cond_17
.line 108
:try_start_9
sget v3, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mWaitTime:I
add-int/2addr v3, v1
sput v3, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mWaitTime:I
.line 109
int-to-long v4, v1
invoke-static {v4, v5}, Ljava/lang/Thread;->sleep(J)V
.line 110
sget v3, Lcom/cleanmaster/junk/util/KSearchStringTreeHelper;->mWaitTime:I
:try_end_14
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_14} :catch_19
if-le v3, v2, :cond_5
.line 117
:goto_16
return v0
:cond_17
const/4 v0, 0x1
goto :goto_16
.line 113
:catch_19
move-exception v1
goto :goto_16
.end method