2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/utilities/voice/VoiceEngineForegroundService;
|
|
|
|
.super Landroid/app/IntentService;
|
|
|
|
.source "VoiceEngineForegroundService.kt"
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/app/AppComponent;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
.field public final ringManager:Lcom/discord/utilities/voice/CallSoundManager;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.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
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final wakeLock$delegate:Lkotlin/Lazy;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "VoiceEngineForegroundService"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "PublishSubject.create()"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v0, v1}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->unsubscribeSignal:Lrx/subjects/Subject;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
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;
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/voice/CallSoundManager;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x6
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/utilities/voice/CallSoundManager;-><init>(Lcom/discord/app/AppComponent;Lcom/discord/utilities/media/AppSoundManager;Lcom/discord/utilities/voice/CallSoundManager$IStoreStateGenerator;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->ringManager:Lcom/discord/utilities/voice/CallSoundManager;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
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
|
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-static {v0}, Lf/h/a/f/f/n/f;->lazy(Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
.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
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->ringManager:Lcom/discord/utilities/voice/CallSoundManager;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
invoke-virtual {p1, v0, v1}, Lcom/discord/utilities/voice/CallSoundManager;->subscribeToStoreState(J)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method private final getWakeLock()Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.method private final initScreenShareManager(Landroid/content/Intent;)V
|
2020-11-02 23:44:01 +00:00
|
|
|
.locals 16
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-object/from16 v14, p0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-object/from16 v0, p1
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
const-string v1, "com.discord.utilities.voice.extra.channel_id"
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Long;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
const-string v1, "com.discord.utilities.voice.extra.guild_id"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-object v4, v0
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/Long;
|
|
|
|
|
|
|
|
iget-object v0, v14, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/ScreenShareManager;->getChannelId()J
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-result-wide v0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
cmp-long v5, v0, v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
if-nez v5, :cond_1
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
iget-object v0, v14, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/ScreenShareManager;->getGuildId()Ljava/lang/Long;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v0, v4}, Ly/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-11-02 23:44:01 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, v14, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/ScreenShareManager;->release()V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance v15, Lcom/discord/utilities/voice/ScreenShareManager;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
const/4 v9, 0x0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
const/4 v10, 0x0
|
|
|
|
|
2020-10-08 18:27:51 +00:00
|
|
|
const/4 v11, 0x0
|
2020-10-05 23:18:16 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
const/16 v12, 0x3f8
|
2020-10-08 18:27:51 +00:00
|
|
|
|
|
|
|
const/4 v13, 0x0
|
2020-10-05 23:18:16 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-object v0, v15
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
move-object/from16 v1, p0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
invoke-direct/range {v0 .. v13}, Lcom/discord/utilities/voice/ScreenShareManager;-><init>(Lcom/discord/app/AppComponent;JLjava/lang/Long;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreRtcConnection;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
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
iput-object v15, v14, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->screenShareManager:Lcom/discord/utilities/voice/ScreenShareManager;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
:cond_3
|
2020-09-02 04:07:20 +00:00
|
|
|
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
|
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
const-string v0, "intent.getParcelableExtr\u2026t.EXTRA_INTENT) ?: return"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-13 20:45:03 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
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
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.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
|
2020-09-02 04:07:20 +00:00
|
|
|
.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
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->unsubscribeSignal:Lrx/subjects/Subject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
return-object v0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "intent"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->binder:Lcom/discord/utilities/voice/VoiceEngineForegroundService$LocalBinder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
return-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
sget-object v0, Lf/a/b/o;->c:Lf/a/b/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/o;->a(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
sget-object v0, Lf/a/b/o;->c:Lf/a/b/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/o;->b(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v0, v1}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
goto/16 :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
: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;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
goto/16 :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
: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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->initScreenShareManager(Landroid/content/Intent;)V
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->configureRingManager(Landroid/content/Intent;)V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
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
|
2020-09-02 04:07:20 +00:00
|
|
|
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
|
2020-05-17 12:40:10 +00:00
|
|
|
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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
: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
|
2020-05-17 12:40:10 +00:00
|
|
|
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
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:sswitch_6
|
2020-05-17 12:40:10 +00:00
|
|
|
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
|
2020-09-02 04:07:20 +00:00
|
|
|
-0x78b14b10 -> :sswitch_6
|
|
|
|
-0x593bf795 -> :sswitch_5
|
|
|
|
-0x2a79fa2c -> :sswitch_4
|
|
|
|
-0x29e659bb -> :sswitch_3
|
|
|
|
0x9a8bd66 -> :sswitch_2
|
2020-05-17 12:40:10 +00:00
|
|
|
0x20467429 -> :sswitch_1
|
|
|
|
0x5f84c829 -> :sswitch_0
|
|
|
|
.end sparse-switch
|
|
|
|
.end method
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
.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
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-interface {v0, v1}, Lh0/g;->onNext(Ljava/lang/Object;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroid/app/IntentService;->onUnbind(Landroid/content/Intent;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|