- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
1211 lines
30 KiB
Smali
1211 lines
30 KiB
Smali
.class public Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# instance fields
|
|
.field public final firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
.line 58
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 59
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "FirebaseHeartBeat"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 60
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final declared-synchronized cleanUpStoredHeartBeats()V
|
|
.locals 9
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v1, "fire-count"
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
.line 213
|
|
invoke-interface {v0, v1, v2, v3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-string v2, ""
|
|
|
|
iget-object v3, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 216
|
|
invoke-interface {v3}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
:cond_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/util/Map$Entry;
|
|
|
|
.line 217
|
|
invoke-interface {v5}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
instance-of v6, v6, Ljava/util/Set;
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
.line 218
|
|
invoke-interface {v5}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Set;
|
|
|
|
.line 219
|
|
invoke-interface {v6}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v6
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_0
|
|
|
|
invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Ljava/lang/String;
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 220
|
|
invoke-virtual {v4, v7}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
|
|
|
|
move-result v8
|
|
|
|
if-lez v8, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_2
|
|
|
|
.line 222
|
|
:cond_2
|
|
:goto_1
|
|
invoke-interface {v5}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
move-object v4, v7
|
|
|
|
goto :goto_0
|
|
|
|
.line 227
|
|
:cond_3
|
|
new-instance v3, Ljava/util/HashSet;
|
|
|
|
iget-object v5, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
new-instance v6, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v6}, Ljava/util/HashSet;-><init>()V
|
|
|
|
.line 229
|
|
invoke-interface {v5, v2, v6}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v3, v5}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
.line 230
|
|
invoke-interface {v3, v4}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
iget-object v4, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 232
|
|
invoke-interface {v4}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v4
|
|
|
|
.line 233
|
|
invoke-interface {v4, v2, v3}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "fire-count"
|
|
|
|
const-wide/16 v4, 0x1
|
|
|
|
sub-long/2addr v0, v4
|
|
|
|
.line 234
|
|
invoke-interface {v2, v3, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
.line 235
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 236
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_2
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized deleteAllHeartBeats()V
|
|
.locals 7
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 77
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 79
|
|
invoke-interface {v1}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Map$Entry;
|
|
|
|
.line 80
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
instance-of v4, v4, Ljava/util/Set;
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 82
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/Set;
|
|
|
|
.line 83
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {p0, v5, v6}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
.line 84
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
.line 85
|
|
invoke-interface {v4, v5}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 86
|
|
new-instance v4, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
|
|
|
|
.line 87
|
|
invoke-interface {v4, v5}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
.line 89
|
|
invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_2
|
|
|
|
.line 91
|
|
:cond_1
|
|
invoke-interface {v0, v3}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-nez v2, :cond_3
|
|
|
|
const-string v1, "fire-count"
|
|
|
|
.line 96
|
|
invoke-interface {v0, v1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string v1, "fire-count"
|
|
|
|
int-to-long v2, v2
|
|
|
|
.line 98
|
|
invoke-interface {v0, v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
.line 101
|
|
:goto_1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 102
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_2
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized getAllHeartBeats()Ljava/util/List;
|
|
.locals 6
|
|
|
|
monitor-enter p0
|
|
|
|
.line 105
|
|
:try_start_0
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 106
|
|
invoke-interface {v1}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
.line 107
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
instance-of v3, v3, Ljava/util/Set;
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 108
|
|
new-instance v3, Ljava/util/HashSet;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/Set;
|
|
|
|
invoke-direct {v3, v4}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
.line 109
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {p0, v4, v5}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
.line 110
|
|
invoke-interface {v3, v4}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
.line 111
|
|
invoke-interface {v3}, Ljava/util/Set;->isEmpty()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
.line 113
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4, v3}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-static {v2, v4}, Lcom/google/firebase/heartbeatinfo/HeartBeatResult;->create(Ljava/lang/String;Ljava/util/List;)Lcom/google/firebase/heartbeatinfo/HeartBeatResult;
|
|
|
|
move-result-object v2
|
|
|
|
.line 112
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 117
|
|
:cond_1
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {p0, v1, v2}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->updateGlobalHeartBeat(J)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 118
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized getFormattedDate(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 169
|
|
:try_start_0
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p1, p2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {v0}, Ljava/util/Date;->toInstant()Ljava/time/Instant;
|
|
|
|
move-result-object p1
|
|
|
|
.line 170
|
|
sget-object p2, Ljava/time/ZoneOffset;->UTC:Ljava/time/ZoneOffset;
|
|
|
|
invoke-virtual {p1, p2}, Ljava/time/Instant;->atOffset(Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/time/OffsetDateTime;->toLocalDateTime()Ljava/time/LocalDateTime;
|
|
|
|
move-result-object p1
|
|
|
|
.line 171
|
|
sget-object p2, Ljava/time/format/DateTimeFormatter;->ISO_LOCAL_DATE:Ljava/time/format/DateTimeFormatter;
|
|
|
|
invoke-virtual {p1, p2}, Ljava/time/LocalDateTime;->format(Ljava/time/format/DateTimeFormatter;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 173
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final declared-synchronized getStoredUserAgentString(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 122
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
.line 123
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
instance-of v2, v2, Ljava/util/Set;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 124
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Set;
|
|
|
|
.line 125
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_1
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
.line 126
|
|
invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 127
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 132
|
|
:cond_2
|
|
monitor-exit p0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized isSameDateUtc(JJ)Z
|
|
.locals 0
|
|
|
|
monitor-enter p0
|
|
|
|
.line 247
|
|
:try_start_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p3, p4}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized postHeartBeatCleanUp()V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
.line 162
|
|
:try_start_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 163
|
|
invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "last-used-date"
|
|
|
|
invoke-interface {v1, v2, v0}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
|
|
.line 164
|
|
invoke-virtual {p0, v0}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->removeStoredDate(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 165
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized removeStoredDate(Ljava/lang/String;)V
|
|
.locals 4
|
|
|
|
monitor-enter p0
|
|
|
|
.line 146
|
|
:try_start_0
|
|
invoke-virtual {p0, p1}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getStoredUserAgentString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 148
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 150
|
|
:cond_0
|
|
:try_start_1
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
new-instance v3, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
|
|
|
|
.line 152
|
|
invoke-interface {v2, v0, v3}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
.line 153
|
|
invoke-interface {v1, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
.line 154
|
|
invoke-interface {v1}, Ljava/util/Set;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 155
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1, v0}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 157
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1, v0, v1}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 159
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized shouldSendGlobalHeartBeat(J)Z
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "fire-global"
|
|
|
|
.line 273
|
|
invoke-virtual {p0, v0, p1, p2}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->shouldSendSdkHeartBeat(Ljava/lang/String;J)Z
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized shouldSendSdkHeartBeat(Ljava/lang/String;J)Z
|
|
.locals 4
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 256
|
|
invoke-interface {v0, p1}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
.line 257
|
|
invoke-interface {v0, p1, v2, v3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p0, v2, v3, p2, p3}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->isSameDateUtc(JJ)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 258
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 259
|
|
monitor-exit p0
|
|
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 261
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
:try_start_1
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 263
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 264
|
|
monitor-exit p0
|
|
|
|
return v1
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized storeHeartBeat(JLjava/lang/String;)V
|
|
.locals 11
|
|
|
|
monitor-enter p0
|
|
|
|
.line 178
|
|
:try_start_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getFormattedDate(J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p2, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v0, "last-used-date"
|
|
|
|
const-string v1, ""
|
|
|
|
.line 179
|
|
invoke-interface {p2, v0, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 180
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
.line 181
|
|
invoke-virtual {p0, p1}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->getStoredUserAgentString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
.line 184
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 186
|
|
:cond_0
|
|
:try_start_1
|
|
invoke-virtual {p2, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 188
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 190
|
|
:cond_1
|
|
:try_start_2
|
|
invoke-virtual {p0, p3, p1}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->updateStoredUserAgent(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 191
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
:try_start_3
|
|
iget-object p2, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v0, "fire-count"
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
.line 194
|
|
invoke-interface {p2, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v3
|
|
|
|
const-wide/16 v5, 0x1
|
|
|
|
add-long v7, v3, v5
|
|
|
|
const-wide/16 v9, 0x1e
|
|
|
|
cmp-long p2, v7, v9
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
.line 196
|
|
invoke-virtual {p0}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->cleanUpStoredHeartBeats()V
|
|
|
|
iget-object p2, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v0, "fire-count"
|
|
|
|
.line 197
|
|
invoke-interface {p2, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v3
|
|
|
|
.line 199
|
|
:cond_3
|
|
new-instance p2, Ljava/util/HashSet;
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
.line 201
|
|
invoke-interface {v0, p3, v1}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p2, v0}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
.line 202
|
|
invoke-interface {p2, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
add-long/2addr v3, v5
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 205
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
.line 206
|
|
invoke-interface {v0, p3, p2}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "fire-count"
|
|
|
|
.line 207
|
|
invoke-interface {p2, p3, v3, v4}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "last-used-date"
|
|
|
|
.line 208
|
|
invoke-interface {p2, p3, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
.line 209
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
.line 210
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized updateGlobalHeartBeat(J)V
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 243
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "fire-global"
|
|
|
|
invoke-interface {v0, v1, p1, p2}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 244
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final declared-synchronized updateStoredUserAgent(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
.line 136
|
|
:try_start_0
|
|
invoke-virtual {p0, p2}, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->removeStoredDate(Ljava/lang/String;)V
|
|
|
|
.line 137
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
new-instance v2, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v2}, Ljava/util/HashSet;-><init>()V
|
|
|
|
.line 139
|
|
invoke-interface {v1, p1, v2}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
.line 140
|
|
invoke-interface {v0, p2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
iget-object p2, p0, Lcom/google/firebase/heartbeatinfo/HeartBeatInfoStorage;->firebaseSharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
.line 141
|
|
invoke-interface {p2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2, p1, v0}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 142
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|