2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/VoiceConfigurationCache;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "VoiceConfigurationCache.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/VoiceConfigurationCache$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/stores/VoiceConfigurationCache$Companion;
|
|
|
|
|
|
|
|
.field public static final DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final inputModeCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
.field public final voiceConfigSubject:Lrx/subjects/PublishSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/PublishSubject<",
|
|
|
|
"Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 12
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/VoiceConfigurationCache$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/VoiceConfigurationCache$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/VoiceConfigurationCache;->Companion:Lcom/discord/stores/VoiceConfigurationCache$Companion;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v10, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;->VOICE_ACTIVITY:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
|
|
|
|
sget-object v8, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->Suppression:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v7, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/high16 v9, -0x3db80000 # -50.0f
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/high16 v11, 0x42c80000 # 100.0f
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v2, v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;-><init>(ZZZZZLcom/discord/stores/StoreMediaSettings$NoiseProcessing;FLcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;F)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Landroid/content/SharedPreferences;)V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "PublishSubject.create()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v0}, Lj0/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/VoiceConfigurationCache;->voiceConfigSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x12c
|
|
|
|
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, v0, v1, v2}, Lrx/Observable;->o(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo v0, "voiceConfigSubject\n \u2026L, TimeUnit.MILLISECONDS)"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-class v2, Lcom/discord/stores/VoiceConfigurationCache;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/stores/VoiceConfigurationCache$1;
|
|
|
|
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/stores/VoiceConfigurationCache$1;-><init>(Lcom/discord/stores/VoiceConfigurationCache;)V
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;->VOICE_ACTIVITY:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
|
|
|
|
const-string v1, "CACHE_KEY_VOICE_SETTINGS_INPUT_MODE"
|
|
|
|
|
|
|
|
invoke-direct {p1, v1, v0}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/VoiceConfigurationCache;->inputModeCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "sharedPreferences"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDEFAULT_VOICE_CONFIG$cp()Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getInputModeCache$p(Lcom/discord/stores/VoiceConfigurationCache;)Lcom/discord/utilities/persister/Persister;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/VoiceConfigurationCache;->inputModeCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$writeToSharedPreferences(Lcom/discord/stores/VoiceConfigurationCache;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/VoiceConfigurationCache;->writeToSharedPreferences(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final sanitizeInputMode(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;)Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
2020-07-31 02:11:25 +00:00
|
|
|
sget-object v0, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x6
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const-string v1, "inputMode was null"
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getInputMode()Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final writeToSharedPreferences(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/VoiceConfigurationCache$writeToSharedPreferences$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/VoiceConfigurationCache$writeToSharedPreferences$1;-><init>(Lcom/discord/stores/VoiceConfigurationCache;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/cache/SharedPreferenceExtensionsKt;->edit(Landroid/content/SharedPreferences;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final read()Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 12
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/VoiceConfigurationCache;->inputModeCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getNoiseProcessing()Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->Suppression:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const-string v3, "CACHE_KEY_VOICE_SETTINGS_NOISE_SUPPRESSION"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v1, v3, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result v1
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getNoiseProcessing()Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
sget-object v6, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->Cancellation:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
if-ne v3, v6, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
const-string v3, "CACHE_KEY_VOICE_SETTINGS_NOISE_CANCELLATION"
|
|
|
|
|
|
|
|
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
move-result v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->Cancellation:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
move-object v8, v1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->Suppression:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;->None:Lcom/discord/stores/StoreMediaSettings$NoiseProcessing;
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->isMuted()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v4, "CACHE_KEY_VOICE_SETTINGS_IS_MUTED"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v4, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v4, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->isDeafened()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v5, "CACHE_KEY_VOICE_SETTINGS_IS_DEAFENED"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v5, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v5, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getAutomaticVad()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v6, "CACHE_KEY_VOICE_SETTINGS_AUTOMATIC_VAD"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v6, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v6, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getAutomaticGainControl()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v6
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v7, "CACHE_KEY_VOICE_SETTINGS_AUTOMATIC_GAIN_CONTROL"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v7, v6}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v6
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v7, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
invoke-virtual {v7}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getEchoCancellation()Z
|
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v9, "CACHE_KEY_VOICE_SETTINGS_ECHO_CANCELLATION"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v9, v7}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v9, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
|
|
|
|
invoke-virtual {v9}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getSensitivity()F
|
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
const-string v10, "CACHE_KEY_VOICE_SETTINGS_SENSITIVITY"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v2, v10, v9}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/VoiceConfigurationCache;->sanitizeInputMode(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;)Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
|
|
|
|
move-result-object v10
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/VoiceConfigurationCache;->sharedPreferences:Landroid/content/SharedPreferences;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v2, Lcom/discord/stores/VoiceConfigurationCache;->DEFAULT_VOICE_CONFIG:Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;->getOutputVolume()F
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v11, "CACHE_KEY_VOICE_SETTINGS_OUTPUT_VOLUME"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v0, v11, v2}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v11
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v2, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;-><init>(ZZZZZLcom/discord/stores/StoreMediaSettings$NoiseProcessing;FLcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;F)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
return-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final write(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/VoiceConfigurationCache;->voiceConfigSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo p1, "voiceConfiguration"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|