253 lines
8.9 KiB
Smali
253 lines
8.9 KiB
Smali
.class public final Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetGuildCallViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Factory"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelId:J
|
|
|
|
.field public final experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
.field public final mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
.field public final streamKey:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JLjava/lang/String;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreMediaSettings;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->channelId:J
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->streamKey:Ljava/lang/String;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "mediaSettingsStore"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "experimentStore"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(JLjava/lang/String;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreMediaSettings;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 6
|
|
|
|
and-int/lit8 p7, p6, 0x4
|
|
|
|
if-eqz p7, :cond_0
|
|
|
|
sget-object p4, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object p4
|
|
|
|
:cond_0
|
|
move-object v4, p4
|
|
|
|
and-int/lit8 p4, p6, 0x8
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
sget-object p4, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/stores/StoreStream$Companion;->getMediaSettings()Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
move-result-object p5
|
|
|
|
:cond_1
|
|
move-object v5, p5
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v1, p1
|
|
|
|
move-object v3, p3
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;-><init>(JLjava/lang/String;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreMediaSettings;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final observeStoreState()Lrx/Observable;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/model/CallModel;->Companion:Lcom/discord/widgets/voice/model/CallModel$Companion;
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->channelId:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/voice/model/CallModel$Companion;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/voice/fullscreen/GuildVideoFeatureFlagKt;->observeGuildVideoEligibility(Lcom/discord/stores/StoreExperiments;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-string v4, "2020-04_noise_cancellation_android"
|
|
|
|
const/4 v5, 0x2
|
|
|
|
invoke-static {v2, v4, v3, v5, v3}, Lcom/discord/stores/StoreExperiments;->getExperiment$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory$observeStoreState$1;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory$observeStoreState$1;
|
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings;->getNoiseCancellation()Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory$observeStoreState$2;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory$observeStoreState$2;
|
|
|
|
invoke-static {v0, v1, v2, v3, v4}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func4;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.combineLatest\u2026Invalid\n }\n }"
|
|
|
|
invoke-static {v0, v1}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
.locals 13
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Landroidx/lifecycle/ViewModel;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"TT;>;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance p1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->observeStoreState()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVoiceChannelSelected()Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getApplicationStreaming()Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaSettings()Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {}, Lcom/discord/utilities/time/ClockFactory;->get()Lcom/discord/utilities/time/Clock;
|
|
|
|
move-result-object v8
|
|
|
|
const/4 v9, 0x0
|
|
|
|
iget-object v10, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;->streamKey:Ljava/lang/String;
|
|
|
|
const/16 v11, 0x100
|
|
|
|
const/4 v12, 0x0
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-direct/range {v0 .. v12}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;-><init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "modelClass"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|