- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
487 lines
14 KiB
Smali
487 lines
14 KiB
Smali
.class public Lcom/google/firebase/messaging/WithinAppServiceConnection;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Landroid/content/ServiceConnection;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public binder:Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
.field public connectionInProgress:Z
|
|
|
|
.field public final connectionIntent:Landroid/content/Intent;
|
|
|
|
.field public final context:Landroid/content/Context;
|
|
|
|
.field public final intentQueue:Ljava/util/Queue;
|
|
|
|
.field public final scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
.line 109
|
|
new-instance v0, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
|
|
|
|
new-instance v1, Lcom/google/android/gms/common/util/concurrent/NamedThreadFactory;
|
|
|
|
const-string v2, "Firebase-FirebaseInstanceIdServiceConnection"
|
|
|
|
invoke-direct {v1, v2}, Lcom/google/android/gms/common/util/concurrent/NamedThreadFactory;-><init>(Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v2, v1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
.locals 1
|
|
|
|
.line 118
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 95
|
|
new-instance v0, Ljava/util/ArrayDeque;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
.line 119
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->context:Landroid/content/Context;
|
|
|
|
.line 120
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionIntent:Landroid/content/Intent;
|
|
|
|
iput-object p3, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final finishAllInQueue()V
|
|
.locals 1
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
.line 188
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
.line 189
|
|
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;
|
|
|
|
invoke-virtual {v0}, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;->finish()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final declared-synchronized flushQueue()V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 137
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
.line 140
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
.line 141
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->binder:Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 145
|
|
invoke-virtual {v0}, Landroid/os/Binder;->isBinderAlive()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
.line 146
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
.line 149
|
|
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->binder:Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
.line 150
|
|
invoke-virtual {v2, v0}, Lcom/google/firebase/messaging/WithinAppServiceBinder;->send(Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 152
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->startConnectionIfNeeded()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 153
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 156
|
|
:cond_1
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 195
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 196
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "onServiceConnected: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
.line 200
|
|
instance-of p1, p2, Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const-string p1, "FirebaseMessaging"
|
|
|
|
.line 201
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Invalid service connection: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 202
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->finishAllInQueue()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 203
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 206
|
|
:cond_1
|
|
:try_start_1
|
|
check-cast p2, Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
iput-object p2, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->binder:Lcom/google/firebase/messaging/WithinAppServiceBinder;
|
|
|
|
.line 207
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->flushQueue()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 208
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onServiceDisconnected(Landroid/content/ComponentName;)V
|
|
.locals 2
|
|
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 212
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 213
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "onServiceDisconnected: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
.line 215
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->flushQueue()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public declared-synchronized sendIntent(Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 126
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
.line 129
|
|
new-instance v0, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;
|
|
|
|
invoke-direct {v0, p1}, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;-><init>(Landroid/content/Intent;)V
|
|
|
|
iget-object p1, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
.line 130
|
|
invoke-virtual {v0, p1}, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;->arrangeTimeout(Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
|
|
iget-object p1, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->intentQueue:Ljava/util/Queue;
|
|
|
|
.line 131
|
|
invoke-interface {p1, v0}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 132
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->flushQueue()V
|
|
|
|
.line 133
|
|
invoke-virtual {v0}, Lcom/google/firebase/messaging/WithinAppServiceConnection$BindRequest;->getTask()Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
: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 final startConnectionIfNeeded()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x3
|
|
|
|
const-string v1, "FirebaseMessaging"
|
|
|
|
.line 160
|
|
invoke-static {v1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 161
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "binder is dead. start connection? "
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-boolean v3, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
xor-int/2addr v3, v2
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
iput-boolean v2, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
.line 169
|
|
:try_start_0
|
|
invoke-static {}, Lcom/google/android/gms/common/stats/ConnectionTracker;->getInstance()Lcom/google/android/gms/common/stats/ConnectionTracker;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->context:Landroid/content/Context;
|
|
|
|
iget-object v3, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionIntent:Landroid/content/Intent;
|
|
|
|
const/16 v4, 0x41
|
|
|
|
.line 170
|
|
invoke-virtual {v0, v2, v3, p0, v4}, Lcom/google/android/gms/common/stats/ConnectionTracker;->bindService(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string v0, "binding to the service failed"
|
|
|
|
.line 175
|
|
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
:try_end_0
|
|
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v2, "Exception while binding the service"
|
|
|
|
.line 178
|
|
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/google/firebase/messaging/WithinAppServiceConnection;->connectionInProgress:Z
|
|
|
|
.line 183
|
|
invoke-virtual {p0}, Lcom/google/firebase/messaging/WithinAppServiceConnection;->finishAllInQueue()V
|
|
|
|
return-void
|
|
.end method
|