apkfuckery/com.discord/smali/f/a/h/j.smali

690 lines
20 KiB
Smali
Raw Normal View History

2020-07-08 16:44:49 +00:00
.class public final Lf/a/h/j;
.super Ljava/lang/Object;
.source "RtcConnection.kt"
# interfaces
.implements Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;
# instance fields
.field public final synthetic a:Lcom/discord/rtcconnection/RtcConnection;
# direct methods
.method public constructor <init>(Lcom/discord/rtcconnection/RtcConnection;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
iput-object p1, p0, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onConnected(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;Ljava/util/List;)V
2020-09-09 19:21:20 +00:00
.locals 11
2020-07-08 16:44:49 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;",
"Ljava/util/List<",
"Lf/a/h/r/a;",
">;)V"
}
.end annotation
2020-09-09 19:21:20 +00:00
const-string v0, "connection"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-15 01:38:31 +00:00
const-string/jumbo p1, "transportInfo"
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p2, p1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const-string p1, "supportedVideoCodecs"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p3, p1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object p1, p0, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
iget-object v1, p1, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
invoke-virtual {v1}, Lcom/discord/utilities/networking/Backoff;->succeed()V
iput-object p2, p1, Lcom/discord/rtcconnection/RtcConnection;->f:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;
iget-object v1, p1, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
2020-09-09 19:21:20 +00:00
const/4 v2, 0x0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v1, :cond_2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v3, p1, Lcom/discord/rtcconnection/RtcConnection;->d:Lf/a/h/t/d;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v3, :cond_1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iput-object v2, v3, Lf/a/h/t/d;->a:Lco/discord/media_engine/Stats;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance v0, Lco/discord/media_engine/VoiceQuality;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {v0}, Lco/discord/media_engine/VoiceQuality;-><init>()V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iput-object v0, v3, Lf/a/h/t/d;->b:Lco/discord/media_engine/VoiceQuality;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget-object v0, v3, Lf/a/h/t/d;->c:Lrx/Subscription;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v0, :cond_0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-interface {v0}, Lrx/Subscription;->isUnsubscribed()Z
move-result v0
if-nez v0, :cond_0
invoke-virtual {v3}, Lf/a/h/t/d;->a()V
2020-07-08 16:44:49 +00:00
:cond_0
2020-09-09 19:21:20 +00:00
const-wide/16 v4, 0x0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-wide v6, v3, Lf/a/h/t/d;->d:J
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v4, v5, v6, v7, v0}, Lrx/Observable;->B(JJLjava/util/concurrent/TimeUnit;)Lrx/Observable;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v0
2020-07-08 16:44:49 +00:00
new-instance v4, Lf/a/h/t/b;
2020-09-09 19:21:20 +00:00
invoke-direct {v4, v3, v1}, Lf/a/h/t/b;-><init>(Lf/a/h/t/d;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
2020-07-08 16:44:49 +00:00
new-instance v1, Lf/a/h/t/c;
2020-09-09 19:21:20 +00:00
invoke-direct {v1, v3}, Lf/a/h/t/c;-><init>(Lf/a/h/t/d;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v0, v4, v1}, Lrx/Observable;->S(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v0
iput-object v0, v3, Lf/a/h/t/d;->c:Lrx/Subscription;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
goto :goto_0
2020-07-08 16:44:49 +00:00
:cond_1
2020-09-09 19:21:20 +00:00
throw v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
:cond_2
:goto_0
iget-object v0, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;->c:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo$Protocol;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result v0
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const/4 v1, 0x1
if-eqz v0, :cond_3
2020-07-08 16:44:49 +00:00
const-string p3, "Unsupported protocol: "
2020-09-09 19:21:20 +00:00
invoke-static {p3}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
move-result-object p3
iget-object p2, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;->c:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo$Protocol;
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 p2, 0x2e
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, v1, p2, v2}, Lcom/discord/rtcconnection/RtcConnection;->d(ZLjava/lang/String;Ljava/lang/Throwable;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
goto :goto_2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
:cond_3
iget-object v0, p1, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v2, p1, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v3, "Sending UDP info to RTC server."
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v0, v3, v2}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object p1, p1, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/h/s/a;
if-eqz p1, :cond_5
2020-09-09 19:21:20 +00:00
const-string/jumbo v0, "udp"
iget-object v2, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;->a:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
iget p2, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$TransportInfo;->b:I
2020-09-09 19:21:20 +00:00
const-string/jumbo v3, "xsalsa20_poly1305"
const-string v4, "protocol"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v0, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v4, "address"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v2, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v4, "mode"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v3, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v4, "codecs"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p3, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance v4, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol$ProtocolInfo;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {v4, v2, p2, v3}, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol$ProtocolInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance p2, Ljava/util/ArrayList;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const/16 v2, 0xa
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p3, v2}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {p2, v2}, Ljava/util/ArrayList;-><init>(I)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p3
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
:goto_1
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
move-result v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v2, :cond_4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
check-cast v2, Lf/a/h/r/a;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance v3, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol$CodecInfo;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v6, v2, Lf/a/h/r/a;->a:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v7, v2, Lf/a/h/r/a;->b:I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v8, v2, Lf/a/h/r/a;->c:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v9, v2, Lf/a/h/r/a;->d:I
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
iget-object v10, v2, Lf/a/h/r/a;->e:Ljava/lang/Integer;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-object v5, v3
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct/range {v5 .. v10}, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol$CodecInfo;-><init>(Ljava/lang/String;ILjava/lang/String;ILjava/lang/Integer;)V
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {p2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
2020-07-08 16:44:49 +00:00
goto :goto_1
:cond_4
2020-09-09 19:21:20 +00:00
new-instance p3, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {p3, v0, v4, p2}, Lcom/discord/rtcconnection/socket/io/Payloads$Protocol;-><init>(Ljava/lang/String;Lcom/discord/rtcconnection/socket/io/Payloads$Protocol$ProtocolInfo;Ljava/util/List;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, v1, p3}, Lf/a/h/s/a;->m(ILjava/lang/Object;)V
2020-07-08 16:44:49 +00:00
:cond_5
2020-09-09 19:21:20 +00:00
:goto_2
2020-07-08 16:44:49 +00:00
return-void
.end method
.method public onConnectionStateChange(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$ConnectionState;)V
2020-07-14 22:43:59 +00:00
.locals 5
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "connection"
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p1, "connectionState"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p2, p1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object p1, p0, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
2020-09-09 19:21:20 +00:00
iget-object v0, p1, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v1, p1, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance v2, Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v3, "Connection state change: "
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v3, p1, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
invoke-virtual {p2}, Ljava/lang/Enum;->ordinal()I
move-result p2
2020-09-09 19:21:20 +00:00
const/4 v1, 0x1
2020-07-08 16:44:49 +00:00
if-eqz p2, :cond_3
2020-09-09 19:21:20 +00:00
if-eq p2, v1, :cond_2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v2, 0x2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eq p2, v2, :cond_1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v2, 0x3
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-ne p2, v2, :cond_0
2020-07-08 16:44:49 +00:00
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$e;->a:Lcom/discord/rtcconnection/RtcConnection$State$e;
goto :goto_0
:cond_0
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
throw p1
:cond_1
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
goto :goto_0
:cond_2
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g;
goto :goto_0
:cond_3
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$h;->a:Lcom/discord/rtcconnection/RtcConnection$State$h;
:goto_0
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, p2}, Lcom/discord/rtcconnection/RtcConnection;->n(Lcom/discord/rtcconnection/RtcConnection$State;)V
2020-07-08 16:44:49 +00:00
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g;
2020-09-09 19:21:20 +00:00
if-ne v0, p2, :cond_4
2020-07-08 16:44:49 +00:00
iget-object p2, p1, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
2020-09-09 19:21:20 +00:00
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$h;->a:Lcom/discord/rtcconnection/RtcConnection$State$h;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-ne p2, v0, :cond_4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {p1}, Lcom/discord/rtcconnection/RtcConnection;->k()V
2020-07-08 16:44:49 +00:00
:cond_4
iget-object p2, p1, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
2020-09-09 19:21:20 +00:00
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-ne p2, v0, :cond_8
2020-07-08 16:44:49 +00:00
iget-object p2, p1, Lcom/discord/rtcconnection/RtcConnection;->D:Lcom/discord/utilities/time/Clock;
invoke-interface {p2}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
2020-09-09 19:21:20 +00:00
move-result-wide v2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
2020-07-08 16:44:49 +00:00
move-result-object p2
iput-object p2, p1, Lcom/discord/rtcconnection/RtcConnection;->p:Ljava/lang/Long;
2020-09-09 19:21:20 +00:00
iput-boolean v1, p1, Lcom/discord/rtcconnection/RtcConnection;->r:Z
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-array p2, v1, [Lkotlin/Pair;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v0, 0x0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v1, p1, Lcom/discord/rtcconnection/RtcConnection;->q:I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
new-instance v2, Lkotlin/Pair;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v3, "connect_count"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {v2, v3, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
aput-object v2, p2, v0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p2}, Lf/h/a/f/e/n/f;->mutableMapOf([Lkotlin/Pair;)Ljava/util/Map;
2020-07-08 16:44:49 +00:00
move-result-object p2
2020-09-09 19:21:20 +00:00
iget-object v0, p1, Lcom/discord/rtcconnection/RtcConnection;->o:Ljava/lang/Long;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget-object v1, p1, Lcom/discord/rtcconnection/RtcConnection;->p:Ljava/lang/Long;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v1, :cond_6
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-nez v0, :cond_5
2020-07-08 16:44:49 +00:00
goto :goto_1
:cond_5
2020-09-09 19:21:20 +00:00
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-wide v1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-wide v3
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
sub-long/2addr v1, v3
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
2020-07-08 16:44:49 +00:00
move-result-object v0
2020-09-09 19:21:20 +00:00
goto :goto_2
2020-07-08 16:44:49 +00:00
:cond_6
:goto_1
2020-09-09 19:21:20 +00:00
const/4 v0, 0x0
:goto_2
2020-07-08 16:44:49 +00:00
if-eqz v0, :cond_7
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
move-object v1, p2
check-cast v1, Ljava/util/HashMap;
const-string v2, "connect_time"
invoke-virtual {v1, v2, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_7
invoke-virtual {p1, p2}, Lcom/discord/rtcconnection/RtcConnection;->a(Ljava/util/Map;)Ljava/util/Map;
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;->VOICE_CONNECTION_SUCCESS:Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, v0, p2}, Lcom/discord/rtcconnection/RtcConnection;->i(Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;Ljava/util/Map;)V
2020-07-08 16:44:49 +00:00
:cond_8
return-void
.end method
.method public onDestroy(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
2020-09-09 19:21:20 +00:00
.locals 1
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "connection"
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
return-void
2020-07-08 16:44:49 +00:00
.end method
.method public onError(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$FailedConnectionException;)V
2020-07-14 22:43:59 +00:00
.locals 8
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "connection"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const-string p1, "exception"
invoke-static {p2, p1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object p1, p0, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
if-eqz p1, :cond_2
const-string v0, "connection error: "
2020-09-09 19:21:20 +00:00
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
move-result-object v0
iget-object v1, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$FailedConnectionException;->type:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$FailedConnectionException$FailureType;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iget-object v1, p2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$FailedConnectionException;->type:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$FailedConnectionException$FailureType;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_0
if-eq v1, v2, :cond_0
const/4 v4, 0x2
if-eq v1, v4, :cond_0
const/4 v1, 0x0
goto :goto_0
:cond_0
const/4 v1, 0x1
:goto_0
if-eqz v1, :cond_1
2020-07-14 22:43:59 +00:00
iget-object v1, p1, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
const-string v3, " -- "
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v0, v3}, Lf/e/b/a/a;->J(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
move-result-object v3
2020-07-14 22:43:59 +00:00
invoke-virtual {p2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
move-result-object v4
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
move-result-object v3
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
iget-object v4, p1, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-07-14 22:43:59 +00:00
invoke-virtual {v1, v3, v4}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
goto :goto_1
:cond_1
sget-object v1, Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;->VOICE_CONNECTION_FAILURE:Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;
new-array v4, v2, [Lkotlin/Pair;
iget v5, p1, Lcom/discord/rtcconnection/RtcConnection;->q:I
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
new-instance v6, Lkotlin/Pair;
const-string v7, "connect_count"
invoke-direct {v6, v7, v5}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
aput-object v6, v4, v3
2020-09-09 19:21:20 +00:00
invoke-static {v4}, Lf/h/a/f/e/n/f;->mutableMapOf([Lkotlin/Pair;)Ljava/util/Map;
2020-07-08 16:44:49 +00:00
move-result-object v3
invoke-virtual {p1, v3}, Lcom/discord/rtcconnection/RtcConnection;->a(Ljava/util/Map;)Ljava/util/Map;
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, v1, v3}, Lcom/discord/rtcconnection/RtcConnection;->i(Lcom/discord/rtcconnection/RtcConnection$AnalyticsEvent;Ljava/util/Map;)V
2020-07-08 16:44:49 +00:00
:goto_1
2020-09-09 19:21:20 +00:00
invoke-virtual {p1, v2, v0, p2}, Lcom/discord/rtcconnection/RtcConnection;->d(ZLjava/lang/String;Ljava/lang/Throwable;)V
2020-07-08 16:44:49 +00:00
return-void
:cond_2
2020-09-09 19:21:20 +00:00
const/4 p1, 0x0
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
throw p1
2020-07-08 16:44:49 +00:00
.end method
.method public onSpeaking(JIZ)V
.locals 11
iget-object v0, p0, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
iget-wide v1, v0, Lcom/discord/rtcconnection/RtcConnection;->A:J
cmp-long v3, p1, v1
if-nez v3, :cond_0
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/h/s/a;
if-eqz v1, :cond_0
const/4 v2, 0x5
new-instance v10, Lcom/discord/rtcconnection/socket/io/Payloads$Speaking;
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
const/4 v3, 0x0
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
const/4 v7, 0x0
const/16 v8, 0x8
const/4 v9, 0x0
move-object v3, v10
move v4, p3
invoke-direct/range {v3 .. v9}, Lcom/discord/rtcconnection/socket/io/Payloads$Speaking;-><init>(ILjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
invoke-virtual {v1, v2, v10}, Lf/a/h/s/a;->m(ILjava/lang/Object;)V
:cond_0
new-instance p3, Lf/a/h/k;
invoke-direct {p3, p1, p2, p4}, Lf/a/h/k;-><init>(JZ)V
2020-09-09 19:21:20 +00:00
invoke-virtual {v0, p3}, Lcom/discord/rtcconnection/RtcConnection;->j(Lkotlin/jvm/functions/Function1;)V
2020-07-08 16:44:49 +00:00
return-void
.end method
.method public onVideo(JLjava/lang/Integer;III)V
.locals 13
move-wide v0, p1
move-object v2, p0
iget-object v3, v2, Lf/a/h/j;->a:Lcom/discord/rtcconnection/RtcConnection;
iget-wide v4, v3, Lcom/discord/rtcconnection/RtcConnection;->A:J
cmp-long v6, v0, v4
if-nez v6, :cond_0
iget-object v4, v3, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/h/s/a;
if-eqz v4, :cond_0
new-instance v12, Lcom/discord/rtcconnection/socket/io/Payloads$Video;
const/4 v9, 0x0
const/16 v10, 0x8
const/4 v11, 0x0
move-object v5, v12
move/from16 v6, p4
move/from16 v7, p5
move/from16 v8, p6
invoke-direct/range {v5 .. v11}, Lcom/discord/rtcconnection/socket/io/Payloads$Video;-><init>(IIILjava/lang/Long;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
const/16 v5, 0xc
invoke-virtual {v4, v5, v12}, Lf/a/h/s/a;->m(ILjava/lang/Object;)V
:cond_0
new-instance v4, Lf/a/h/l;
move-object/from16 v5, p3
invoke-direct {v4, p1, p2, v5}, Lf/a/h/l;-><init>(JLjava/lang/Integer;)V
2020-09-09 19:21:20 +00:00
invoke-virtual {v3, v4}, Lcom/discord/rtcconnection/RtcConnection;->j(Lkotlin/jvm/functions/Function1;)V
2020-07-08 16:44:49 +00:00
return-void
.end method