2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
.source "StoreAudioDevices.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreAudioDevices$OutputDevice;,
|
|
|
|
Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;,
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;,
|
2020-05-17 12:40:10 +00:00
|
|
|
Lcom/discord/stores/StoreAudioDevices$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/stores/StoreAudioDevices$Companion;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_AUDIO_DEVICES_STATE:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_OUTPUT_DEVICE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_OUTPUT_STATE:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
.field public final audioDevicesStateSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;",
|
|
|
|
"Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final audioOutputMonitor:Lcom/discord/utilities/media/AudioOutputMonitor;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.field public audioOutputState:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
.field public isDirty:Z
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public final selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
.field public final videoUseDetector:Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.field public wasMeUsingVideoInChannel:Z
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreAudioDevices$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreAudioDevices$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreAudioDevices;->Companion:Lcom/discord/stores/StoreAudioDevices$Companion;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_OUTPUT_DEVICE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/utilities/media/AudioOutputState;-><init>(ZZZZLjava/lang/String;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_OUTPUT_STATE:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_OUTPUT_DEVICE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
const/4 v3, 0x2
|
|
|
|
|
|
|
|
new-array v3, v3, [Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
|
|
|
|
sget-object v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
aput-object v4, v3, v5
|
|
|
|
|
|
|
|
sget-object v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
aput-object v4, v3, v5
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v3}, Lf/h/a/f/e/n/f;->setOf([Ljava/lang/Object;)Ljava/util/Set;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v1, v0, v2, v3}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;-><init>(Lcom/discord/utilities/media/AudioOutputState;Lcom/discord/stores/StoreAudioDevices$OutputDevice;Ljava/util/Set;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-object v1, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_AUDIO_DEVICES_STATE:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/media/AudioOutputMonitor;Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;Lcom/discord/stores/StoreVoiceChannelSelected;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "dispatcher"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const-string v0, "audioOutputMonitor"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p2, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string/jumbo v0, "videoUseDetector"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p3, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "selectedVoiceChannelStore"
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p4, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreAudioDevices;->audioOutputMonitor:Lcom/discord/utilities/media/AudioOutputMonitor;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreAudioDevices;->videoUseDetector:Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;
|
|
|
|
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreAudioDevices;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
sget-object p1, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_AUDIO_DEVICES_STATE:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p2, Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-30 20:48:36 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->i0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p2, p1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesStateSubject:Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$autoSelectNonSpeakerOutput(Lcom/discord/stores/StoreAudioDevices;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->autoSelectNonSpeakerOutput()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDEFAULT_AUDIO_DEVICES_STATE$cp()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_AUDIO_DEVICES_STATE:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDEFAULT_OUTPUT_STATE$cp()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreAudioDevices;->DEFAULT_OUTPUT_STATE:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreAudioDevices;)Lcom/discord/stores/Dispatcher;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreAudioDevices;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$updateAudioOutputState(Lcom/discord/stores/StoreAudioDevices;Lcom/discord/utilities/media/AudioOutputState;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreAudioDevices;->updateAudioOutputState(Lcom/discord/utilities/media/AudioOutputState;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices;Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreAudioDevices;->updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final autoSelectAudioOutput()V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 3
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->getSelectedVoiceChannelId$app_productionDiscordExternalRelease()J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/media/AudioOutputState;->isExternalAudioOutputConnected()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->autoSelectNonSpeakerOutput()V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreAudioDevices;->videoUseDetector:Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0, v1}, Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;->isAnyoneUsingVideoInChannel(J)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
sget-object v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreAudioDevices;->updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
|
|
|
|
:goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final autoSelectNonSpeakerOutput()V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAvailableOutputDevices()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
move-object v3, v2
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
|
|
|
|
instance-of v3, v3, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
check-cast v2, Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/media/AudioOutputState;->isBluetoothOutputConnected()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/media/AudioOutputState;->isHeadsetUnplugged()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreAudioDevices$OutputDevice$WiredAudio;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$WiredAudio;
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-direct {p0, v2}, Lcom/discord/stores/StoreAudioDevices;->updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.method private final refreshAudioOutputState()V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioOutputState:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreAudioDevices;->updateAudioOutputState(Lcom/discord/utilities/media/AudioOutputState;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method private final updateAudioOutputState(Lcom/discord/utilities/media/AudioOutputState;)V
|
|
|
|
.locals 9
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioOutputState:Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/media/AudioOutputState;->isBluetoothOutputConnected()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/media/AudioOutputState;->isHeadsetUnplugged()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
xor-int/2addr v1, v2
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x6
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v8}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->copy$default(Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;Lcom/discord/utilities/media/AudioOutputState;Lcom/discord/stores/StoreAudioDevices$OutputDevice;Ljava/util/Set;ILjava/lang/Object;)Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
iput-object v3, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
new-array v3, v2, [Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
sget-object v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const/4 v5, 0x0
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
aput-object v4, v3, v5
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v4, "elements"
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v3, v4}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
new-instance v4, Ljava/util/LinkedHashSet;
|
|
|
|
|
|
|
|
invoke-static {v2}, Lf/h/a/f/e/n/f;->mapCapacity(I)I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
invoke-direct {v4, v5}, Ljava/util/LinkedHashSet;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Lf/h/a/f/e/n/f;->toCollection([Ljava/lang/Object;Ljava/util/Collection;)Ljava/util/Collection;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isHeadsetUnplugged()Z
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-nez v3, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreAudioDevices$OutputDevice$WiredAudio;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$WiredAudio;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v4, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreAudioDevices;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceChannelSelected;->getSelectedVoiceChannelId$app_productionDiscordExternalRelease()J
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-wide v5
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreAudioDevices;->videoUseDetector:Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v3, v5, v6}, Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;->isMeUsingVideoInChannel(J)Z
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result v3
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-nez v3, :cond_1
|
2020-08-04 06:02:43 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
sget-object v3, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Earpiece;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v4, v3}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isBluetoothOutputConnected()Z
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v3, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
new-instance v3, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->getBluetoothDeviceName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-direct {v3, p1}, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v4, v3}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
:goto_0
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-direct {p0, v4}, Lcom/discord/stores/StoreAudioDevices;->updateAvailableOutputDevices(Ljava/util/Set;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
if-nez v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isBluetoothOutputConnected()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
if-nez v3, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_3
|
|
|
|
if-eqz v0, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isBluetoothOutputConnected()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
if-eqz v0, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_4
|
|
|
|
if-nez v1, :cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isHeadsetUnplugged()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
if-eqz v0, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_5
|
|
|
|
if-eqz v1, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isHeadsetUnplugged()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
if-eqz p1, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->autoSelectAudioOutput()V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
:cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
iput-boolean v2, p0, Lcom/discord/stores/StoreAudioDevices;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final updateAvailableOutputDevices(Ljava/util/Set;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/stores/StoreAudioDevices$OutputDevice;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x3
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v3, p1
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->copy$default(Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;Lcom/discord/utilities/media/AudioOutputState;Lcom/discord/stores/StoreAudioDevices$OutputDevice;Ljava/util/Set;ILjava/lang/Object;)Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreAudioDevices;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x5
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v2, p1
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->copy$default(Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;Lcom/discord/utilities/media/AudioOutputState;Lcom/discord/stores/StoreAudioDevices$OutputDevice;Ljava/util/Set;ILjava/lang/Object;)Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreAudioDevices;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getAudioDevicesState()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesStateSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "audioDevicesStateSubject\u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v0, v1}, Lb0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getAudioDevicesState$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamRtcConnectionStateChange(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "state"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAudioOutputState()Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/media/AudioOutputState;->isExternalAudioOutputConnected()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;->INSTANCE:Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreAudioDevices;->updateSelectedOutputDevice(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleVoiceChannelSelected()V
|
|
|
|
.locals 0
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->autoSelectAudioOutput()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.method public final handleVoiceStatesUpdated()V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->getSelectedVoiceChannelId$app_productionDiscordExternalRelease()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreAudioDevices;->videoUseDetector:Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0, v1}, Lcom/discord/stores/StoreAudioDevices$VideoUseDetector;->isMeUsingVideoInChannel(J)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget-boolean v1, p0, Lcom/discord/stores/StoreAudioDevices;->wasMeUsingVideoInChannel:Z
|
|
|
|
|
|
|
|
if-eq v1, v0, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->refreshAudioOutputState()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-boolean v1, p0, Lcom/discord/stores/StoreAudioDevices;->wasMeUsingVideoInChannel:Z
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreAudioDevices;->autoSelectAudioOutput()V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreAudioDevices;->wasMeUsingVideoInChannel:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public final init()V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioOutputMonitor:Lcom/discord/utilities/media/AudioOutputMonitor;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/media/AudioOutputMonitor;->getOutputState()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-class v2, Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/stores/StoreAudioDevices$init$1;
|
|
|
|
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/stores/StoreAudioDevices$init$1;-><init>(Lcom/discord/stores/StoreAudioDevices;)V
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreAudioDevices;->isDirty:Z
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesStateSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Lk0/n/c;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v1}, Lk0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreAudioDevices;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final selectAudioOutput(Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
.locals 2
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "outputDevice"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreAudioDevices$selectAudioOutput$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreAudioDevices$selectAudioOutput$1;-><init>(Lcom/discord/stores/StoreAudioDevices;Lcom/discord/stores/StoreAudioDevices$OutputDevice;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setAudioDevicesState$app_productionDiscordExternalRelease(Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;)V
|
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, "<set-?>"
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreAudioDevices;->audioDevicesState:Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final toggleSpeakerOutput()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreAudioDevices;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreAudioDevices$toggleSpeakerOutput$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreAudioDevices$toggleSpeakerOutput$1;-><init>(Lcom/discord/stores/StoreAudioDevices;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|