215 lines
6.2 KiB
Smali
215 lines
6.2 KiB
Smali
.class public final Lcom/google/firebase/sessions/SessionLifecycleService;
|
|
.super Landroid/app/Service;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/firebase/sessions/SessionLifecycleService$Companion;,
|
|
Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/google/firebase/sessions/SessionLifecycleService$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public final handlerThread:Landroid/os/HandlerThread;
|
|
|
|
.field public messageHandler:Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
|
|
.field public messenger:Landroid/os/Messenger;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/google/firebase/sessions/SessionLifecycleService$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/google/firebase/sessions/SessionLifecycleService$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/google/firebase/sessions/SessionLifecycleService;->Companion:Lcom/google/firebase/sessions/SessionLifecycleService$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 38
|
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V
|
|
|
|
.line 41
|
|
new-instance v0, Landroid/os/HandlerThread;
|
|
|
|
const-string v1, "FirebaseSessions_HandlerThread"
|
|
|
|
invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
|
|
|
|
iput-object v0, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->handlerThread:Landroid/os/HandlerThread;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getClientCallback(Landroid/content/Intent;)Landroid/os/Messenger;
|
|
.locals 3
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x21
|
|
|
|
const-string v2, "ClientCallbackMessenger"
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const-class v0, Landroid/os/Messenger;
|
|
|
|
.line 215
|
|
invoke-static {p1, v2, v0}, Landroidx/credentials/provider/IntentHandlerConverters$$ExternalSyntheticApiModelOutline1;->m(Landroid/content/Intent;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/Messenger;
|
|
|
|
goto :goto_0
|
|
|
|
.line 217
|
|
:cond_0
|
|
invoke-virtual {p1, v2}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/Messenger;
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 194
|
|
:cond_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Service bound to new client on process "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 195
|
|
invoke-virtual {p0, p1}, Lcom/google/firebase/sessions/SessionLifecycleService;->getClientCallback(Landroid/content/Intent;)Landroid/os/Messenger;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 v1, 0x4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 197
|
|
invoke-static {v0, v1, v2, v2}, Landroid/os/Message;->obtain(Landroid/os/Handler;III)Landroid/os/Message;
|
|
|
|
move-result-object v1
|
|
|
|
.line 198
|
|
iput-object p1, v1, Landroid/os/Message;->replyTo:Landroid/os/Messenger;
|
|
|
|
iget-object p1, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->messageHandler:Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 199
|
|
invoke-virtual {p1, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->messenger:Landroid/os/Messenger;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 201
|
|
invoke-virtual {p1}, Landroid/os/Messenger;->getBinder()Landroid/os/IBinder;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onCreate()V
|
|
.locals 3
|
|
|
|
.line 182
|
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->handlerThread:Landroid/os/HandlerThread;
|
|
|
|
.line 183
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
|
|
|
|
.line 184
|
|
new-instance v0, Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->handlerThread:Landroid/os/HandlerThread;
|
|
|
|
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "handlerThread.looper"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;-><init>(Landroid/os/Looper;)V
|
|
|
|
iput-object v0, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->messageHandler:Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
|
|
.line 185
|
|
new-instance v0, Landroid/os/Messenger;
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->messageHandler:Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;
|
|
|
|
invoke-direct {v0, v1}, Landroid/os/Messenger;-><init>(Landroid/os/Handler;)V
|
|
|
|
iput-object v0, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->messenger:Landroid/os/Messenger;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 1
|
|
|
|
.line 205
|
|
invoke-super {p0}, Landroid/app/Service;->onDestroy()V
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/sessions/SessionLifecycleService;->handlerThread:Landroid/os/HandlerThread;
|
|
|
|
.line 206
|
|
invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z
|
|
|
|
return-void
|
|
.end method
|