2020-05-07 23:11:04 +00:00
|
|
|
.class public final Lf/a/g/m;
|
2020-01-30 10:23:52 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "RtcConnection.kt"
|
|
|
|
|
|
|
|
# interfaces
|
2020-05-07 23:11:04 +00:00
|
|
|
.implements Lf/a/g/p/a$c;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iput-object p1, p0, Lf/a/g/m;->a:Lcom/discord/rtcconnection/RtcConnection;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public a(J)V
|
|
|
|
.locals 4
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iget-object v0, p0, Lf/a/g/m;->a:Lcom/discord/rtcconnection/RtcConnection;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/LinkedList;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x5
|
|
|
|
|
|
|
|
if-le v1, v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 v1, 0x1f4
|
|
|
|
|
|
|
|
int-to-long v1, v1
|
|
|
|
|
|
|
|
cmp-long v3, p1, v1
|
|
|
|
|
|
|
|
if-lez v3, :cond_1
|
|
|
|
|
|
|
|
iget v1, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
iput v1, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
:cond_1
|
2020-02-27 22:30:35 +00:00
|
|
|
sget-object v1, Lcom/discord/rtcconnection/RtcConnection$Quality;->Companion:Lcom/discord/rtcconnection/RtcConnection$Quality$a;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
long-to-double p1, p1
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1, p2}, Lcom/discord/rtcconnection/RtcConnection$Quality$a;->a(D)Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
new-instance p2, Lf/a/g/l;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
invoke-direct {p2, p1}, Lf/a/g/l;-><init>(Lcom/discord/rtcconnection/RtcConnection$Quality;)V
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Lcom/discord/rtcconnection/RtcConnection;->a(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public a(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iget-object v0, p0, Lf/a/g/m;->a:Lcom/discord/rtcconnection/RtcConnection;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
iput-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->s:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->c:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-04-18 17:44:22 +00:00
|
|
|
check-cast v0, Lcom/discord/rtcconnection/RtcConnection$b;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
2020-04-18 17:44:22 +00:00
|
|
|
invoke-interface {v0}, Lcom/discord/rtcconnection/RtcConnection$b;->onMediaSessionIdReceived()V
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "mediaSessionId"
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public a(ZLjava/lang/Integer;Ljava/lang/String;)V
|
|
|
|
.locals 10
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iget-object v0, p0, Lf/a/g/m;->a:Lcom/discord/rtcconnection/RtcConnection;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
2020-04-18 17:44:22 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v3, "Disconnected from RTC server. wasFatal: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " -- code: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " -- reason: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x4
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->a()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->u:Lf/a/g/g;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
invoke-interface {p1, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->a(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
|
|
|
|
|
|
|
|
instance-of p1, p1, Lcom/discord/rtcconnection/RtcConnection$State$d;
|
|
|
|
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/rtcconnection/RtcConnection;->i()V
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->d:Lf/a/g/q/d;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
invoke-virtual {p1}, Lf/a/g/q/d;->a()Lkotlin/Unit;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
iput p1, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->p:Ljava/lang/Long;
|
|
|
|
|
|
|
|
const/16 v1, 0x3e8
|
|
|
|
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eq v2, v1, :cond_4
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance v2, Lcom/discord/rtcconnection/RtcConnection$State$d;
|
|
|
|
|
|
|
|
invoke-direct {v2, p1}, Lcom/discord/rtcconnection/RtcConnection$State$d;-><init>(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/rtcconnection/RtcConnection;->a(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
|
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
new-instance v2, Lf/a/g/j;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
2020-05-07 23:11:04 +00:00
|
|
|
invoke-direct {v2, v0}, Lf/a/g/j;-><init>(Lcom/discord/rtcconnection/RtcConnection;)V
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v2}, Lcom/discord/utilities/networking/Backoff;->fail(Lkotlin/jvm/functions/Function0;)J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
2020-04-18 17:44:22 +00:00
|
|
|
iget-object v4, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
2020-01-30 10:23:52 +00:00
|
|
|
|
|
|
|
iget-object v5, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v0, "Disconnect was not clean! Reason: "
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p3, ", code: "
|
|
|
|
|
|
|
|
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p2, ". Reconnecting in "
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
int-to-long p2, v1
|
|
|
|
|
|
|
|
div-long/2addr v2, p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p2, " seconds."
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x4
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/discord/utilities/logging/Logger;->w$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
.end method
|