granularity level: instruction
.class public Lcom/google/firebase/installations/local/IidStore;
.super Ljava/lang/Object;
.source "IidStore.java"
.field private static final ALLOWABLE_SCOPES:[Ljava/lang/String;
.field private static final IID_SHARED_PREFS_NAME:Ljava/lang/String; = "com.google.android.gms.appid"
.field private static final JSON_ENCODED_PREFIX:Ljava/lang/String; = "{"
.field private static final JSON_TOKEN_KEY:Ljava/lang/String; = "token"
.field private static final STORE_KEY_ID:Ljava/lang/String; = "|S|id"
.field private static final STORE_KEY_PUB:Ljava/lang/String; = "|S||P|"
.field private static final STORE_KEY_SEPARATOR:Ljava/lang/String; = "|"
.field private static final STORE_KEY_TOKEN:Ljava/lang/String; = "|T|"
.field private final defaultSenderId:Ljava/lang/String;
.field private final iidPrefs:Landroid/content/SharedPreferences;
.method static constructor <clinit>()V
.locals 4
const-string v0, "*"
const-string v1, "FCM"
const-string v2, "GCM"
const-string v3, ""
filled-new-array {v0, v1, v2, v3}, [Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/google/firebase/installations/local/IidStore;->ALLOWABLE_SCOPES:[Ljava/lang/String;
return-void
.end method
.method public constructor <init>(Landroid/content/SharedPreferences;Ljava/lang/String;)V
.locals 0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public constructor <init>(Lcom/google/firebase/FirebaseApp;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-virtual {p1}, Lcom/google/firebase/FirebaseApp;->getApplicationContext()Landroid/content/Context;
move-result-object v0
const-string v1, "com.google.android.gms.appid"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
iput-object v0, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
invoke-static {p1}, Lcom/google/firebase/installations/local/IidStore;->getDefaultSenderId(Lcom/google/firebase/FirebaseApp;)Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lcom/google/firebase/installations/local/IidStore;->defaultSenderId:Ljava/lang/String;
return-void
.end method
.method private createTokenKey(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 2
const/4 v0, 0x0
return-object v0
.end method
.method private static getDefaultSenderId(Lcom/google/firebase/FirebaseApp;)Ljava/lang/String;
.locals 3
invoke-virtual {p0}, Lcom/google/firebase/FirebaseApp;->getOptions()Lcom/google/firebase/FirebaseOptions;
move-result-object v0
invoke-virtual {v0}, Lcom/google/firebase/FirebaseOptions;->getGcmSenderId()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private static getIdFromPublicKey(Ljava/security/PublicKey;)Ljava/lang/String;
.locals 3
const/4 v0, 0x0
return-object v0
.end method
.method private parseIidTokenFromJson(Ljava/lang/String;)Ljava/lang/String;
.locals 1
const/4 v0, 0x0
return-object v0
.end method
.method private parseKey(Ljava/lang/String;)Ljava/security/PublicKey;
.locals 2
const/4 v0, 0x0
return-object v0
.end method
.method private readInstanceIdFromLocalStorage()Ljava/lang/String;
.locals 4
iget-object v0, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
monitor-enter v0
iget-object v1, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
const-string v2, "|S|id"
const/4 v3, 0x0
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
monitor-exit v0
return-object v1
:catchall_0
move-exception v1
monitor-exit v0
:throw0
throw v1
.end method
.method private readPublicKeyFromLocalStorageAndCalculateInstanceId()Ljava/lang/String;
.locals 4
iget-object v0, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
monitor-enter v0
iget-object v1, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
const-string v2, "|S||P|"
const/4 v3, 0x0
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
monitor-exit v0
return-object v3
:catchall_0
move-exception v1
monitor-exit v0
:throw0
throw v1
.end method
.method public readIid()Ljava/lang/String;
.locals 2
iget-object v0, p0, Lcom/google/firebase/installations/local/IidStore;->iidPrefs:Landroid/content/SharedPreferences;
monitor-enter v0
invoke-direct {p0}, Lcom/google/firebase/installations/local/IidStore;->readInstanceIdFromLocalStorage()Ljava/lang/String;
move-result-object v1
invoke-direct {p0}, Lcom/google/firebase/installations/local/IidStore;->readPublicKeyFromLocalStorageAndCalculateInstanceId()Ljava/lang/String;
move-result-object v1
monitor-exit v0
return-object v1
:catchall_0
move-exception v1
monitor-exit v0
:throw0
throw v1
.end method
.method public readToken()Ljava/lang/String;
.locals 7
const/4 v0, 0x0
return-object v0
.end method