155 lines
4.2 KiB
Smali
155 lines
4.2 KiB
Smali
.class public final Lcom/google/firebase/c/a;
|
|
.super Ljava/lang/Object;
|
|
.source "com.google.firebase:firebase-common@@19.0.0"
|
|
|
|
|
|
# instance fields
|
|
.field private final aSm:Lcom/google/firebase/a/c;
|
|
|
|
.field public final aSn:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field private final applicationContext:Landroid/content/Context;
|
|
|
|
.field private final sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/a/c;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_1
|
|
|
|
invoke-static {p1}, Landroidx/core/content/ContextCompat;->isDeviceProtectedStorage(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Landroidx/core/content/ContextCompat;->createDeviceProtectedStorageContext(Landroid/content/Context;)Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
move-object v0, p1
|
|
|
|
:goto_1
|
|
iput-object v0, p0, Lcom/google/firebase/c/a;->applicationContext:Landroid/content/Context;
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "com.google.firebase.common.prefs:"
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)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, Lcom/google/firebase/c/a;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
iput-object p3, p0, Lcom/google/firebase/c/a;->aSm:Lcom/google/firebase/a/c;
|
|
|
|
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-direct {p0}, Lcom/google/firebase/c/a;->Al()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/c/a;->aSn:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private Al()Z
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/c/a;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
const-string v1, "firebase_data_collection_default_enabled"
|
|
|
|
invoke-interface {v0, v1}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/c/a;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/c/a;->applicationContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v3, p0, Lcom/google/firebase/c/a;->applicationContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/16 v4, 0x80
|
|
|
|
invoke-virtual {v0, v3, v4}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v3, v0, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
iget-object v3, v0, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
|
|
|
|
invoke-virtual {v3, v1}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
:cond_1
|
|
return v2
|
|
.end method
|