2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/stores/StoreVoiceSpeaking;
|
|
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
.source "StoreVoiceSpeaking.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final SPEAKING_UPDATES_BUFFER_MS:J = 0x12cL
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final speakingUsers:Ljava/util/Set;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final speakingUsersPublisher:Lrx/subjects/Subject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->h0()Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsersPublisher:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static synthetic a(Lcom/discord/stores/StoreVoiceSpeaking;Ljava/util/List;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreVoiceSpeaking;->handleUserSpeaking(Ljava/util/List;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static synthetic b(JLjava/util/Set;)Ljava/lang/Boolean;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-interface {p2, p0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static c(Lcom/discord/rtcconnection/RtcConnection$State;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
instance-of p0, p0, Lcom/discord/rtcconnection/RtcConnection$State$f;
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getRtcConnection()Lcom/discord/stores/StoreRtcConnection;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreRtcConnection;->getSpeakingUpdates()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
sget-object v0, Lf/a/k/o;->d:Lf/a/k/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-virtual {p0, v0}, Lrx/Observable;->E(Lk0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x12c
|
|
|
|
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1, v2}, Lrx/Observable;->a(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object p0, Lk0/l/a/g;->e:Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static d(Lkotlin/Pair;)Lcom/discord/models/domain/ModelUser$Speaking;
|
|
|
|
.locals 3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v0, Lcom/discord/models/domain/ModelUser$Speaking;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v1, p0, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
iget-object p0, p0, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast p0, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v2, p0}, Lcom/discord/models/domain/ModelUser$Speaking;-><init>(JZ)V
|
|
|
|
|
|
|
|
return-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private handleUserSpeaking(Ljava/util/List;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser$Speaking;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelUser$Speaking;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser$Speaking;->getUserId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser$Speaking;->isSpeaking()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
|
|
|
move v1, v5
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsersPublisher:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-interface {p1, v0}, Lk0/g;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public get()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsersPublisher:Lrx/subjects/Subject;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
sget-object v1, Lf/a/b/r;->d:Lf/a/b/r;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public get(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreVoiceSpeaking;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v1, Lf/a/k/q;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v1, p1, p2}, Lf/a/k/q;-><init>(J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lk0/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
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public handleVoiceChannelSelected(J)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Set;->clear()V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsersPublisher:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
new-instance p2, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceSpeaking;->speakingUsers:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-direct {p2, v0}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-interface {p1, p2}, Lk0/g;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public init(Landroid/content/Context;)V
|
|
|
|
.locals 2
|
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getRtcConnection()Lcom/discord/stores/StoreRtcConnection;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreRtcConnection;->getConnectionState()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
sget-object v0, Lf/a/k/r;->d:Lf/a/k/r;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->V(Lk0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v0, Lf/a/k/p;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v0, p0}, Lf/a/k/p;-><init>(Lcom/discord/stores/StoreVoiceSpeaking;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-class v1, Lcom/discord/stores/StoreVoiceSpeaking;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v0, v1}, Lf/a/b/s;->g(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|