3912 lines
126 KiB
Smali
3912 lines
126 KiB
Smali
.class public final Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;
|
|
.super Lf/a/b/q0;
|
|
.source "WidgetCallFullscreenViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$MenuItem;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;,
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Factory;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lf/a/b/q0<",
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public allVideoParticipants:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
.field public autotargetStreamKey:Ljava/lang/String;
|
|
|
|
.field public final backgroundThreadScheduler:Lrx/Scheduler;
|
|
|
|
.field public channelId:J
|
|
|
|
.field public final clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
.field public focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
.field public forwardVideoGridInteractionSubscription:Lrx/Subscription;
|
|
|
|
.field public lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;
|
|
|
|
.field public final mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.field public final mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
.field public mostRecentStoreState:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;
|
|
|
|
.field public final permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
.field public final selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
.field public storeObservableSubscription:Lrx/Subscription;
|
|
|
|
.field public final userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
.field public final videoPermissionsManager:Lcom/discord/utilities/permissions/VideoPermissionsManager;
|
|
|
|
.field public final videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
.field public final voiceEngineServiceController:Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JLcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StorePermissions;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;Lcom/discord/utilities/permissions/VideoPermissionsManager;Lcom/discord/utilities/voice/VoiceEngineServiceController;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
const-string v0, "selectedVoiceChannelStore"
|
|
|
|
invoke-static {p3, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "userSettingsStore"
|
|
|
|
invoke-static {p4, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "applicationStreamingStore"
|
|
|
|
invoke-static {p5, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "mediaEngineStore"
|
|
|
|
invoke-static {p6, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "mediaSettingsStore"
|
|
|
|
invoke-static {p7, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "experimentStore"
|
|
|
|
invoke-static {p8, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "permissionsStore"
|
|
|
|
invoke-static {p9, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "clock"
|
|
|
|
invoke-static {p10, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "backgroundThreadScheduler"
|
|
|
|
invoke-static {p11, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "videoPermissionsManager"
|
|
|
|
invoke-static {p12, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "voiceEngineServiceController"
|
|
|
|
invoke-static {p13, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Uninitialized;
|
|
|
|
invoke-direct {p0, v0}, Lf/a/b/q0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->channelId:J
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
iput-object p6, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object p7, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
iput-object p8, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
iput-object p9, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
iput-object p10, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
iput-object p11, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->backgroundThreadScheduler:Lrx/Scheduler;
|
|
|
|
iput-object p12, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPermissionsManager:Lcom/discord/utilities/permissions/VideoPermissionsManager;
|
|
|
|
iput-object p13, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->voiceEngineServiceController:Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance p1, Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
new-instance p7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$videoPlayerIdleDetector$1;
|
|
|
|
invoke-direct {p7, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$videoPlayerIdleDetector$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;)V
|
|
|
|
const-wide/16 p3, 0x0
|
|
|
|
const/4 p5, 0x0
|
|
|
|
const/4 p6, 0x0
|
|
|
|
const/4 p8, 0x7
|
|
|
|
const/4 p9, 0x0
|
|
|
|
move-object p2, p1
|
|
|
|
invoke-direct/range {p2 .. p9}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;-><init>(JLrx/Scheduler;Lrx/Scheduler;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
sget-object p1, Lk0/i/l;->d:Lk0/i/l;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
if-eqz p14, :cond_0
|
|
|
|
iput-object p14, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->autotargetStreamKey:Ljava/lang/String;
|
|
|
|
sget-object p1, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
invoke-virtual {p1, p14}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
move-result-wide p1
|
|
|
|
iget-object p3, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
invoke-virtual {p3, p1, p2}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(JLcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StorePermissions;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;Lcom/discord/utilities/permissions/VideoPermissionsManager;Lcom/discord/utilities/voice/VoiceEngineServiceController;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 17
|
|
|
|
move/from16 v0, p15
|
|
|
|
and-int/lit8 v1, v0, 0x40
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v10, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object/from16 v10, p8
|
|
|
|
:goto_0
|
|
and-int/lit16 v1, v0, 0x80
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v11, v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object/from16 v11, p9
|
|
|
|
:goto_1
|
|
and-int/lit16 v1, v0, 0x200
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-static {}, Ls0/p/a;->a()Lrx/Scheduler;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Schedulers.computation()"
|
|
|
|
invoke-static {v1, v2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object v13, v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move-object/from16 v13, p11
|
|
|
|
:goto_2
|
|
and-int/lit16 v1, v0, 0x400
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
new-instance v1, Lcom/discord/utilities/permissions/VideoPermissionsManager;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v1, v3, v2, v3}, Lcom/discord/utilities/permissions/VideoPermissionsManager;-><init>(Lcom/discord/utilities/permissions/PermissionsManager;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
move-object v14, v1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
move-object/from16 v14, p12
|
|
|
|
:goto_3
|
|
and-int/lit16 v0, v0, 0x800
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineServiceController;->Companion:Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;->getINSTANCE()Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v15, v0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
move-object/from16 v15, p13
|
|
|
|
:goto_4
|
|
move-object/from16 v2, p0
|
|
|
|
move-wide/from16 v3, p1
|
|
|
|
move-object/from16 v5, p3
|
|
|
|
move-object/from16 v6, p4
|
|
|
|
move-object/from16 v7, p5
|
|
|
|
move-object/from16 v8, p6
|
|
|
|
move-object/from16 v9, p7
|
|
|
|
move-object/from16 v12, p10
|
|
|
|
move-object/from16 v16, p14
|
|
|
|
invoke-direct/range {v2 .. v16}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;-><init>(JLcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StorePermissions;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;Lcom/discord/utilities/permissions/VideoPermissionsManager;Lcom/discord/utilities/voice/VoiceEngineServiceController;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getVideoPlayerIdleDetector$p(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;)Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$onIdleStateChanged(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;Z)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->onIdleStateChanged(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final cancelTapForwardingJob()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final clearFocusedVideoParticipant()V
|
|
.locals 23
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
move-object v1, v3
|
|
|
|
:cond_0
|
|
move-object v4, v1
|
|
|
|
check-cast v4, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
iput-object v3, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getMyId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v0, v1, v2, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computePipParticipant(JLco/discord/media_engine/VideoInputDeviceDescription;)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v16
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
iget-object v14, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
const/16 v20, 0x0
|
|
|
|
const v21, 0xf5fb
|
|
|
|
const/16 v22, 0x0
|
|
|
|
invoke-static/range {v4 .. v22}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final computePipParticipant(JLco/discord/media_engine/VideoInputDeviceDescription;)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
.locals 17
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
iget-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v3}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
return-object v2
|
|
|
|
:cond_1
|
|
iget-object v3, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_2
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v7, v4
|
|
|
|
check-cast v7, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
iget-object v8, v7, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object v8
|
|
|
|
if-eqz v8, :cond_3
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelVoice$State;->isSelfVideo()Z
|
|
|
|
move-result v8
|
|
|
|
if-ne v8, v6, :cond_3
|
|
|
|
iget-object v7, v7, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v7}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v7, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v7, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move-object v4, v2
|
|
|
|
:goto_1
|
|
move-object v7, v4
|
|
|
|
check-cast v7, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
iget-object v3, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-direct {v0, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->isOneOnOneMeCall(Ljava/util/List;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_6
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
:goto_2
|
|
const/4 v1, 0x1
|
|
|
|
:goto_3
|
|
if-eqz v7, :cond_9
|
|
|
|
if-eqz v1, :cond_9
|
|
|
|
if-eqz p3, :cond_7
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lco/discord/media_engine/VideoInputDeviceDescription;->getFacing()Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_7
|
|
sget-object v1, Lco/discord/media_engine/VideoInputDeviceFacing;->Front:Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
if-ne v2, v1, :cond_8
|
|
|
|
const/4 v9, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
const/4 v9, 0x0
|
|
|
|
:goto_4
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0xbd
|
|
|
|
invoke-static/range {v7 .. v16}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->a(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;ZZI)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v1
|
|
|
|
return-object v1
|
|
|
|
:cond_9
|
|
return-object v2
|
|
.end method
|
|
|
|
.method private final computeVisibleVideoParticipants()Ljava/util/List;
|
|
.locals 13
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
invoke-direct {p0, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->getParticipantFocusKey(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-static {v3, v4}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v2, v1
|
|
|
|
:goto_0
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
iget-object v0, v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->d:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
iget-object v1, v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->e:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
sget-object v2, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
if-ne v0, v2, :cond_3
|
|
|
|
if-eq v1, v2, :cond_4
|
|
|
|
:cond_3
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
sget-object v7, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/16 v12, 0xf3
|
|
|
|
move-object v6, v7
|
|
|
|
invoke-static/range {v3 .. v12}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->a(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;ZZI)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_4
|
|
invoke-static {v3}, Lf/h/a/f/e/n/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_5
|
|
:goto_1
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->isOneOnOneMeCall(Ljava/util/List;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_6
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
iget-object v3, v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v3
|
|
|
|
xor-int/lit8 v3, v3, 0x1
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
move-object v1, v2
|
|
|
|
:cond_7
|
|
check-cast v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
invoke-static {v1}, Lf/h/a/f/e/n/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_8
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final createPrivateCallParticipantListItems(Lcom/discord/widgets/voice/model/CallModel;)Ljava/util/List;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/voice/model/CallModel;",
|
|
")",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/voice/fullscreen/PrivateCallUsersAdapter$CallUserItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-direct {p0, p1, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->shouldIncludePrivateCallParticipant(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
const/16 v0, 0xa
|
|
|
|
invoke-static {v1, v0}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/fullscreen/PrivateCallUsersAdapter$CallUserItem;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v2, v1, v3}, Lcom/discord/widgets/voice/fullscreen/PrivateCallUsersAdapter$CallUserItem;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;Z)V
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final createUserItemsComparator(ZLjava/lang/String;)Ljava/util/Comparator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(Z",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Ljava/util/Comparator<",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$createUserItemsComparator$1;
|
|
|
|
invoke-direct {v0, p2, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$createUserItemsComparator$1;-><init>(Ljava/lang/String;Z)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic createUserItemsComparator$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;ZLjava/lang/String;ILjava/lang/Object;)Ljava/util/Comparator;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->createUserItemsComparator(ZLjava/lang/String;)Ljava/util/Comparator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final createVideoGridEntriesForParticipant(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;JLcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lco/discord/media_engine/VideoInputDeviceDescription;Z)Ljava/util/List;
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
"J",
|
|
"Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;",
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
"Z)",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
sget-object v0, Lk0/i/l;->d:Lk0/i/l;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
invoke-virtual/range {p5 .. p5}, Lco/discord/media_engine/VideoInputDeviceDescription;->getFacing()Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v2, v1
|
|
|
|
:goto_0
|
|
sget-object v3, Lco/discord/media_engine/VideoInputDeviceFacing;->Front:Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-ne v2, v3, :cond_2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
new-instance v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
const/4 v8, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 v8, 0x0
|
|
|
|
:goto_2
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/16 v15, 0xbc
|
|
|
|
move-object v6, v3
|
|
|
|
move-object/from16 v7, p1
|
|
|
|
move/from16 v13, p6
|
|
|
|
invoke-direct/range {v6 .. v15}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;ZZI)V
|
|
|
|
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getApplicationStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_c
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_c
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelVoice$State;->isSelfStream()Z
|
|
|
|
move-result v2
|
|
|
|
if-ne v2, v5, :cond_c
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getApplicationStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v4, v2, p2
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
return-object v0
|
|
|
|
:cond_4
|
|
if-eqz p4, :cond_5
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_5
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getApplicationStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_b
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getState()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_a
|
|
|
|
if-eq v1, v5, :cond_9
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v1, v2, :cond_a
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-eq v1, v2, :cond_8
|
|
|
|
const/4 v2, 0x4
|
|
|
|
if-eq v1, v2, :cond_7
|
|
|
|
const/4 v2, 0x5
|
|
|
|
if-ne v1, v2, :cond_6
|
|
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;->INACTIVE:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;->PAUSED:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_8
|
|
return-object v0
|
|
|
|
:cond_9
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;->ACTIVE:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_a
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;->CONNECTING:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_b
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;->INACTIVE:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
:goto_3
|
|
move-object v7, v1
|
|
|
|
new-instance v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
sget-object v6, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
sget-object v8, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;->APPLICATION_STREAMING:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/16 v11, 0x80
|
|
|
|
move-object v2, v1
|
|
|
|
move-object/from16 v3, p1
|
|
|
|
move-object v5, v6
|
|
|
|
move/from16 v9, p6
|
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;ZZI)V
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_c
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final emitServerMutedDialogEvent()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowServerMutedDialog;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowServerMutedDialog;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final emitShowNoVideoPermissionDialogEvent()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowNoVideoPermissionDialog;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowNoVideoPermissionDialog;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final emitSuppressedDialogEvent()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowSuppressedDialog;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowSuppressedDialog;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getParticipantFocusKey(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
iget-object v0, p1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object p1, p1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->g:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ne p1, v2, :cond_0
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "--STREAM"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final hasVideoPermission()Z
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPermissionsManager:Lcom/discord/utilities/permissions/VideoPermissionsManager;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getMyPermissions()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v2, v0}, Lcom/discord/utilities/permissions/VideoPermissionsManager;->hasVideoPermission(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Long;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private final isOneOnOneMeCall(Ljava/util/List;)Z
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
if-ne v0, v3, :cond_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_2
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
iget-object v0, v0, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
:goto_0
|
|
if-eqz p1, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
return v1
|
|
.end method
|
|
|
|
.method private final observeStoreState()Lrx/Observable;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$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/WidgetCallFullscreenViewModel;->channelId:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/voice/model/CallModel$Companion;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
const-string v1, "2020-04_noise_cancellation_android"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
invoke-static {v0, v1, v2, v4, v2}, 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/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$1;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Ls0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->experimentStore:Lcom/discord/stores/StoreExperiments;
|
|
|
|
const-string v5, "2020-08_android_screenshare"
|
|
|
|
invoke-static {v1, v5, v2, v4, v2}, 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 v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$2;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$2;
|
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->E(Ls0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreMediaSettings;->getNoiseProcessing()Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
iget-wide v7, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->channelId:J
|
|
|
|
invoke-virtual {v1, v7, v8}, Lcom/discord/stores/StorePermissions;->getForChannel(J)Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
sget-object v8, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$3;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$observeStoreState$3;
|
|
|
|
move-object v4, v0
|
|
|
|
invoke-static/range {v3 .. v8}, Lrx/Observable;->g(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func5;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.combineLatest\u2026ate.Invalid\n }\n }"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final onIdleStateChanged(Z)V
|
|
.locals 20
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->isIdle()Z
|
|
|
|
move-result v0
|
|
|
|
move/from16 v5, p1
|
|
|
|
if-eq v5, v0, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const v18, 0xfff7
|
|
|
|
const/16 v19, 0x0
|
|
|
|
move/from16 v5, p1
|
|
|
|
invoke-static/range {v1 .. v19}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v0
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
invoke-virtual {v1, v0}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object/from16 v1, p0
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_2
|
|
move-object/from16 v1, p0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final shouldIncludePrivateCallParticipant(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)Z
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isMultiUserDM()Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isRinging()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private final shouldShowMoreAudioOutputs(Lcom/discord/widgets/voice/model/CallModel;)Z
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getAudioDevicesState()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAvailableOutputDevices()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of v0, p1, Ljava/util/Collection;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
instance-of v0, v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method private final startTapForwardingJob()V
|
|
.locals 4
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->cancelTapForwardingJob()V
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->backgroundThreadScheduler:Lrx/Scheduler;
|
|
|
|
const-wide/16 v2, 0xff
|
|
|
|
invoke-static {v2, v3, v0, v1}, Lrx/Observable;->a0(JLjava/util/concurrent/TimeUnit;Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .time\u2026ackgroundThreadScheduler)"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {v0, p0, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$startTapForwardingJob$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$startTapForwardingJob$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->R(Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final disableControlFading()V
|
|
.locals 20
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->isControlFadingDisabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const v18, 0xffef
|
|
|
|
const/16 v19, 0x0
|
|
|
|
invoke-static/range {v1 .. v19}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v0
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
invoke-virtual {v1, v0}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object/from16 v1, p0
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_2
|
|
move-object/from16 v1, p0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final disconnect()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final focusVideoParticipant(Ljava/lang/String;)V
|
|
.locals 22
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
const-string v2, "participantKey"
|
|
|
|
invoke-static {v1, v2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
instance-of v3, v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:cond_0
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
iget-object v2, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-direct {v0, v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->isOneOnOneMeCall(Ljava/util/List;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
:cond_1
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getMyId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v0, v1, v2, v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computePipParticipant(JLco/discord/media_engine/VideoInputDeviceDescription;)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v15
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
iget-object v13, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
const v20, 0xf5fb
|
|
|
|
const/16 v21, 0x0
|
|
|
|
invoke-static/range {v3 .. v21}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleStoreState(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;)V
|
|
.locals 26
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v7, p0
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
const-string v1, "storeState"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v0, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Invalid;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Invalid;
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Invalid;
|
|
|
|
invoke-virtual {v7, v0}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto/16 :goto_15
|
|
|
|
:cond_0
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
if-eqz v1, :cond_2a
|
|
|
|
move-object v8, v0
|
|
|
|
check-cast v8, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->isChannelSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Invalid;
|
|
|
|
invoke-virtual {v7, v0}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v0, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getMobileOverlay()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;->ENABLED:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
sget-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;->DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;
|
|
|
|
:goto_0
|
|
move-object v11, v0
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Ljava/util/Collection;
|
|
|
|
const/4 v10, 0x1
|
|
|
|
const/4 v12, 0x0
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
:cond_3
|
|
const/16 v20, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_5
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelVoice$State;->isSelfVideo()Z
|
|
|
|
move-result v2
|
|
|
|
if-eq v2, v10, :cond_7
|
|
|
|
:cond_6
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelVoice$State;->isSelfStream()Z
|
|
|
|
move-result v1
|
|
|
|
if-ne v1, v10, :cond_8
|
|
|
|
:cond_7
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_8
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v1, :cond_5
|
|
|
|
const/16 v20, 0x1
|
|
|
|
:goto_2
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
const/4 v13, 0x0
|
|
|
|
if-nez v1, :cond_9
|
|
|
|
move-object v0, v13
|
|
|
|
:cond_9
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->isIdle()Z
|
|
|
|
move-result v0
|
|
|
|
move v14, v0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_a
|
|
const/4 v14, 0x0
|
|
|
|
:goto_3
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v1, :cond_b
|
|
|
|
move-object v0, v13
|
|
|
|
:cond_b
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v0, :cond_c
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->isControlFadingDisabled()Z
|
|
|
|
move-result v0
|
|
|
|
move v15, v0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_c
|
|
const/4 v15, 0x0
|
|
|
|
:goto_4
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getActiveStream()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_d
|
|
move-object v0, v13
|
|
|
|
:goto_5
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_15
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v7, v12, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->createUserItemsComparator(ZLjava/lang/String;)Ljava/util/Comparator;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v1, v0}, Lk0/i/g;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v6, Ljava/util/ArrayList;
|
|
|
|
const/16 v1, 0xa
|
|
|
|
invoke-static {v0, v1}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v6, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v16
|
|
|
|
:goto_6
|
|
invoke-interface/range {v16 .. v16}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_e
|
|
|
|
invoke-interface/range {v16 .. v16}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getActiveStream()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v5
|
|
|
|
xor-int/lit8 v17, v14, 0x1
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object v12, v6
|
|
|
|
move/from16 v6, v17
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->createVideoGridEntriesForParticipant(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;JLcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lco/discord/media_engine/VideoInputDeviceDescription;Z)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v12, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
move-object v6, v12
|
|
|
|
const/4 v12, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_e
|
|
move-object v12, v6
|
|
|
|
invoke-static {v12}, Lf/h/a/f/e/n/f;->flatten(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_f
|
|
:goto_7
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_16
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/model/CallModel;->getVoiceParticipantsHidden()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_14
|
|
|
|
iget-object v4, v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_10
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelVoice$State;->isSelfVideo()Z
|
|
|
|
move-result v4
|
|
|
|
if-eq v4, v10, :cond_11
|
|
|
|
:cond_10
|
|
iget-object v3, v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->f:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;
|
|
|
|
if-eqz v3, :cond_12
|
|
|
|
:cond_11
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_12
|
|
const/4 v3, 0x0
|
|
|
|
:goto_8
|
|
if-eqz v3, :cond_13
|
|
|
|
goto :goto_9
|
|
|
|
:cond_13
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_a
|
|
|
|
:cond_14
|
|
:goto_9
|
|
const/4 v3, 0x1
|
|
|
|
:goto_a
|
|
if-eqz v3, :cond_f
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_7
|
|
|
|
:cond_15
|
|
sget-object v1, Lk0/i/l;->d:Lk0/i/l;
|
|
|
|
:cond_16
|
|
iput-object v1, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->allVideoParticipants:Ljava/util/List;
|
|
|
|
invoke-direct {v7, v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->isOneOnOneMeCall(Ljava/util/List;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_17
|
|
|
|
iput-object v13, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
:cond_17
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_18
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
goto :goto_b
|
|
|
|
:cond_18
|
|
if-eqz v9, :cond_19
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
goto :goto_b
|
|
|
|
:cond_19
|
|
sget-object v0, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_OFF:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
:goto_b
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getVideoDevices()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x2
|
|
|
|
if-lt v2, v3, :cond_1a
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_1a
|
|
const/4 v2, 0x0
|
|
|
|
:goto_c
|
|
if-eqz v2, :cond_1b
|
|
|
|
sget-object v2, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v0, v2, :cond_1b
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_d
|
|
|
|
:cond_1b
|
|
const/4 v2, 0x0
|
|
|
|
:goto_d
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1c
|
|
|
|
if-nez v20, :cond_1c
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;->PRIVATE_CALL_PARTICIPANTS:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;
|
|
|
|
goto :goto_e
|
|
|
|
:cond_1c
|
|
sget-object v3, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;->GRID:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;
|
|
|
|
:goto_e
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/model/CallModel;->getInputMode()Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v5, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;->PUSH_TO_TALK:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
if-ne v4, v5, :cond_1d
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_f
|
|
|
|
:cond_1d
|
|
const/4 v4, 0x0
|
|
|
|
:goto_f
|
|
if-nez v15, :cond_1e
|
|
|
|
if-nez v4, :cond_1e
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;->GRID:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;
|
|
|
|
if-ne v3, v4, :cond_1e
|
|
|
|
iget-object v4, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->beginIdleDetection()V
|
|
|
|
goto :goto_10
|
|
|
|
:cond_1e
|
|
iget-object v4, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->endIdleDetection()V
|
|
|
|
:goto_10
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/model/CallModel;->getAudioDevicesState()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v7, v5}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->shouldShowMoreAudioOutputs(Lcom/discord/widgets/voice/model/CallModel;)Z
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getSelectedOutputDevice()Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v5, :cond_21
|
|
|
|
instance-of v5, v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
|
|
|
if-eqz v5, :cond_1f
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;->BLUETOOTH_ON_AND_MORE:Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;
|
|
|
|
goto :goto_11
|
|
|
|
:cond_1f
|
|
instance-of v4, v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
if-eqz v4, :cond_20
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;->SPEAKER_ON_AND_MORE:Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;
|
|
|
|
goto :goto_11
|
|
|
|
:cond_20
|
|
sget-object v4, Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;->SPEAKER_OFF_AND_MORE:Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;
|
|
|
|
goto :goto_11
|
|
|
|
:cond_21
|
|
instance-of v4, v4, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
if-eqz v4, :cond_22
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;->SPEAKER_ON:Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;
|
|
|
|
goto :goto_11
|
|
|
|
:cond_22
|
|
sget-object v4, Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;->SPEAKER_OFF:Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;
|
|
|
|
:goto_11
|
|
move-object/from16 v18, v4
|
|
|
|
iget-object v4, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->autotargetStreamKey:Ljava/lang/String;
|
|
|
|
if-eqz v4, :cond_28
|
|
|
|
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v5
|
|
|
|
xor-int/2addr v5, v10
|
|
|
|
if-eqz v5, :cond_28
|
|
|
|
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_24
|
|
|
|
:cond_23
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_13
|
|
|
|
:cond_24
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_25
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_23
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
iget-object v5, v5, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getApplicationStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_26
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
goto :goto_12
|
|
|
|
:cond_26
|
|
move-object v5, v13
|
|
|
|
:goto_12
|
|
invoke-static {v5, v4}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_25
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:goto_13
|
|
if-eqz v1, :cond_27
|
|
|
|
invoke-virtual {v7, v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->targetAndFocusStream(Ljava/lang/String;)V
|
|
|
|
:cond_27
|
|
iput-object v13, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->autotargetStreamKey:Ljava/lang/String;
|
|
|
|
:cond_28
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getMyId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v7, v4, v5, v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computePipParticipant(JLco/discord/media_engine/VideoInputDeviceDescription;)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v21
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v7, v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->createPrivateCallParticipantListItems(Lcom/discord/widgets/voice/model/CallModel;)Ljava/util/List;
|
|
|
|
move-result-object v23
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v5, v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getNoiseCancellation()Ljava/lang/Boolean;
|
|
|
|
move-result-object v22
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getVoiceParticipantsHidden()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_29
|
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->isStreaming()Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_29
|
|
|
|
invoke-interface {v12}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_29
|
|
|
|
sget-object v6, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;->GRID:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;
|
|
|
|
if-ne v3, v6, :cond_29
|
|
|
|
const/16 v24, 0x1
|
|
|
|
goto :goto_14
|
|
|
|
:cond_29
|
|
const/16 v24, 0x0
|
|
|
|
:goto_14
|
|
invoke-virtual {v8}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getScreenshareEnabled()Z
|
|
|
|
move-result v25
|
|
|
|
move-object v9, v1
|
|
|
|
move-object v10, v4
|
|
|
|
move v13, v14
|
|
|
|
move v14, v15
|
|
|
|
move v15, v2
|
|
|
|
move-object/from16 v16, v0
|
|
|
|
move-object/from16 v17, v3
|
|
|
|
move-object/from16 v19, v5
|
|
|
|
invoke-direct/range {v9 .. v25}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;-><init>(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZ)V
|
|
|
|
invoke-virtual {v7, v1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_2a
|
|
:goto_15
|
|
return-void
|
|
.end method
|
|
|
|
.method public modifyPendingViewState(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;
|
|
.locals 21
|
|
|
|
move-object/from16 v0, p2
|
|
|
|
const-string v1, "pendingViewState"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
instance-of v1, v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->isIdle()Z
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v5, Ljava/util/ArrayList;
|
|
|
|
const/16 v3, 0xa
|
|
|
|
invoke-static {v1, v3}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-direct {v5, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v6, v3
|
|
|
|
check-cast v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v7}, Ljava/util/List;->size()I
|
|
|
|
move-result v7
|
|
|
|
if-eq v7, v4, :cond_2
|
|
|
|
iget-object v7, v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->g:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
sget-object v8, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;->DEFAULT:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
if-ne v7, v8, :cond_0
|
|
|
|
iget-object v7, v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v7}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isSpeaking()Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_1
|
|
|
|
:cond_0
|
|
iget-object v7, v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->g:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
sget-object v8, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;->APPLICATION_STREAMING:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
if-ne v7, v8, :cond_2
|
|
|
|
:cond_1
|
|
const/4 v13, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v13, 0x0
|
|
|
|
:goto_1
|
|
move-object/from16 v15, p0
|
|
|
|
iget-object v7, v15, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
const/4 v14, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 v14, 0x0
|
|
|
|
:goto_2
|
|
iget-boolean v3, v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->h:Z
|
|
|
|
if-ne v3, v13, :cond_4
|
|
|
|
iget-boolean v3, v6, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->i:Z
|
|
|
|
if-eq v3, v14, :cond_5
|
|
|
|
:cond_4
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/16 v3, 0x3f
|
|
|
|
move v15, v3
|
|
|
|
invoke-static/range {v6 .. v15}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->a(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$ApplicationStreamState;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;ZZI)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v6
|
|
|
|
:cond_5
|
|
invoke-interface {v5, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const v19, 0xfffb
|
|
|
|
const/16 v20, 0x0
|
|
|
|
invoke-static/range {v2 .. v20}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_7
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public bridge synthetic modifyPendingViewState(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;
|
|
|
|
check-cast p2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->modifyPendingViewState(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final observeEvents()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onCameraPermissionsGranted()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {v0, v1, v2, v1}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;
|
|
|
|
const v2, 0x7f120395
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCleared()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-super {p0}, Lf/a/b/q0;->onCleared()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->dispose()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onClickStopScreenShare()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineServiceController;->Companion:Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;->getINSTANCE()Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineServiceController;->stopStream()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onEmptyStateTapped()V
|
|
.locals 0
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->startTapForwardingJob()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onGridParticipantLongPressed(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;)V
|
|
.locals 4
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const-string v0, "participant"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->g:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
sget-object v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;->DEFAULT:Lcom/discord/views/video/VideoCallParticipantView$ParticipantData$Type;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowUserSheet;
|
|
|
|
iget-object p1, p1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowUserSheet;-><init>(J)V
|
|
|
|
iget-object p1, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {p1, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onGridParticipantTapped(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;)V
|
|
.locals 6
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->getParticipantFocusKey(Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-interface {v1}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {v0, p1, v1, v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;-><init>(Ljava/lang/String;J)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;->getParticipantFocusKey()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, p1}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
xor-int/2addr v2, v3
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;->getTimestamp()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;->getTimestamp()J
|
|
|
|
move-result-wide v0
|
|
|
|
sub-long/2addr v4, v0
|
|
|
|
const-wide/16 v0, 0xff
|
|
|
|
cmp-long v2, v4, v0
|
|
|
|
if-gtz v2, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-static {v0, p1}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/2addr v0, v3
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusVideoParticipant(Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->clearFocusedVideoParticipant()V
|
|
|
|
:goto_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->cancelTapForwardingJob()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ParticipantTap;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->startTapForwardingJob()V
|
|
|
|
:goto_2
|
|
return-void
|
|
|
|
:cond_4
|
|
:goto_3
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->startTapForwardingJob()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onMuteClicked()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
invoke-virtual {p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->isSuppressed()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->emitSuppressedDialogEvent()V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->isMuted()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->emitServerMutedDialogEvent()V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreMediaSettings;->toggleSelfMuted()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->isMeMutedByAnySource()Z
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const v0, 0x7f121822
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const v0, 0x7f12181d
|
|
|
|
:goto_0
|
|
invoke-direct {v2, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;-><init>(I)V
|
|
|
|
iget-object v0, v1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v2}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onPushToTalkPressed(Z)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->beginIdleDetection()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->endIdleDetection()V
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreMediaEngine;->setPttActive(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onShowParticipantsPressed()V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreMediaSettings;->updateVoiceParticipantsHidden(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onStopStream()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->voiceEngineServiceController:Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineServiceController;->stopStream()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setTargetChannelId(J)V
|
|
.locals 10
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->storeObservableSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
iput-wide p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->channelId:J
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->observeStoreState()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$setTargetChannelId$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$setTargetChannelId$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;)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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final startIdle()V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState;
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->isVideoCall()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->beginIdleDetection()V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final startScreenShare(Landroid/content/Intent;)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const-string v0, "intent"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
sget-object v0, Lcom/discord/utilities/voice/VoiceEngineServiceController;->Companion:Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/voice/VoiceEngineServiceController$Companion;->getINSTANCE()Lcom/discord/utilities/voice/VoiceEngineServiceController;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/voice/VoiceEngineServiceController;->startStream(Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final stopIdle()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->endIdleDetection()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final stopWatchingStream()V
|
|
.locals 23
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lf/a/b/q0;->requireViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
move-object v1, v3
|
|
|
|
:cond_0
|
|
move-object v4, v1
|
|
|
|
check-cast v4, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getActiveStream()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v2, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v2, v5}, Lcom/discord/stores/StoreApplicationStreaming;->stopStream(Ljava/lang/String;)V
|
|
|
|
iget-object v2, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getOwnerId()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v5, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "--STREAM"
|
|
|
|
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v2, v1}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iput-object v3, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getMyId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v0, v1, v2, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->computePipParticipant(JLco/discord/media_engine/VideoInputDeviceDescription;)Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
move-result-object v16
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
iget-object v14, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusedVideoParticipantKey:Ljava/lang/String;
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
const/16 v20, 0x0
|
|
|
|
const v21, 0xf5fb
|
|
|
|
const/16 v22, 0x0
|
|
|
|
invoke-static/range {v4 .. v22}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$OverlayStatus;Ljava/util/List;ZZZLcom/discord/widgets/voice/model/CameraState;Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$DisplayMode;Lcom/discord/widgets/voice/controls/FloatingVoiceControlsView$OutputSelectorState;Ljava/lang/String;ZLcom/discord/views/video/VideoCallParticipantView$ParticipantData;Ljava/lang/Boolean;Ljava/util/List;ZZILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final switchCameraInputPressed()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
invoke-virtual {p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-nez v0, :cond_3
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaEngine;->cycleVideoInputDevice()V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public final targetAndFocusStream(Ljava/lang/String;)V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const-string v0, "streamKey"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->targetStream(Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelApplicationStream;->getOwnerId()J
|
|
|
|
move-result-wide v0
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "--STREAM"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->focusVideoParticipant(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final targetStream(Ljava/lang/String;)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const-string v0, "streamKey"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreApplicationStreaming;->targetStream(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final toggleCameraPressed()V
|
|
.locals 4
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->onPreventIdle()V
|
|
|
|
invoke-virtual {p0}, Lf/a/b/q0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
move-object v0, v2
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v1, v3, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->hasVideoPermission()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->emitShowNoVideoPermissionDialogEvent()V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v1, v3, :cond_3
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/stores/StoreMediaEngine;->selectVideoInputDevice(Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;
|
|
|
|
const v2, 0x7f120394
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$AccessibilityAnnouncement;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getNumUsersConnected()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$ViewState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getGuildMaxVideoChannelMembers()Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v2
|
|
|
|
if-le v1, v2, :cond_5
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowCameraCapacityDialog;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {v2, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowCameraCapacityDialog;-><init>(I)V
|
|
|
|
iget-object v0, v1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v2}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowRequestCameraPermissionsDialog;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel$Event$ShowRequestCameraPermissionsDialog;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_6
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final tryConnectToVoice()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetCallFullscreenViewModel;->channelId:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|