405 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			405 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public abstract Lcom/google/firebase/messaging/EnhancedIntentService;
 | |
| .super Landroid/app/Service;
 | |
| .source "com.google.firebase:firebase-messaging@@23.0.0"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Landroid/annotation/SuppressLint;
 | |
|     value = {
 | |
|         "UnwrappedWakefulBroadcastReceiver"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private binder:Landroid/os/Binder;
 | |
| 
 | |
| .field public final executor:Ljava/util/concurrent/ExecutorService;
 | |
|     .annotation build Landroidx/annotation/VisibleForTesting;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private lastStartId:I
 | |
| 
 | |
| .field private final lock:Ljava/lang/Object;
 | |
| 
 | |
| .field private runningTasks:I
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static bridge synthetic -$$Nest$mprocessIntent(Lcom/google/firebase/messaging/EnhancedIntentService;Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
 | |
|     .locals 0
 | |
| 
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->processIntent(Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Landroid/app/Service;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {}, Lcom/google/firebase/messaging/FcmExecutors;->newIntentHandleExecutor()Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->executor:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     new-instance v0, Ljava/lang/Object;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->lock:Ljava/lang/Object;
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     iput v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->runningTasks:I
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private finishTask(Landroid/content/Intent;)V
 | |
|     .locals 1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1}, Lcom/google/firebase/messaging/WakeLockHolder;->completeWakefulIntent(Landroid/content/Intent;)V
 | |
| 
 | |
|     :cond_0
 | |
|     iget-object p1, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->lock:Ljava/lang/Object;
 | |
| 
 | |
|     .line 2
 | |
|     monitor-enter p1
 | |
| 
 | |
|     :try_start_0
 | |
|     iget v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->runningTasks:I
 | |
| 
 | |
|     add-int/lit8 v0, v0, -0x1
 | |
| 
 | |
|     iput v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->runningTasks:I
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     iget v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->lastStartId:I
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, v0}, Lcom/google/firebase/messaging/EnhancedIntentService;->stopSelfResultHook(I)Z
 | |
| 
 | |
|     .line 4
 | |
|     :cond_1
 | |
|     monitor-exit p1
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     monitor-exit p1
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method private processIntent(Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
 | |
|     .locals 3
 | |
|     .annotation build Landroidx/annotation/MainThread;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Landroid/content/Intent;",
 | |
|             ")",
 | |
|             "Lcom/google/android/gms/tasks/Task<",
 | |
|             "Ljava/lang/Void;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->handleIntentOnMainThread(Landroid/content/Intent;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/android/gms/tasks/TaskCompletionSource;
 | |
| 
 | |
|     invoke-direct {v0}, Lcom/google/android/gms/tasks/TaskCompletionSource;-><init>()V
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->executor:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     new-instance v2, Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda1;
 | |
| 
 | |
|     invoke-direct {v2, p0, p1, v0}, Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda1;-><init>(Lcom/google/firebase/messaging/EnhancedIntentService;Landroid/content/Intent;Lcom/google/android/gms/tasks/TaskCompletionSource;)V
 | |
| 
 | |
|     .line 4
 | |
|     invoke-interface {v1, v2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {v0}, Lcom/google/android/gms/tasks/TaskCompletionSource;->getTask()Lcom/google/android/gms/tasks/Task;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public getStartCommandIntent(Landroid/content/Intent;)Landroid/content/Intent;
 | |
|     .locals 0
 | |
|     .param p1    # Landroid/content/Intent;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public abstract handleIntent(Landroid/content/Intent;)V
 | |
|     .param p1    # Landroid/content/Intent;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| .end method
 | |
| 
 | |
| .method public handleIntentOnMainThread(Landroid/content/Intent;)Z
 | |
|     .locals 0
 | |
|     .param p1    # Landroid/content/Intent;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| .method public synthetic lambda$onStartCommand$1$com-google-firebase-messaging-EnhancedIntentService(Landroid/content/Intent;Lcom/google/android/gms/tasks/Task;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->finishTask(Landroid/content/Intent;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public synthetic lambda$processIntent$0$com-google-firebase-messaging-EnhancedIntentService(Landroid/content/Intent;Lcom/google/android/gms/tasks/TaskCompletionSource;)V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     invoke-virtual {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->handleIntent(Landroid/content/Intent;)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p2, v0}, Lcom/google/android/gms/tasks/TaskCompletionSource;->setResult(Ljava/lang/Object;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     invoke-virtual {p2, v0}, Lcom/google/android/gms/tasks/TaskCompletionSource;->setResult(Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 3
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public final declared-synchronized onBind(Landroid/content/Intent;)Landroid/os/IBinder;
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Intent;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     monitor-enter p0
 | |
| 
 | |
|     :try_start_0
 | |
|     const-string p1, "EnhancedIntentService"
 | |
| 
 | |
|     const/4 v0, 0x3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     const-string p1, "EnhancedIntentService"
 | |
| 
 | |
|     const-string v0, "Service received bind request"
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     :cond_0
 | |
|     iget-object p1, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->binder:Landroid/os/Binder;
 | |
| 
 | |
|     if-nez p1, :cond_1
 | |
| 
 | |
|     new-instance p1, Lcom/google/firebase/messaging/WithinAppServiceBinder;
 | |
| 
 | |
|     new-instance v0, Lcom/google/firebase/messaging/EnhancedIntentService$1;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {v0, p0}, Lcom/google/firebase/messaging/EnhancedIntentService$1;-><init>(Lcom/google/firebase/messaging/EnhancedIntentService;)V
 | |
| 
 | |
|     invoke-direct {p1, v0}, Lcom/google/firebase/messaging/WithinAppServiceBinder;-><init>(Lcom/google/firebase/messaging/WithinAppServiceBinder$IntentHandler;)V
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->binder:Landroid/os/Binder;
 | |
| 
 | |
|     :cond_1
 | |
|     iget-object p1, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->binder:Landroid/os/Binder;
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public onDestroy()V
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/CallSuper;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->executor:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->shutdown()V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-super {p0}, Landroid/app/Service;->onDestroy()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public final onStartCommand(Landroid/content/Intent;II)I
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Intent;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p2, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->lock:Ljava/lang/Object;
 | |
| 
 | |
|     monitor-enter p2
 | |
| 
 | |
|     :try_start_0
 | |
|     iput p3, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->lastStartId:I
 | |
| 
 | |
|     iget p3, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->runningTasks:I
 | |
| 
 | |
|     add-int/lit8 p3, p3, 0x1
 | |
| 
 | |
|     iput p3, p0, Lcom/google/firebase/messaging/EnhancedIntentService;->runningTasks:I
 | |
| 
 | |
|     .line 2
 | |
|     monitor-exit p2
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->getStartCommandIntent(Landroid/content/Intent;)Landroid/content/Intent;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     const/4 p3, 0x2
 | |
| 
 | |
|     if-nez p2, :cond_0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->finishTask(Landroid/content/Intent;)V
 | |
| 
 | |
|     return p3
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     invoke-direct {p0, p2}, Lcom/google/firebase/messaging/EnhancedIntentService;->processIntent(Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p2}, Lcom/google/android/gms/tasks/Task;->isComplete()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 7
 | |
|     invoke-direct {p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService;->finishTask(Landroid/content/Intent;)V
 | |
| 
 | |
|     return p3
 | |
| 
 | |
|     :cond_1
 | |
|     sget-object p3, Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda2;->INSTANCE:Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda2;
 | |
| 
 | |
|     .line 8
 | |
|     new-instance v0, Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda0;
 | |
| 
 | |
|     invoke-direct {v0, p0, p1}, Lcom/google/firebase/messaging/EnhancedIntentService$$ExternalSyntheticLambda0;-><init>(Lcom/google/firebase/messaging/EnhancedIntentService;Landroid/content/Intent;)V
 | |
| 
 | |
|     invoke-virtual {p2, p3, v0}, Lcom/google/android/gms/tasks/Task;->addOnCompleteListener(Ljava/util/concurrent/Executor;Lcom/google/android/gms/tasks/OnCompleteListener;)Lcom/google/android/gms/tasks/Task;
 | |
| 
 | |
|     const/4 p1, 0x3
 | |
| 
 | |
|     return p1
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 9
 | |
|     :try_start_1
 | |
|     monitor-exit p2
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public stopSelfResultHook(I)Z
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Landroid/app/Service;->stopSelfResult(I)Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     return p1
 | |
| .end method
 |