2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreApplicationStreaming.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreApplicationStreaming$State;,
|
|
|
|
Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;,
|
|
|
|
Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
.field public isDirty:Z
|
|
|
|
|
|
|
|
.field public final stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Lcom/discord/stores/StoreApplicationStreaming$State;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
.field public final streamSpectators:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
.field public final streamsByUser:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
.field public final userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
.field public final voiceChannelSelectedStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreVoiceChannelSelected;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreApplicationStreaming;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreApplicationStreaming;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreApplicationStreaming;->voiceChannelSelectedStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamSpectators:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreApplicationStreaming$State;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p2, Lj0/i/o;->d:Lj0/i/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, p2, p2, v0}, Lcom/discord/stores/StoreApplicationStreaming$State;-><init>(Ljava/util/Map;Ljava/util/Map;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo p1, "voiceChannelSelectedStore"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "userStore"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "dispatcher"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "storeStream"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getStateSubject$p(Lcom/discord/stores/StoreApplicationStreaming;)Lrx/subjects/BehaviorSubject;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreApplicationStreaming;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getStoreStream$p(Lcom/discord/stores/StoreApplicationStreaming;)Lcom/discord/stores/StoreStream;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreApplicationStreaming;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$stopWatchingStreamInternal(Lcom/discord/stores/StoreApplicationStreaming;Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreApplicationStreaming;->stopWatchingStreamInternal(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleStreamCreateOrUpdate(Ljava/lang/String;ZLjava/util/List;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Z",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->PAUSED:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->ACTIVE:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sget-object v1, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, p2, v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;-><init>(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamSpectators:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-interface {p2, p1, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
invoke-interface {p3}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1, p3}, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;->onStreamUpdated(Ljava/lang/String;I)V
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic handleVoiceStateUpdate$default(Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/models/domain/ModelVoice$State;JILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide p2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/stores/StoreApplicationStreaming;->handleVoiceStateUpdate(Lcom/discord/models/domain/ModelVoice$State;J)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final isInSpectatorExperiment()Z
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreExperiments;->isExperimentalAlpha$app_productionDiscordExternalRelease()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v2, "2019-12_go_live_android"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v3, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v1, v2, v3, v4, v3}, Lcom/discord/stores/StoreExperiments;->getExperimentSnapshot$app_productionDiscordExternalRelease$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/discord/stores/StoreExperiments$Experiment;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/stores/StoreExperiments$Experiment;->isEnabled(I)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
return v2
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final isInSpectatorExperimentObservable()Lrx/Observable;
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v1, "2019-12_go_live_android"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v2, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, v1, v2, v3, v2}, Lcom/discord/stores/StoreExperiments;->getExperiment$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$isInSpectatorExperimentObservable$1;->INSTANCE:Lcom/discord/stores/StoreApplicationStreaming$isInSpectatorExperimentObservable$1;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$isInSpectatorExperimentObservable$2;->INSTANCE:Lcom/discord/stores/StoreApplicationStreaming$isInSpectatorExperimentObservable$2;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "StoreStream\n .get\u2026a()\n }\n }"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final stopWatchingStreamInternal(Ljava/lang/String;)V
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/models/domain/StreamDelete;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/models/domain/StreamDelete$Reason;->USER_REQUESTED:Lcom/discord/models/domain/StreamDelete$Reason;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, v2, v3}, Lcom/discord/models/domain/StreamDelete;-><init>(Ljava/lang/String;Lcom/discord/models/domain/StreamDelete$Reason;Z)V
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/discord/stores/StoreStream;->handleStreamDelete(Lcom/discord/models/domain/StreamDelete;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getActiveApplicationStream$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getActiveStream()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreApplicationStreaming;->getState()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$getActiveStream$1;->INSTANCE:Lcom/discord/stores/StoreApplicationStreaming$getActiveStream$1;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "getState()\n .map { \u2026activeApplicationStream }"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public final getMaxViewersForStream(JJLjava/lang/Long;)Ljava/lang/Integer;
|
|
|
|
.locals 8
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p5, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v7, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p5}, Ljava/lang/Long;->longValue()J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v0, v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide v3, p3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide v5, p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;-><init>(JJJ)V
|
|
|
|
|
|
|
|
goto :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_0
|
|
|
|
new-instance v7, Lcom/discord/models/domain/ModelApplicationStream$CallStream;
|
|
|
|
|
|
|
|
invoke-direct {v7, p3, p4, p1, p2}, Lcom/discord/models/domain/ModelApplicationStream$CallStream;-><init>(JJ)V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
invoke-virtual {v7}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;->getMaxViewers(Ljava/lang/String;)Ljava/lang/Integer;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getState()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/stores/StoreApplicationStreaming$State;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreApplicationStreaming;->isInSpectatorExperimentObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$getState$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreApplicationStreaming$getState$1;-><init>(Lcom/discord/stores/StoreApplicationStreaming;)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "isInSpectatorExperimentO\u2026 }\n }"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getStreamsByUser()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreApplicationStreaming;->getState()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$getStreamsByUser$1;->INSTANCE:Lcom/discord/stores/StoreApplicationStreaming$getStreamsByUser$1;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "getState()\n .ma\u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getStreamsForGuild(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreApplicationStreaming;->getStreamsByUser()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$getStreamsForGuild$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreApplicationStreaming$getStreamsForGuild$1;-><init>(J)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "getStreamsByUser()\n \u2026 }.distinctUntilChanged()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getStreamsForUser(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreApplicationStreaming;->getState()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$getStreamsForUser$1;->INSTANCE:Lcom/discord/stores/StoreApplicationStreaming$getStreamsForUser$1;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$getStreamsForUser$2;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreApplicationStreaming$getStreamsForUser$2;-><init>(J)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "getState()\n .map \u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;->clear()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "payload.guilds"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
|
|
|
const-string v1, "guild"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getVoiceStates()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
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 v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo v3, "voiceState"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-virtual {p0, v2, v3, v4}, Lcom/discord/stores/StoreApplicationStreaming;->handleVoiceStateUpdate(Lcom/discord/models/domain/ModelVoice$State;J)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "payload"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamCreate(Lcom/discord/models/domain/StreamCreateOrUpdate;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamViewerTracker:Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreApplicationStreaming$StreamViewerTracker;->remove(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getPaused()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getViewerIds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/stores/StoreApplicationStreaming;->handleStreamCreateOrUpdate(Ljava/lang/String;ZLjava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "streamCreate"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamDelete(Lcom/discord/models/domain/StreamDelete;)V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamSpectators:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getReason()Lcom/discord/models/domain/StreamDelete$Reason;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/models/domain/StreamDelete$Reason;->STREAM_FULL:Lcom/discord/models/domain/StreamDelete$Reason;
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->DENIED_FULL:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;-><init>(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
iput-boolean v3, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getUnavailable()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->RECONNECTING:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
invoke-static {p1, v1, v0, v2, v0}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->copy$default(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;ILjava/lang/Object;)Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamDelete;->getReason()Lcom/discord/models/domain/StreamDelete$Reason;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/models/domain/StreamDelete$Reason;->USER_REQUESTED:Lcom/discord/models/domain/StreamDelete$Reason;
|
|
|
|
|
|
|
|
if-ne p1, v1, :cond_4
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->LEFT:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
invoke-static {p1, v1, v0, v2, v0}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->copy$default(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;ILjava/lang/Object;)Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->ENDED:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
invoke-static {p1, v1, v0, v2, v0}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->copy$default(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;ILjava/lang/Object;)Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_2
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
iput-boolean v3, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
const-string p1, "streamDelete"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamTargeted(Ljava/lang/String;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v2, v0
|
|
|
|
|
|
|
|
:goto_0
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v2}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getState()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->isUserWatching()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->voiceChannelSelectedStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreVoiceChannelSelected;->getSelectedVoiceChannelId$app_productionDiscordExternalRelease()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
cmp-long v5, v1, v3
|
|
|
|
|
|
|
|
if-nez v5, :cond_2
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Lcom/discord/stores/StoreStream;->streamWatch(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "streamKey"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamUpdate(Lcom/discord/models/domain/StreamCreateOrUpdate;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getPaused()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getViewerIds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/stores/StoreApplicationStreaming;->handleStreamCreateOrUpdate(Ljava/lang/String;ZLjava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "streamUpdate"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleStreamWatch(Ljava/lang/String;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->CONNECTING:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;-><init>(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "streamKey"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleVoiceChannelSelected(J)V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
cmp-long v0, p1, v2
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/stores/StoreStream;->streamWatch(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {}, Lj0/n/c/h;->throwNpe()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
cmp-long v0, v2, p1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->LEFT:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, p2, v1, v0, v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->copy$default(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;ILjava/lang/Object;)Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
move-object p1, v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreApplicationStreaming;->targetStream:Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleVoiceStateUpdate(Lcom/discord/models/domain/ModelVoice$State;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreApplicationStreaming;->handleVoiceStateUpdate$default(Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/models/domain/ModelVoice$State;JILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleVoiceStateUpdate(Lcom/discord/models/domain/ModelVoice$State;J)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 16
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p1, :cond_b
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelVoice$State;->getChannelId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelVoice$State;->getUserId()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelVoice$State;->isSelfStream()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v12, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
cmp-long v7, p2, v4
|
|
|
|
|
|
|
|
if-eqz v7, :cond_0
|
|
|
|
|
|
|
|
const/4 v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v8
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
cmp-long v13, v8, v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v13, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v13, v0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v14
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v15, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v3, v15
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide/from16 v4, p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide v8, v10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct/range {v3 .. v9}, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;-><init>(JJJ)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {v13, v14, v15}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-boolean v12, v0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_2
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {}, Lj0/n/c/h;->throwNpe()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_3
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v3, :cond_5
|
|
|
|
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
new-instance v5, Lcom/discord/models/domain/ModelApplicationStream$CallStream;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v6
|
|
|
|
|
|
|
|
invoke-direct {v5, v6, v7, v10, v11}, Lcom/discord/models/domain/ModelApplicationStream$CallStream;-><init>(JJ)V
|
|
|
|
|
|
|
|
invoke-interface {v3, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
iput-boolean v12, v0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {}, Lj0/n/c/h;->throwNpe()V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v2, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
iget-boolean v3, v0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v3, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v2, :cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v6, 0x1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
iput-boolean v6, v0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v2, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/stores/StoreApplicationStreaming;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v3, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
cmp-long v5, v10, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v5, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelVoice$State;->getChannelId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v5, :cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {v5}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
cmp-long v7, v3, v5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v7, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_4
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;->LEFT:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;
|
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
|
|
|
invoke-static {v2, v3, v1, v4, v1}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->copy$default(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream$State;Lcom/discord/models/domain/ModelApplicationStream;ILjava/lang/Object;)Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-boolean v12, v0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_b
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo v2, "voiceState"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v2}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final isUserStreaming(J)Z
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreApplicationStreaming;->isInSpectatorExperiment()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$State;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamsByUser:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2, v3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreApplicationStreaming;->streamSpectators:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v3, v4}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lcom/discord/stores/StoreApplicationStreaming$State;-><init>(Ljava/util/Map;Ljava/util/Map;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setActiveApplicationStream$app_productionDiscordExternalRelease(Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplicationStreaming;->activeApplicationStream:Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final stopWatchingStream(Ljava/lang/String;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$stopWatchingStream$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreApplicationStreaming$stopWatchingStream$1;-><init>(Lcom/discord/stores/StoreApplicationStreaming;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "streamKey"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final targetStream(Ljava/lang/String;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplicationStreaming;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplicationStreaming$targetStream$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreApplicationStreaming$targetStream$1;-><init>(Lcom/discord/stores/StoreApplicationStreaming;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "streamKey"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|