291 lines
9.7 KiB
Smali
291 lines
9.7 KiB
Smali
.class public final Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetPrivateCallViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Factory"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelId:J
|
|
|
|
.field public final storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
.field public final storeExperiments:Lcom/discord/stores/StoreExperiments;
|
|
|
|
.field public final storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.field public final storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JLcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/stores/StoreExperiments;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->channelId:J
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
iput-object p6, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeExperiments:Lcom/discord/stores/StoreExperiments;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "storeExperiments"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "storeAudioDevices"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "storeMediaEngine"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "storeVoiceParticipants"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(JLcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/stores/StoreExperiments;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 7
|
|
|
|
and-int/lit8 p8, p7, 0x2
|
|
|
|
if-eqz p8, :cond_0
|
|
|
|
sget-object p3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreStream$Companion;->getVoiceParticipants()Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
move-result-object p3
|
|
|
|
:cond_0
|
|
move-object v3, p3
|
|
|
|
and-int/lit8 p3, p7, 0x4
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
sget-object p3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object p4
|
|
|
|
:cond_1
|
|
move-object v4, p4
|
|
|
|
and-int/lit8 p3, p7, 0x8
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
sget-object p3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreStream$Companion;->getAudioDevices()Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
move-result-object p5
|
|
|
|
:cond_2
|
|
move-object v5, p5
|
|
|
|
and-int/lit8 p3, p7, 0x10
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
sget-object p3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object p6
|
|
|
|
:cond_3
|
|
move-object v6, p6
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v1, p1
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;-><init>(JLcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/stores/StoreExperiments;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final observeStoreState()Lrx/Observable;
|
|
.locals 14
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$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/call/WidgetPrivateCallViewModel$Factory;->channelId:J
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/widgets/voice/model/CallModel$Companion;->get$default(Lcom/discord/widgets/voice/model/CallModel$Companion;JLcom/discord/widgets/voice/model/CallModel$ParticipantsType;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceParticipants;->getSelectedParticipantId()Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaEngine;->getSelectedVideoInputDevice()Lrx/Observable;
|
|
|
|
move-result-object v8
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeExperiments:Lcom/discord/stores/StoreExperiments;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const-string v2, "2020-02_android_audio_output_selector"
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {v0, v2, v1, v3, v1}, 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 v0
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$1;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lb0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$2;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$2;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lb0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v9
|
|
|
|
sget-object v10, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$3;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory$observeStoreState$3;
|
|
|
|
sget-object v13, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v11, 0x96
|
|
|
|
invoke-static/range {v6 .. v13}, Lcom/discord/utilities/rx/ObservableWithLeadingEdgeThrottle;->combineLatest(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func4;JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "ObservableWithLeadingEdg\u2026Unit.MILLISECONDS\n )"
|
|
|
|
invoke-static {v0, v1}, Lt/u/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 9
|
|
.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/call/WidgetPrivateCallViewModel;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->observeStoreState()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
invoke-static {}, Lcom/discord/utilities/time/ClockFactory;->get()Lcom/discord/utilities/time/Clock;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x20
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-direct/range {v0 .. v8}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;-><init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "modelClass"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final getChannelId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;->channelId:J
|
|
|
|
return-wide v0
|
|
.end method
|