granularity level: instruction
.class public final Lz0/h;
.super Ljava/lang/Object;
.source "SourceFile"
.field public final a:Landroid/content/SharedPreferences;
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
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
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p1
iput-object p1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
return-void
.end method
.method public final declared-synchronized a()V
.locals 9
monitor-enter p0
:try_start_0
iget-object v0, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
const-string v1, "fire-count"
const-wide/16 v2, 0x0
invoke-interface {v0, v1, v2, v3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v0
const/4 v2, 0x0
const-string v3, ""
iget-object v4, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v4}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
move-result-object v4
invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v4
invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v4
:cond_0
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_3
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/util/Map$Entry;
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
invoke-interface {v5}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/util/Set;
invoke-interface {v6}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v6
:goto_0
:cond_1
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 v2, :cond_2
invoke-virtual {v2, v7}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result v8
if-lez v8, :cond_1
:cond_2
invoke-interface {v5}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
move-object v3, v2
move-object v2, v7
goto :goto_0
:cond_3
new-instance v4, Ljava/util/HashSet;
iget-object v5, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
new-instance v6, Ljava/util/HashSet;
invoke-direct {v6}, Ljava/util/HashSet;-><init>()V
invoke-interface {v5, v3, v6}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;
move-result-object v5
invoke-direct {v4, v5}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
invoke-virtual {v4, v2}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
iget-object v2, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v2
invoke-interface {v2, v3, v4}, 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
invoke-interface {v2, v3, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized b()V
.locals 4
monitor-enter p0
:try_start_0
iget-object v0, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
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
:goto_0
:cond_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;
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
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
invoke-interface {v0, v2}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
goto :goto_0
:cond_1
const-string v1, "fire-count"
invoke-interface {v0, v1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized c()Ljava/util/ArrayList;
.locals 5
monitor-enter p0
:try_start_0
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
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
:goto_0
:cond_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;
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
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/String;
new-instance v4, Ljava/util/ArrayList;
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/Set;
invoke-direct {v4, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
new-instance v2, Lz0/a;
invoke-direct {v2, v3, v4}, Lz0/a;-><init>(Ljava/lang/String;Ljava/util/ArrayList;)V
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v3, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v3}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v3
const-string v4, "fire-global"
invoke-interface {v3, v4, v1, v2}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
move-result-object v1
invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
:try_start_3
monitor-exit p0
throw v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized d(J)Ljava/lang/String;
.locals 3
monitor-enter p0
:try_start_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-lt v0, v1, :cond_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
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
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
:try_start_1
:cond_0
new-instance v0, Ljava/text/SimpleDateFormat;
const-string v1, "yyyy-MM-dd"
sget-object v2, Ljava/util/Locale;->UK:Ljava/util/Locale;
invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
new-instance v1, Ljava/util/Date;
invoke-direct {v1, p1, p2}, Ljava/util/Date;-><init>(J)V
invoke-virtual {v0, v1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized e(Ljava/lang/String;)Ljava/lang/String;
.locals 4
monitor-enter p0
:try_start_0
iget-object v0, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
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;
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
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/Set;
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;
invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
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
:cond_2
const/4 p1, 0x0
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized f(Ljava/lang/String;)V
.locals 4
monitor-enter p0
:try_start_0
invoke-virtual {p0, p1}, Lz0/h;->e(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
monitor-exit p0
return-void
:try_start_1
:cond_0
new-instance v1, Ljava/util/HashSet;
iget-object v2, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
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
invoke-virtual {v1, p1}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
invoke-virtual {v1}, Ljava/util/HashSet;->isEmpty()Z
move-result p1
if-eqz p1, :cond_1
iget-object p1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
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
:goto_0
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
goto :goto_1
:cond_1
iget-object p1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
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
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:goto_1
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized g(J)Z
.locals 5
const-string v0, "fire-global"
monitor-enter p0
:try_start_0
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v1, v0}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
move-result v1
const/4 v2, 0x1
if-eqz v1, :cond_1
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
const-wide/16 v3, -0x1
invoke-interface {v1, v0, v3, v4}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v3
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
invoke-virtual {p0, v3, v4}, Lz0/h;->d(J)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, p1, p2}, Lz0/h;->d(J)Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
monitor-exit p0
if-nez v1, :cond_0
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v1
invoke-interface {v1, v0, 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_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return v2
:cond_0
const/4 p1, 0x0
monitor-exit p0
return p1
:catchall_0
move-exception p1
:try_start_3
monitor-exit p0
throw p1
:cond_1
iget-object v1, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v1
invoke-interface {v1, v0, 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_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
monitor-exit p0
return v2
:catchall_1
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized h(JLjava/lang/String;)V
.locals 11
monitor-enter p0
:try_start_0
invoke-virtual {p0, p1, p2}, Lz0/h;->d(J)Ljava/lang/String;
move-result-object p1
iget-object p2, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
const-string v0, "last-used-date"
const-string v1, ""
invoke-interface {p2, v0, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz p2, :cond_0
monitor-exit p0
return-void
:try_start_1
:cond_0
iget-object p2, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
const-string v0, "fire-count"
const-wide/16 v1, 0x0
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_1
invoke-virtual {p0}, Lz0/h;->a()V
iget-object p2, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
const-string v0, "fire-count"
invoke-interface {p2, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v3
:cond_1
new-instance p2, Ljava/util/HashSet;
iget-object v0, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
new-instance v1, Ljava/util/HashSet;
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
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
invoke-virtual {p2, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-long/2addr v3, v5
iget-object v0, p0, Lz0/h;->a:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
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"
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"
invoke-interface {p2, p3, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)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
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method