2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
.source "StoreMediaEngine.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreMediaEngine$ExperimentConfig;,
|
|
|
|
Lcom/discord/stores/StoreMediaEngine$EngineListener;,
|
|
|
|
Lcom/discord/stores/StoreMediaEngine$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/stores/StoreMediaEngine$Companion;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_VIDEO_DEVICE_GUID:Ljava/lang/String; = ""
|
|
|
|
|
|
|
|
.field public static final LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.field public hasNativeEngineEverInitialized:Z
|
|
|
|
|
|
|
|
.field public hasNativeEngineEverInitializedCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final localVoiceStatus:Lrx/Observable;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final localVoiceStatusSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public mediaEngineSettingsSubscription:Lrx/Subscription;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
|
|
|
|
.field public final openSLESConfigSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
.field public previousVoiceChannelId:Ljava/lang/Long;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final pttActiveSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
.field public final selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public userId:J
|
|
|
|
|
|
|
|
.field public videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
.field public final videoInputDevicesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreMediaEngine$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreMediaEngine;->Companion:Lcom/discord/stores/StoreMediaEngine$Companion;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;
|
|
|
|
|
|
|
|
const/high16 v1, -0x3d380000 # -100.0f
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v2}, Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;-><init>(FZ)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreMediaEngine;->LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
sget-object v0, Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;->DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/Dispatcher;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p1, :cond_1
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreMediaEngine;->LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(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 p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->pttActiveSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
const-string p1, ""
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "PREFERRED_VIDEO_INPUT_DEVICE_GUID"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, v0, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
new-array p1, p1, [Lco/discord/media_engine/VideoInputDeviceDescription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {p1}, Lf/n/a/k/a;->asList([Ljava/lang/Object;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->g0()Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
const-wide/16 p1, -0x1
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/stores/StoreMediaEngine;->userId:J
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
iget-boolean p2, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitialized:Z
|
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v0, "CACHE_KEY_NATIVE_ENGINE_EVER_INITIALIZED"
|
|
|
|
|
|
|
|
invoke-direct {p1, v0, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitializedCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$1;
|
|
|
|
|
|
|
|
invoke-direct {p2, p0}, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$1;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;
|
|
|
|
|
|
|
|
invoke-direct {v0, p2}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance p2, Ls0/l/a/y0;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {p2, v0}, Ls0/l/a/y0;-><init>(Lrx/functions/Action0;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance v0, Ls0/l/a/u;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object p1, p1, Lrx/Observable;->d:Lrx/Observable$a;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {v0, p1, p2}, Ls0/l/a/u;-><init>(Lrx/Observable$a;Lrx/Observable$b;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {v0}, Lrx/Observable;->d0(Lrx/Observable$a;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$2;
|
|
|
|
|
|
|
|
invoke-direct {p2, p0}, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$2;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;
|
|
|
|
|
|
|
|
invoke-direct {v0, p2}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->u(Lrx/functions/Action0;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->N()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "localVoiceStatusSubject\n\u2026ening)\n .share()"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1, p2}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatus:Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
2020-09-08 08:16:32 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "dispatcher"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "mediaSettingsStore"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$disableLocalVoiceStatusListening(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->disableLocalVoiceStatusListening()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$enableLocalVoiceStatusListening(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->enableLocalVoiceStatusListening()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreMediaEngine;)Lcom/discord/stores/Dispatcher;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMediaEngine;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;)Ljava/lang/String;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getSelectedVideoInputDevice$p(Lcom/discord/stores/StoreMediaEngine;)Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleNativeEngineInitialized(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->handleNativeEngineInitialized()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleNewConnection(Lcom/discord/stores/StoreMediaEngine;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->handleNewConnection(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleVideoInputDevices(Lcom/discord/stores/StoreMediaEngine;[Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMediaEngine;->handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;Lcom/discord/stores/StoreMediaEngine$ExperimentConfig;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreMediaEngine;->handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;Lcom/discord/stores/StoreMediaEngine$ExperimentConfig;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setSelectedVideoInputDevice$p(Lcom/discord/stores/StoreMediaEngine;Lco/discord/media_engine/VideoInputDeviceDescription;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized disableLocalVoiceStatusListening()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->n(Lkotlin/jvm/functions/Function1;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
const-string v0, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized enableLocalVoiceStatusListening()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMediaEngine$enableLocalVoiceStatusListening$1;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/stores/StoreMediaEngine$enableLocalVoiceStatusListening$1;-><init>(Lrx/subjects/SerializedSubject;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->n(Lkotlin/jvm/functions/Function1;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
const-string v0, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-[",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMediaEngine$getVideoInputDevicesNative$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/stores/StoreMediaEngine$getVideoInputDevicesNative$1;-><init>(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->k(Lkotlin/jvm/functions/Function1;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized handleNativeEngineInitialized()V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v0, 0x1
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_start_0
|
2020-09-02 04:07:20 +00:00
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitialized:Z
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitializedCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
sget-object v2, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2, v0}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;Z)Ljava/lang/Object;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Ls0/n/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, v1}, Ls0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized handleNewConnection(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->setupMediaEngineSettingsSubscription()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-10 21:02:22 +00:00
|
|
|
invoke-direct {v0}, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$1;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {p1, v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->f(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$2;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$2;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 6
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"([",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
array-length v0, p1
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 v3, -0x1
|
|
|
|
|
|
|
|
if-ge v2, v0, :cond_1
|
|
|
|
|
|
|
|
aget-object v4, p1, v2
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v4, p2}, Lk0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, -0x1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-ltz v2, :cond_2
|
|
|
|
|
|
|
|
const/4 p2, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v0, :cond_b
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, v3}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->f(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v0, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, v2}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->f(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v0, :cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v3, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v3}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->getType()Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v3, p2}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->c(Z)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
if-eqz p3, :cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p3}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
check-cast p3, Lkotlin/Unit;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_5
|
|
|
|
if-eqz p2, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
aget-object p2, p1, v2
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
move-object p2, v4
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p3, p2}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {p1}, Lf/n/a/k/a;->asList([Ljava/lang/Object;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz p1, :cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz p1, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz p1, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
const-string p1, ""
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p3, 0x2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {p2, p1, v1, p3, v4}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_start_1
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
throw v4
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_start_2
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_2
|
|
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
|
|
|
|
throw v4
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:cond_b
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_start_3
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_3
|
|
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
|
|
|
|
throw v4
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic handleVideoInputDevices$default(Lcom/discord/stores/StoreMediaEngine;[Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMediaEngine;->handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final declared-synchronized handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;Lcom/discord/stores/StoreMediaEngine$ExperimentConfig;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreMediaEngine;->Companion:Lcom/discord/stores/StoreMediaEngine$Companion;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-static {v0, v1, p1, p2}, Lcom/discord/stores/StoreMediaEngine$Companion;->access$setVoiceConfig(Lcom/discord/stores/StoreMediaEngine$Companion;Lcom/discord/rtcconnection/mediaengine/MediaEngine;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;Lcom/discord/stores/StoreMediaEngine$ExperimentConfig;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method private final declared-synchronized setupMediaEngineSettingsSubscription()V
|
|
|
|
.locals 3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngineSettingsSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaSettings;->getVoiceConfig()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/StoreMediaEngine$setupMediaEngineSettingsSubscription$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreMediaEngine$setupMediaEngineSettingsSubscription$1;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v2, Lcom/discord/stores/StoreMediaEngine$setupMediaEngineSettingsSubscription$2;->INSTANCE:Lcom/discord/stores/StoreMediaEngine$setupMediaEngineSettingsSubscription$2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1, v2}, Lrx/Observable;->S(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngineSettingsSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final declared-synchronized cycleVideoInputDevice()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {v0, v1}, Lf/n/a/k/a;->indexOf([Ljava/lang/Object;Ljava/lang/Object;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
if-gez v0, :cond_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {v1}, Lf/n/a/k/a;->getLastIndex([Ljava/lang/Object;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
aget-object v0, v1, v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->selectVideoInputDevice(Ljava/lang/String;)V
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getIsNativeEngineInitialized()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getLocalVoiceStatus()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatus:Lrx/Observable;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getMediaEngine()Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v0, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getOpenSLESConfig()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.method public final declared-synchronized getRankedRtcRegions(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelRtcLatencyRegion;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v0, "regionsWithIps"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
const-string v0, "callback"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p2, :cond_4
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const/16 v2, 0xa
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1, v2}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
move-result v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
move-result v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const/4 v3, 0x0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz v2, :cond_1
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
move-result-object v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelRtcLatencyRegion;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelRtcLatencyRegion;->getRegion()Ljava/lang/String;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelRtcLatencyRegion;->getIps()Ljava/util/List;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
move-result-object v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
new-array v3, v3, [Ljava/lang/String;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-interface {v2, v3}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
move-result-object v2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz v2, :cond_0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
check-cast v2, [Ljava/lang/String;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
new-instance v3, Lco/discord/media_engine/RtcRegion;
|
|
|
|
|
|
|
|
invoke-direct {v3, v4, v2}, Lco/discord/media_engine/RtcRegion;-><init>(Ljava/lang/String;[Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-08 08:16:32 +00:00
|
|
|
new-instance p1, Lkotlin/TypeCastException;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
const-string p2, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-08 08:16:32 +00:00
|
|
|
new-array p1, v3, [Lco/discord/media_engine/RtcRegion;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
check-cast p1, [Lco/discord/media_engine/RtcRegion;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMediaEngine$getRankedRtcRegions$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p2}, Lcom/discord/stores/StoreMediaEngine$getRankedRtcRegions$1;-><init>(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
invoke-interface {v0, p1, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->b([Lco/discord/media_engine/RtcRegion;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:try_start_1
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
throw v1
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:try_start_2
|
2020-09-08 08:16:32 +00:00
|
|
|
new-instance p1, Lkotlin/TypeCastException;
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
const-string p2, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
|
|
|
throw p1
|
2020-09-08 08:16:32 +00:00
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-static {v0}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
:try_end_2
|
|
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:try_start_3
|
|
|
|
invoke-static {v0}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
:try_end_3
|
|
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public final getSelectedVideoInputDevice()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
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, "selectedVideoInputDevice\u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getSelectedVideoInputDeviceBlocking()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getVideoInputDevices()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
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
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const-string v1, "videoInputDevicesSubject\u2026 .distinctUntilChanged()"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final declared-synchronized getVoiceEngineNative()Lcom/hammerandchisel/libdiscord/Discord;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->j()Lcom/hammerandchisel/libdiscord/Discord;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
const-string v0, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final declared-synchronized handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v0, "payload"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "payload.me"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lcom/discord/stores/StoreMediaEngine;->userId:J
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
invoke-static {v0}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-10 21:02:22 +00:00
|
|
|
.method public final declared-synchronized handleVoiceChannelSelected(J)V
|
2020-08-20 22:29:33 +00:00
|
|
|
.locals 5
|
2020-08-10 21:02:22 +00:00
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->previousVoiceChannelId:Ljava/lang/Long;
|
2020-08-13 01:07:25 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eqz v0, :cond_1
|
2020-08-13 01:07:25 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->previousVoiceChannelId:Ljava/lang/Long;
|
2020-08-13 01:07:25 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
const-wide/16 v1, 0x0
|
2020-08-13 01:07:25 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-nez v0, :cond_0
|
2020-08-13 01:07:25 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
cmp-long v0, v3, v1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
cmp-long v0, p1, v1
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$handleVoiceChannelSelected$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/stores/StoreMediaEngine$handleVoiceChannelSelected$1;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->previousVoiceChannelId:Ljava/lang/Long;
|
2020-08-10 21:02:22 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
2020-08-10 21:02:22 +00:00
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
.method public final declared-synchronized hasNativeEngineEverInitialized()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitialized:Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public init(Landroid/content/Context;)V
|
2020-08-04 06:02:43 +00:00
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p1, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitializedCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
iput-boolean v1, p0, Lcom/discord/stores/StoreMediaEngine;->hasNativeEngineEverInitialized:Z
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Enum;->name()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "OPEN_SLES"
|
|
|
|
|
|
|
|
invoke-interface {v1, v3, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Enum;->name()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const-string v2, "prefsSessionDurable\n \u2026AULT_OPENSLES_CONFIG.name"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v1, v2}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;->valueOf(Ljava/lang/String;)Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
move-result-object v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v1, v1, Lrx/subjects/SerializedSubject;->e:Ls0/n/c;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v1, v6}, Ls0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
const-string v1, "Executors.newSingleThreadExecutor()"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v5, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
sget-object v7, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz v6, :cond_2
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz v7, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
new-instance v0, Ln;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/16 v9, 0x10
|
|
|
|
|
|
|
|
move-object v3, v0
|
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-direct/range {v3 .. v9}, Ln;-><init>(Landroid/content/Context;Ljava/util/concurrent/ExecutorService;Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;Lcom/discord/utilities/logging/Logger;Ljava/util/HashSet;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreMediaEngine$EngineListener;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/stores/StoreMediaEngine$EngineListener;-><init>(Lcom/discord/stores/StoreMediaEngine;)V
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v1, v0, Ln;->c:Ljava/util/ArrayList;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
return-void
|
2020-09-08 08:16:32 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "logger"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "openSLESConfig"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "context"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final selectDefaultVideoDevice(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;-><init>(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final selectVideoInputDevice(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaEngine$selectVideoInputDevice$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/discord/stores/StoreMediaEngine$selectVideoInputDevice$1;-><init>(Lcom/discord/stores/StoreMediaEngine;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final declared-synchronized setOpenSLESConfig(Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
|
|
value = {
|
|
|
|
"ApplySharedPref"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v0, "openSLESConfig"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
if-eqz p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Ls0/n/c;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, p1}, Ls0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "OPEN_SLES"
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
invoke-static {v0}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final declared-synchronized setPttActive(Z)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v1, p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->j(Z)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->pttActiveSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Ls0/n/c;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, p1}, Ls0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:try_start_1
|
|
|
|
const-string p1, "mediaEngine"
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p1}, Lk0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|