388 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			388 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;
 | |
| .super Ljava/lang/Object;
 | |
| .source "com.google.firebase:firebase-messaging@@23.0.0"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x1
 | |
|     name = "AutoInit"
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private autoInitEnabled:Ljava/lang/Boolean;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation build Ljavax/annotation/concurrent/GuardedBy;
 | |
|         value = "this"
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private dataCollectionDefaultChangeEventHandler:Lcom/google/firebase/events/EventHandler;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lcom/google/firebase/events/EventHandler<",
 | |
|             "Lcom/google/firebase/DataCollectionDefaultChange;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation build Ljavax/annotation/concurrent/GuardedBy;
 | |
|         value = "this"
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private initialized:Z
 | |
|     .annotation build Ljavax/annotation/concurrent/GuardedBy;
 | |
|         value = "this"
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private final subscriber:Lcom/google/firebase/events/Subscriber;
 | |
| 
 | |
| .field public final synthetic this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lcom/google/firebase/messaging/FirebaseMessaging;Lcom/google/firebase/events/Subscriber;)V
 | |
|     .locals 0
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     iput-object p2, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->subscriber:Lcom/google/firebase/events/Subscriber;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private readEnabled()Ljava/lang/Boolean;
 | |
|     .locals 6
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     const-string v0, "firebase_messaging_auto_init_enabled"
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     invoke-static {v1}, Lcom/google/firebase/messaging/FirebaseMessaging;->-$$Nest$fgetfirebaseApp(Lcom/google/firebase/messaging/FirebaseMessaging;)Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v1}, Lcom/google/firebase/FirebaseApp;->getApplicationContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const-string v2, "com.google.firebase.messaging"
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {v1, v2, v3}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     const-string v4, "auto_init"
 | |
| 
 | |
|     .line 3
 | |
|     invoke-interface {v2, v4}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     if-eqz v5, :cond_0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-interface {v2, v4, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     :try_start_0
 | |
|     invoke-virtual {v1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     if-eqz v2, :cond_1
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const/16 v3, 0x80
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {v2, v1, v3}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     .line 8
 | |
|     iget-object v2, v1, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
 | |
| 
 | |
|     if-eqz v2, :cond_1
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {v2, v0}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-eqz v2, :cond_1
 | |
| 
 | |
|     .line 10
 | |
|     iget-object v1, v1, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
 | |
| 
 | |
|     invoke-virtual {v1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
 | |
| 
 | |
|     move-result-object v0
 | |
|     :try_end_0
 | |
|     .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     :catch_0
 | |
|     :cond_1
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public declared-synchronized initialize()V
 | |
|     .locals 3
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     iget-boolean v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->initialized:Z
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_0
 | |
|     :try_start_1
 | |
|     invoke-direct {p0}, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->readEnabled()Ljava/lang/Boolean;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->autoInitEnabled:Ljava/lang/Boolean;
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit$$ExternalSyntheticLambda0;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit$$ExternalSyntheticLambda0;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;)V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->dataCollectionDefaultChangeEventHandler:Lcom/google/firebase/events/EventHandler;
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->subscriber:Lcom/google/firebase/events/Subscriber;
 | |
| 
 | |
|     const-class v2, Lcom/google/firebase/DataCollectionDefaultChange;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-interface {v1, v2, v0}, Lcom/google/firebase/events/Subscriber;->subscribe(Ljava/lang/Class;Lcom/google/firebase/events/EventHandler;)V
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     iput-boolean v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->initialized:Z
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public declared-synchronized isEnabled()Z
 | |
|     .locals 1
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->initialize()V
 | |
| 
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->autoInitEnabled:Ljava/lang/Boolean;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->-$$Nest$fgetfirebaseApp(Lcom/google/firebase/messaging/FirebaseMessaging;)Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {v0}, Lcom/google/firebase/FirebaseApp;->isDataCollectionDefaultEnabled()Z
 | |
| 
 | |
|     move-result v0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return v0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public synthetic lambda$initialize$0$com-google-firebase-messaging-FirebaseMessaging$AutoInit(Lcom/google/firebase/events/Event;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->isEnabled()Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     iget-object p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1}, Lcom/google/firebase/messaging/FirebaseMessaging;->-$$Nest$mstartSyncIfNecessary(Lcom/google/firebase/messaging/FirebaseMessaging;)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public declared-synchronized setEnabled(Z)V
 | |
|     .locals 3
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->initialize()V
 | |
| 
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->dataCollectionDefaultChangeEventHandler:Lcom/google/firebase/events/EventHandler;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->subscriber:Lcom/google/firebase/events/Subscriber;
 | |
| 
 | |
|     const-class v2, Lcom/google/firebase/DataCollectionDefaultChange;
 | |
| 
 | |
|     .line 2
 | |
|     invoke-interface {v1, v2, v0}, Lcom/google/firebase/events/Subscriber;->unsubscribe(Ljava/lang/Class;Lcom/google/firebase/events/EventHandler;)V
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->dataCollectionDefaultChangeEventHandler:Lcom/google/firebase/events/EventHandler;
 | |
| 
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->-$$Nest$fgetfirebaseApp(Lcom/google/firebase/messaging/FirebaseMessaging;)Lcom/google/firebase/FirebaseApp;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {v0}, Lcom/google/firebase/FirebaseApp;->getApplicationContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "com.google.firebase.messaging"
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 6
 | |
|     invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "auto_init"
 | |
| 
 | |
|     .line 7
 | |
|     invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
 | |
| 
 | |
|     .line 8
 | |
|     invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->this$0:Lcom/google/firebase/messaging/FirebaseMessaging;
 | |
| 
 | |
|     .line 9
 | |
|     invoke-static {v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->-$$Nest$mstartSyncIfNecessary(Lcom/google/firebase/messaging/FirebaseMessaging;)V
 | |
| 
 | |
|     .line 10
 | |
|     :cond_1
 | |
|     invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging$AutoInit;->autoInitEnabled:Ljava/lang/Boolean;
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 |