774 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			774 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/firebase/database/FirebaseDatabase;
 | |
| .super Ljava/lang/Object;
 | |
| .source "FirebaseDatabase.java"
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final SDK_VERSION:Ljava/lang/String; = "20.0.3"
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final app:Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
| .field private final config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
| .field private emulatorSettings:Lcom/google/firebase/emulators/EmulatedServiceSettings;
 | |
|     .annotation build Lcom/google/firebase/database/annotations/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
| .field private final repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lcom/google/firebase/FirebaseApp;Lcom/google/firebase/database/core/RepoInfo;Lcom/google/firebase/database/core/DatabaseConfig;)V
 | |
|     .locals 0
 | |
|     .param p1    # Lcom/google/firebase/FirebaseApp;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Lcom/google/firebase/database/core/RepoInfo;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p3    # Lcom/google/firebase/database/core/DatabaseConfig;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lcom/google/firebase/database/FirebaseDatabase;->app:Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     .line 3
 | |
|     iput-object p2, p0, Lcom/google/firebase/database/FirebaseDatabase;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p3, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$000(Lcom/google/firebase/database/FirebaseDatabase;)Lcom/google/firebase/database/core/Repo;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method private assertUnfrozen(Ljava/lang/String;)V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string v1, "Calls to "
 | |
| 
 | |
|     const-string v2, "() must be made before any other usage of FirebaseDatabase instance."
 | |
| 
 | |
|     invoke-static {v1, p1, v2}, Landroid/support/v4/media/f;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {v0, p1}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static createForTests(Lcom/google/firebase/FirebaseApp;Lcom/google/firebase/database/core/RepoInfo;Lcom/google/firebase/database/core/DatabaseConfig;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     invoke-direct {v0, p0, p1, p2}, Lcom/google/firebase/database/FirebaseDatabase;-><init>(Lcom/google/firebase/FirebaseApp;Lcom/google/firebase/database/core/RepoInfo;Lcom/google/firebase/database/core/DatabaseConfig;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {v0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method private declared-synchronized ensureRepo()V
 | |
|     .locals 2
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/database/FirebaseDatabase;->emulatorSettings:Lcom/google/firebase/emulators/EmulatedServiceSettings;
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Lcom/google/firebase/database/core/RepoInfo;->applyEmulatorSettings(Lcom/google/firebase/emulators/EmulatedServiceSettings;)V
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/database/FirebaseDatabase;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     invoke-static {v0, v1, p0}, Lcom/google/firebase/database/core/RepoManager;->createRepo(Lcom/google/firebase/database/core/Context;Lcom/google/firebase/database/core/RepoInfo;Lcom/google/firebase/database/FirebaseDatabase;)Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static getInstance()Lcom/google/firebase/database/FirebaseDatabase;
 | |
|     .locals 2
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {v0}, Lcom/google/firebase/database/FirebaseDatabase;->getInstance(Lcom/google/firebase/FirebaseApp;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string v1, "You must call FirebaseApp.initialize() first."
 | |
| 
 | |
|     invoke-direct {v0, v1}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static getInstance(Lcom/google/firebase/FirebaseApp;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
|     .locals 2
 | |
|     .param p0    # Lcom/google/firebase/FirebaseApp;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/FirebaseApp;->getOptions()Lcom/google/firebase/FirebaseOptions;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {v0}, Lcom/google/firebase/FirebaseOptions;->getDatabaseUrl()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     .line 8
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/FirebaseApp;->getOptions()Lcom/google/firebase/FirebaseOptions;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {v0}, Lcom/google/firebase/FirebaseOptions;->getProjectId()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const-string v0, "https://"
 | |
| 
 | |
|     .line 9
 | |
|     invoke-static {v0}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/FirebaseApp;->getOptions()Lcom/google/firebase/FirebaseOptions;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v1}, Lcom/google/firebase/FirebaseOptions;->getProjectId()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     const-string v1, "-default-rtdb.firebaseio.com"
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 10
 | |
|     :cond_0
 | |
|     new-instance p0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string v0, "Failed to get FirebaseDatabase instance: Can\'t determine Firebase Database URL. Be sure to include a Project ID in your configuration."
 | |
| 
 | |
|     invoke-direct {p0, v0}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     .line 11
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     invoke-static {p0, v0}, Lcom/google/firebase/database/FirebaseDatabase;->getInstance(Lcom/google/firebase/FirebaseApp;Ljava/lang/String;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static declared-synchronized getInstance(Lcom/google/firebase/FirebaseApp;Ljava/lang/String;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
|     .locals 4
 | |
|     .param p0    # Lcom/google/firebase/FirebaseApp;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Ljava/lang/String;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     const-class v0, Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     monitor-enter v0
 | |
| 
 | |
|     .line 12
 | |
|     :try_start_0
 | |
|     invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-nez v1, :cond_1
 | |
| 
 | |
|     const-string v1, "Provided FirebaseApp must not be null."
 | |
| 
 | |
|     .line 13
 | |
|     invoke-static {p0, v1}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 14
 | |
|     const-class v1, Lcom/google/firebase/database/FirebaseDatabaseComponent;
 | |
| 
 | |
|     invoke-virtual {p0, v1}, Lcom/google/firebase/FirebaseApp;->get(Ljava/lang/Class;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     check-cast p0, Lcom/google/firebase/database/FirebaseDatabaseComponent;
 | |
| 
 | |
|     const-string v1, "Firebase Database component is not present."
 | |
| 
 | |
|     .line 15
 | |
|     invoke-static {p0, v1}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 16
 | |
|     invoke-static {p1}, Lcom/google/firebase/database/core/utilities/Utilities;->parseUrl(Ljava/lang/String;)Lcom/google/firebase/database/core/utilities/ParsedUrl;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     .line 17
 | |
|     iget-object v2, v1, Lcom/google/firebase/database/core/utilities/ParsedUrl;->path:Lcom/google/firebase/database/core/Path;
 | |
| 
 | |
|     invoke-virtual {v2}, Lcom/google/firebase/database/core/Path;->isEmpty()Z
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-eqz v2, :cond_0
 | |
| 
 | |
|     .line 18
 | |
|     iget-object p1, v1, Lcom/google/firebase/database/core/utilities/ParsedUrl;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Lcom/google/firebase/database/FirebaseDatabaseComponent;->get(Lcom/google/firebase/database/core/RepoInfo;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     move-result-object p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     monitor-exit v0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 19
 | |
|     :cond_0
 | |
|     :try_start_1
 | |
|     new-instance p0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     new-instance v2, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v3, "Specified Database URL \'"
 | |
| 
 | |
|     invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     const-string p1, "\' is invalid. It should point to the root of a Firebase Database but it includes a path: "
 | |
| 
 | |
|     invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     iget-object p1, v1, Lcom/google/firebase/database/core/utilities/ParsedUrl;->path:Lcom/google/firebase/database/core/Path;
 | |
| 
 | |
|     .line 20
 | |
|     invoke-virtual {p1}, Lcom/google/firebase/database/core/Path;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     .line 21
 | |
|     :cond_1
 | |
|     new-instance p0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string p1, "Failed to get FirebaseDatabase instance: Specify DatabaseURL within FirebaseApp or from your getInstance() call."
 | |
| 
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p0
 | |
| 
 | |
|     monitor-exit v0
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method public static getInstance(Ljava/lang/String;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
|     .locals 1
 | |
|     .param p0    # Ljava/lang/String;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {v0, p0}, Lcom/google/firebase/database/FirebaseDatabase;->getInstance(Lcom/google/firebase/FirebaseApp;Ljava/lang/String;)Lcom/google/firebase/database/FirebaseDatabase;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_0
 | |
|     new-instance p0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string v0, "You must call FirebaseApp.initialize() first."
 | |
| 
 | |
|     invoke-direct {p0, v0}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method public static getSdkVersion()Ljava/lang/String;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     const-string v0, "20.0.3"
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public getApp()Lcom/google/firebase/FirebaseApp;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->app:Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getConfig()Lcom/google/firebase/database/core/DatabaseConfig;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getReference()Lcom/google/firebase/database/DatabaseReference;
 | |
|     .locals 3
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lcom/google/firebase/database/DatabaseReference;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     invoke-static {}, Lcom/google/firebase/database/core/Path;->getEmptyPath()Lcom/google/firebase/database/core/Path;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     invoke-direct {v0, v1, v2}, Lcom/google/firebase/database/DatabaseReference;-><init>(Lcom/google/firebase/database/core/Repo;Lcom/google/firebase/database/core/Path;)V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getReference(Ljava/lang/String;)Lcom/google/firebase/database/DatabaseReference;
 | |
|     .locals 2
 | |
|     .param p1    # Ljava/lang/String;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     const-string v0, "Can\'t pass null for argument \'pathString\' in FirebaseDatabase.getReference()"
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {p1}, Lcom/google/firebase/database/core/utilities/Validation;->validateRootPathString(Ljava/lang/String;)V
 | |
| 
 | |
|     .line 6
 | |
|     new-instance v0, Lcom/google/firebase/database/core/Path;
 | |
| 
 | |
|     invoke-direct {v0, p1}, Lcom/google/firebase/database/core/Path;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     .line 7
 | |
|     new-instance p1, Lcom/google/firebase/database/DatabaseReference;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     invoke-direct {p1, v1, v0}, Lcom/google/firebase/database/DatabaseReference;-><init>(Lcom/google/firebase/database/core/Repo;Lcom/google/firebase/database/core/Path;)V
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public getReferenceFromUrl(Ljava/lang/String;)Lcom/google/firebase/database/DatabaseReference;
 | |
|     .locals 3
 | |
|     .param p1    # Ljava/lang/String;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     const-string v0, "Can\'t pass null for argument \'url\' in FirebaseDatabase.getReferenceFromUrl()"
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p1}, Lcom/google/firebase/database/core/utilities/Utilities;->parseUrl(Ljava/lang/String;)Lcom/google/firebase/database/core/utilities/ParsedUrl;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v1, v0, Lcom/google/firebase/database/core/utilities/ParsedUrl;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/firebase/database/FirebaseDatabase;->emulatorSettings:Lcom/google/firebase/emulators/EmulatedServiceSettings;
 | |
| 
 | |
|     invoke-virtual {v1, v2}, Lcom/google/firebase/database/core/RepoInfo;->applyEmulatorSettings(Lcom/google/firebase/emulators/EmulatedServiceSettings;)V
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v1, v0, Lcom/google/firebase/database/core/utilities/ParsedUrl;->repoInfo:Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     iget-object v1, v1, Lcom/google/firebase/database/core/RepoInfo;->host:Ljava/lang/String;
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     invoke-virtual {v2}, Lcom/google/firebase/database/core/Repo;->getRepoInfo()Lcom/google/firebase/database/core/RepoInfo;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iget-object v2, v2, Lcom/google/firebase/database/core/RepoInfo;->host:Ljava/lang/String;
 | |
| 
 | |
|     invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eqz v1, :cond_0
 | |
| 
 | |
|     .line 6
 | |
|     new-instance p1, Lcom/google/firebase/database/DatabaseReference;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     iget-object v0, v0, Lcom/google/firebase/database/core/utilities/ParsedUrl;->path:Lcom/google/firebase/database/core/Path;
 | |
| 
 | |
|     invoke-direct {p1, v1, v0}, Lcom/google/firebase/database/DatabaseReference;-><init>(Lcom/google/firebase/database/core/Repo;Lcom/google/firebase/database/core/Path;)V
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 7
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/firebase/database/DatabaseException;
 | |
| 
 | |
|     const-string v1, "Invalid URL ("
 | |
| 
 | |
|     const-string v2, ") passed to getReference().  URL was expected to match configured Database URL: "
 | |
| 
 | |
|     invoke-static {v1, p1, v2}, Landroidx/activity/result/g;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 8
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/database/FirebaseDatabase;->getReference()Lcom/google/firebase/database/DatabaseReference;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v1}, Lcom/google/firebase/database/DatabaseReference;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {v0, p1}, Lcom/google/firebase/database/DatabaseException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public goOffline()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/firebase/database/core/RepoManager;->interrupt(Lcom/google/firebase/database/core/Repo;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public goOnline()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/firebase/database/core/RepoManager;->resume(Lcom/google/firebase/database/core/Repo;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public purgeOutstandingWrites()V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/database/FirebaseDatabase;->ensureRepo()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     new-instance v1, Lcom/google/firebase/database/FirebaseDatabase$1;
 | |
| 
 | |
|     invoke-direct {v1, p0}, Lcom/google/firebase/database/FirebaseDatabase$1;-><init>(Lcom/google/firebase/database/FirebaseDatabase;)V
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Lcom/google/firebase/database/core/Repo;->scheduleNow(Ljava/lang/Runnable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public declared-synchronized setLogLevel(Lcom/google/firebase/database/Logger$Level;)V
 | |
|     .locals 1
 | |
|     .param p1    # Lcom/google/firebase/database/Logger$Level;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     :try_start_0
 | |
|     const-string v0, "setLogLevel"
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, v0}, Lcom/google/firebase/database/FirebaseDatabase;->assertUnfrozen(Ljava/lang/String;)V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lcom/google/firebase/database/core/DatabaseConfig;->setLogLevel(Lcom/google/firebase/database/Logger$Level;)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 3
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public declared-synchronized setPersistenceCacheSizeBytes(J)V
 | |
|     .locals 1
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     :try_start_0
 | |
|     const-string v0, "setPersistenceCacheSizeBytes"
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, v0}, Lcom/google/firebase/database/FirebaseDatabase;->assertUnfrozen(Ljava/lang/String;)V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     invoke-virtual {v0, p1, p2}, Lcom/google/firebase/database/core/DatabaseConfig;->setPersistenceCacheSizeBytes(J)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 3
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public declared-synchronized setPersistenceEnabled(Z)V
 | |
|     .locals 1
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     :try_start_0
 | |
|     const-string v0, "setPersistenceEnabled"
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, v0}, Lcom/google/firebase/database/FirebaseDatabase;->assertUnfrozen(Ljava/lang/String;)V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->config:Lcom/google/firebase/database/core/DatabaseConfig;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lcom/google/firebase/database/core/DatabaseConfig;->setPersistenceEnabled(Z)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 3
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public useEmulator(Ljava/lang/String;I)V
 | |
|     .locals 1
 | |
|     .param p1    # Ljava/lang/String;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->repo:Lcom/google/firebase/database/core/Repo;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lcom/google/firebase/emulators/EmulatedServiceSettings;
 | |
| 
 | |
|     invoke-direct {v0, p1, p2}, Lcom/google/firebase/emulators/EmulatedServiceSettings;-><init>(Ljava/lang/String;I)V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/database/FirebaseDatabase;->emulatorSettings:Lcom/google/firebase/emulators/EmulatedServiceSettings;
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     new-instance p1, Ljava/lang/IllegalStateException;
 | |
| 
 | |
|     const-string p2, "Cannot call useEmulator() after instance has already been initialized."
 | |
| 
 | |
|     invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p1
 | |
| .end method
 |