678 lines
21 KiB
Smali
678 lines
21 KiB
Smali
.class public final Lcom/discord/utilities/voice/VoiceEngineForegroundService;
|
|
.super Landroid/app/IntentService;
|
|
.source "VoiceEngineForegroundService.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/app/AppComponent;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$Constants;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$Actions;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$Connection;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;,
|
|
Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion;
|
|
|
|
.field public static final LOG_TAG:Ljava/lang/String; = "DiscordVoiceService"
|
|
|
|
.field public static onDisconnect:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final onNotificationClass:Ljava/lang/Class;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Class<",
|
|
"Lcom/discord/app/AppActivity$Main;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static onToggleSelfDeafen:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static onToggleSelfMute:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field public final binder:Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;
|
|
|
|
.field public final ringManager:Lcom/discord/utilities/voice/RingManager;
|
|
|
|
.field public screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
.field public final unsubscribeSignal:Lrx/subjects/Subject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/Subject<",
|
|
"Ljava/lang/Void;",
|
|
"Ljava/lang/Void;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final wakeLock$delegate:Lkotlin/Lazy;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->Companion:Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion;
|
|
|
|
const-class v0, Lcom/discord/app/AppActivity$Main;
|
|
|
|
sput-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onNotificationClass:Ljava/lang/Class;
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onDisconnect$1;->INSTANCE:Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onDisconnect$1;
|
|
|
|
sput-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onDisconnect:Lkotlin/jvm/functions/Function0;
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onToggleSelfDeafen$1;->INSTANCE:Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onToggleSelfDeafen$1;
|
|
|
|
sput-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfDeafen:Lkotlin/jvm/functions/Function0;
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onToggleSelfMute$1;->INSTANCE:Lcom/discord/utilities/voice/VoiceEngineForegroundService$Companion$onToggleSelfMute$1;
|
|
|
|
sput-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfMute:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 7
|
|
|
|
const-string v0, "VoiceEngineForegroundService"
|
|
|
|
invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "PublishSubject.create()"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->unsubscribeSignal:Lrx/subjects/Subject;
|
|
|
|
new-instance v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;-><init>(Lcom/discord/utilities/voice/VoiceEngineForegroundService;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->binder:Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;
|
|
|
|
new-instance v0, Lcom/discord/utilities/voice/RingManager;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v2, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/utilities/voice/RingManager;-><init>(Lcom/discord/app/AppComponent;Lcom/discord/utilities/media/AppSoundManager;Lcom/discord/utilities/voice/RingManager$IStoreStateGenerator;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->ringManager:Lcom/discord/utilities/voice/RingManager;
|
|
|
|
new-instance v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$wakeLock$2;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$wakeLock$2;-><init>(Lcom/discord/utilities/voice/VoiceEngineForegroundService;)V
|
|
|
|
invoke-static {v0}, Lf/h/a/f/f/n/f;->lazy(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->wakeLock$delegate:Lkotlin/Lazy;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnDisconnect$cp()Lkotlin/jvm/functions/Function0;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onDisconnect:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnNotificationClass$cp()Ljava/lang/Class;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onNotificationClass:Ljava/lang/Class;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnToggleSelfDeafen$cp()Lkotlin/jvm/functions/Function0;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfDeafen:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnToggleSelfMute$cp()Lkotlin/jvm/functions/Function0;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfMute:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setOnDisconnect$cp(Lkotlin/jvm/functions/Function0;)V
|
|
.locals 0
|
|
|
|
sput-object p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onDisconnect:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setOnToggleSelfDeafen$cp(Lkotlin/jvm/functions/Function0;)V
|
|
.locals 0
|
|
|
|
sput-object p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfDeafen:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setOnToggleSelfMute$cp(Lkotlin/jvm/functions/Function0;)V
|
|
.locals 0
|
|
|
|
sput-object p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfMute:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureRingManager(Landroid/content/Intent;)V
|
|
.locals 2
|
|
|
|
const-string v0, "com.discord.utilities.voice.extra.channel_id"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/Long;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->ringManager:Lcom/discord/utilities/voice/RingManager;
|
|
|
|
invoke-virtual {p1, v0, v1}, Lcom/discord/utilities/voice/RingManager;->subscribeToStoreState(J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->wakeLock$delegate:Lkotlin/Lazy;
|
|
|
|
invoke-interface {v0}, Lkotlin/Lazy;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final initScreenShareManager(Landroid/content/Intent;)V
|
|
.locals 14
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "com.discord.utilities.voice.extra.channel_id"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Long;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
const-string v0, "com.discord.utilities.voice.extra.guild_id"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v5, p1
|
|
|
|
check-cast v5, Ljava/lang/Long;
|
|
|
|
new-instance p1, Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/16 v12, 0x1f8
|
|
|
|
const/4 v13, 0x0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p0
|
|
|
|
invoke-direct/range {v1 .. v13}, Lcom/discord/utilities/voice/ScreenShareManager;-><init>(Lcom/discord/app/AppComponent;JLjava/lang/Long;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreStreamRtcConnection;Lcom/discord/stores/StoreUser;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/utilities/images/ImageEncoder;Lcom/discord/tooltips/TooltipManager;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final onStartStream(Landroid/content/Intent;)V
|
|
.locals 1
|
|
|
|
const-string v0, "android.intent.extra.INTENT"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/content/Intent;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "intent.getParcelableExtr\u2026t.EXTRA_INTENT) ?: return"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/voice/ScreenShareManager;->startStream(Landroid/content/Intent;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final onStopStream()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/ScreenShareManager;->stopStream()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final setProximityLock(Z)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;->acquireProximityLock()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;->releaseProximityLock()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getUnsubscribeSignal()Lrx/subjects/Subject;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/subjects/Subject<",
|
|
"Ljava/lang/Void;",
|
|
"Ljava/lang/Void;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->unsubscribeSignal:Lrx/subjects/Subject;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 1
|
|
|
|
const-string v0, "intent"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->binder:Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onCreate()V
|
|
.locals 2
|
|
|
|
invoke-super {p0}, Landroid/app/IntentService;->onCreate()V
|
|
|
|
const-string v0, "DiscordVoiceService"
|
|
|
|
const-string v1, "Service created."
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v0, Lf/a/b/o;->c:Lf/a/b/o;
|
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/o;->a(Ljava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;->acquire()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 2
|
|
|
|
invoke-super {p0}, Landroid/app/IntentService;->onDestroy()V
|
|
|
|
const-string v0, "DiscordVoiceService"
|
|
|
|
const-string v1, "Service destroyed."
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v0, Lf/a/b/o;->c:Lf/a/b/o;
|
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/o;->b(Ljava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;->release()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onHandleIntent(Landroid/content/Intent;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v1, "intent?.action ?: return"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Received action: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "DiscordVoiceService"
|
|
|
|
invoke-static {v2, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
sparse-switch v1, :sswitch_data_0
|
|
|
|
goto/16 :goto_0
|
|
|
|
:sswitch_0
|
|
const-string p1, "com.discord.utilities.voice.action.toggle_muted"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object p1, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfMute:Lkotlin/jvm/functions/Function0;
|
|
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
goto/16 :goto_0
|
|
|
|
:sswitch_1
|
|
const-string v1, "com.discord.utilities.voice.action.start_foreground"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->initScreenShareManager(Landroid/content/Intent;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->configureRingManager(Landroid/content/Intent;)V
|
|
|
|
const/16 v0, 0x65
|
|
|
|
new-instance v1, Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;
|
|
|
|
invoke-direct {v1, p1, p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;-><init>(Landroid/content/Intent;Landroid/content/Context;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/app/IntentService;->startForeground(ILandroid/app/Notification;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const-string v1, "com.discord.utilities.voice.extra.proximity_lock_enabled"
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->setProximityLock(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_2
|
|
const-string v1, "com.discord.utilities.voice.action.start_stream"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onStartStream(Landroid/content/Intent;)V
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_3
|
|
const-string p1, "com.discord.utilities.voice.action.disconnect"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object p1, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onDisconnect:Lkotlin/jvm/functions/Function0;
|
|
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
invoke-virtual {p0, v2}, Landroid/app/IntentService;->stopForeground(Z)V
|
|
|
|
invoke-virtual {p0}, Landroid/app/IntentService;->stopSelf()V
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_4
|
|
const-string p1, "com.discord.utilities.voice.action.stop_stream"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onStopStream()V
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_5
|
|
const-string p1, "com.discord.utilities.voice.action.stop"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0, v2}, Landroid/app/IntentService;->stopForeground(Z)V
|
|
|
|
invoke-virtual {p0}, Landroid/app/IntentService;->stopSelf()V
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_6
|
|
const-string p1, "com.discord.utilities.voice.action.toggle_deafened"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object p1, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->onToggleSelfDeafen:Lkotlin/jvm/functions/Function0;
|
|
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:sswitch_data_0
|
|
.sparse-switch
|
|
-0x78b14b10 -> :sswitch_6
|
|
-0x593bf795 -> :sswitch_5
|
|
-0x2a79fa2c -> :sswitch_4
|
|
-0x29e659bb -> :sswitch_3
|
|
0x9a8bd66 -> :sswitch_2
|
|
0x20467429 -> :sswitch_1
|
|
0x5f84c829 -> :sswitch_0
|
|
.end sparse-switch
|
|
.end method
|
|
|
|
.method public onUnbind(Landroid/content/Intent;)Z
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->getUnsubscribeSignal()Lrx/subjects/Subject;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-interface {v0, v1}, Ll0/g;->onNext(Ljava/lang/Object;)V
|
|
|
|
invoke-super {p0, p1}, Landroid/app/IntentService;->onUnbind(Landroid/content/Intent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|