apkfuckery/com.discord/smali/f/a/g/e.smali

371 lines
10 KiB
Smali
Raw Normal View History

2020-05-07 23:11:04 +00:00
.class public final Lf/a/g/e;
.super Ly/v/b/k;
2020-04-08 16:24:01 +00:00
.source "RtcConnection.kt"
2019-12-06 03:29:40 +00:00
2020-02-20 19:33:18 +00:00
# interfaces
2020-04-08 16:24:01 +00:00
.implements Lkotlin/jvm/functions/Function0;
2019-12-06 03:29:40 +00:00
2020-02-20 19:33:18 +00:00
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
2020-05-07 23:11:04 +00:00
"Ly/v/b/k;",
2020-04-08 16:24:01 +00:00
"Lkotlin/jvm/functions/Function0<",
"Lkotlin/Unit;",
">;"
2020-02-20 19:33:18 +00:00
}
.end annotation
2020-04-08 16:24:01 +00:00
# instance fields
2020-04-18 17:44:22 +00:00
.field public final synthetic this$0:Lcom/discord/rtcconnection/RtcConnection$d$a;
2019-12-06 03:29:40 +00:00
2020-04-08 16:24:01 +00:00
# direct methods
2020-04-18 17:44:22 +00:00
.method public constructor <init>(Lcom/discord/rtcconnection/RtcConnection$d$a;)V
2020-04-08 16:24:01 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
2020-05-07 23:11:04 +00:00
iput-object p1, p0, Lf/a/g/e;->this$0:Lcom/discord/rtcconnection/RtcConnection$d$a;
2020-02-20 19:33:18 +00:00
2020-04-08 16:24:01 +00:00
const/4 p1, 0x0
2020-02-20 19:33:18 +00:00
2020-05-07 23:11:04 +00:00
invoke-direct {p0, p1}, Ly/v/b/k;-><init>(I)V
2020-02-20 19:33:18 +00:00
return-void
.end method
# virtual methods
2020-04-08 16:24:01 +00:00
.method public bridge synthetic invoke()Ljava/lang/Object;
2020-02-20 19:33:18 +00:00
.locals 1
2020-05-07 23:11:04 +00:00
invoke-virtual {p0}, Lf/a/g/e;->invoke()V
2020-02-20 19:33:18 +00:00
2020-04-08 16:24:01 +00:00
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
2020-02-20 19:33:18 +00:00
2020-04-08 16:24:01 +00:00
return-object v0
.end method
2020-02-20 19:33:18 +00:00
2020-04-08 16:24:01 +00:00
.method public final invoke()V
2020-04-18 17:44:22 +00:00
.locals 26
move-object/from16 v1, p0
2020-05-07 23:11:04 +00:00
iget-object v0, v1, Lf/a/g/e;->this$0:Lcom/discord/rtcconnection/RtcConnection$d$a;
2020-04-18 17:44:22 +00:00
iget-object v0, v0, Lcom/discord/rtcconnection/RtcConnection$d$a;->d:Lcom/discord/rtcconnection/RtcConnection$d;
iget-object v2, v0, Lcom/discord/rtcconnection/RtcConnection$d;->this$0:Lcom/discord/rtcconnection/RtcConnection;
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection$d;->$endpoint:Ljava/lang/String;
iget-object v6, v0, Lcom/discord/rtcconnection/RtcConnection$d;->$token:Ljava/lang/String;
iget-object v7, v0, Lcom/discord/rtcconnection/RtcConnection$d;->$sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
iget-object v0, v2, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
invoke-virtual {v0}, Lcom/discord/utilities/networking/Backoff;->succeed()V
if-eqz v7, :cond_0
const-string v0, "wss"
goto :goto_0
:cond_0
const-string v0, "ws"
:goto_0
const/4 v4, 0x4
const/4 v5, 0x0
const-string v8, ".gg"
const-string v9, ".media"
2020-05-07 23:11:04 +00:00
invoke-static {v3, v8, v9, v5, v4}, Ly/b0/p;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
2020-04-18 17:44:22 +00:00
move-result-object v8
const-string v9, "://"
2020-05-07 23:11:04 +00:00
invoke-static {v0, v9, v8}, Lf/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2020-04-18 17:44:22 +00:00
move-result-object v0
const-string v9, ":80"
const-string v10, ":443"
2020-05-07 23:11:04 +00:00
invoke-static {v0, v9, v10, v5, v4}, Ly/b0/p;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
2020-04-18 17:44:22 +00:00
move-result-object v9
2020-05-07 23:11:04 +00:00
iget-object v4, v2, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/g/p/a;
2020-04-18 17:44:22 +00:00
const/4 v11, 0x0
if-eqz v4, :cond_1
2020-05-07 23:11:04 +00:00
iget-object v4, v4, Lf/a/g/p/a;->r:Ljava/lang/String;
2020-04-18 17:44:22 +00:00
goto :goto_1
:cond_1
move-object v4, v11
:goto_1
2020-05-07 23:11:04 +00:00
invoke-static {v4, v9}, Ly/v/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
2020-04-18 17:44:22 +00:00
move-result v4
if-eqz v4, :cond_3
2020-05-07 23:11:04 +00:00
iget-object v4, v2, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/g/p/a;
2020-04-18 17:44:22 +00:00
if-eqz v4, :cond_2
2020-05-07 23:11:04 +00:00
iget-object v4, v4, Lf/a/g/p/a;->s:Ljava/lang/String;
2020-04-18 17:44:22 +00:00
goto :goto_2
:cond_2
move-object v4, v11
:goto_2
2020-05-07 23:11:04 +00:00
invoke-static {v4, v6}, Ly/v/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
2020-04-18 17:44:22 +00:00
move-result v4
if-eqz v4, :cond_3
iget-object v4, v2, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
instance-of v4, v4, Lcom/discord/rtcconnection/RtcConnection$State$d;
if-nez v4, :cond_3
iget-object v12, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
iget-object v13, v2, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
const/4 v15, 0x0
const/16 v16, 0x4
const/16 v17, 0x0
const-string v14, "Already connecting, no need to continue."
invoke-static/range {v12 .. v17}, 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
goto/16 :goto_4
:cond_3
2020-05-07 23:11:04 +00:00
iget-object v4, v2, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/g/p/a;
2020-04-18 17:44:22 +00:00
const/4 v10, 0x1
if-eqz v4, :cond_4
2020-05-07 23:11:04 +00:00
invoke-virtual {v4}, Lf/a/g/p/a;->e()V
2020-04-18 17:44:22 +00:00
2020-05-07 23:11:04 +00:00
sget-object v12, Lf/a/g/p/b;->d:Lf/a/g/p/b;
2020-04-18 17:44:22 +00:00
2020-05-07 23:11:04 +00:00
invoke-virtual {v4, v12}, Lf/a/g/p/a;->a(Lkotlin/jvm/functions/Function1;)V
2020-04-18 17:44:22 +00:00
2020-05-07 23:11:04 +00:00
iput-boolean v10, v4, Lf/a/g/p/a;->q:Z
2020-04-18 17:44:22 +00:00
:cond_4
iget-boolean v4, v2, Lcom/discord/rtcconnection/RtcConnection;->h:Z
if-eqz v4, :cond_5
iget-object v12, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
iget-object v13, v2, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
const/4 v15, 0x0
const/16 v16, 0x0
const/16 v17, 0xc
const/16 v18, 0x0
const-string v14, "Connect called on destroyed instance."
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
invoke-static/range {v12 .. v18}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
invoke-virtual {v2, v5}, Lcom/discord/rtcconnection/RtcConnection;->a(Z)V
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
goto/16 :goto_4
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
:cond_5
if-nez v6, :cond_6
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
iget-object v0, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
iget-object v3, v2, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
const/16 v22, 0x0
2020-02-20 19:33:18 +00:00
2020-04-18 17:44:22 +00:00
const/16 v23, 0x0
const/16 v24, 0xc
const/16 v25, 0x0
const-string v21, "Connect called with no token."
move-object/from16 v19, v0
move-object/from16 v20, v3
invoke-static/range {v19 .. v25}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
invoke-virtual {v2, v5}, Lcom/discord/rtcconnection/RtcConnection;->a(Z)V
goto/16 :goto_4
:cond_6
iget-object v12, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "connecting via endpoint: "
invoke-virtual {v4, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v10, " token: "
invoke-virtual {v4, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v13
iget-object v14, v2, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
const/4 v15, 0x0
const/16 v16, 0x4
const/16 v17, 0x0
invoke-static/range {v12 .. v17}, 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
invoke-interface {v3}, Ljava/lang/CharSequence;->length()I
move-result v3
if-nez v3, :cond_7
const/4 v5, 0x1
:cond_7
if-eqz v5, :cond_8
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$b;->a:Lcom/discord/rtcconnection/RtcConnection$State$b;
invoke-virtual {v2, v0}, Lcom/discord/rtcconnection/RtcConnection;->a(Lcom/discord/rtcconnection/RtcConnection$State;)V
goto :goto_4
:cond_8
:try_start_0
new-instance v3, Ljava/net/URI;
invoke-direct {v3, v0}, Ljava/net/URI;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/net/URI;->getHost()Ljava/lang/String;
move-result-object v0
iput-object v0, v2, Lcom/discord/rtcconnection/RtcConnection;->l:Ljava/lang/String;
invoke-virtual {v3}, Ljava/net/URI;->getPort()I
move-result v0
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
iput-object v0, v2, Lcom/discord/rtcconnection/RtcConnection;->m:Ljava/lang/Integer;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_3
:catch_0
move-exception v0
iget-object v3, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
const-string v4, "endpoint"
invoke-static {v4, v8}, Ljava/util/Collections;->singletonMap(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
move-result-object v4
const-string v5, "java.util.Collections.si\u2026(pair.first, pair.second)"
2020-05-07 23:11:04 +00:00
invoke-static {v4, v5}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-04-18 17:44:22 +00:00
const-string v5, "Failed to parse RTC endpoint"
invoke-virtual {v3, v5, v0, v4}, Lcom/discord/utilities/logging/Logger;->e(Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;)V
:goto_3
2020-05-07 23:11:04 +00:00
new-instance v0, Lf/a/g/p/a;
2020-04-18 17:44:22 +00:00
iget-object v8, v2, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
iget-object v3, v2, Lcom/discord/rtcconnection/RtcConnection;->B:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
invoke-interface {v3}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->d()Ljava/util/concurrent/ExecutorService;
move-result-object v3
iget-object v10, v2, Lcom/discord/rtcconnection/RtcConnection;->D:Lcom/discord/utilities/time/Clock;
move-object v4, v0
move-object v5, v9
move-object v9, v3
2020-05-07 23:11:04 +00:00
invoke-direct/range {v4 .. v10}, Lf/a/g/p/a;-><init>(Ljava/lang/String;Ljava/lang/String;Ljavax/net/ssl/SSLSocketFactory;Lcom/discord/utilities/logging/Logger;Ljava/util/concurrent/ExecutorService;Lcom/discord/utilities/time/Clock;)V
2020-04-18 17:44:22 +00:00
2020-05-07 23:11:04 +00:00
iget-object v3, v2, Lcom/discord/rtcconnection/RtcConnection;->t:Lf/a/g/m;
2020-04-18 17:44:22 +00:00
if-eqz v3, :cond_9
2020-05-07 23:11:04 +00:00
iget-object v4, v0, Lf/a/g/p/a;->p:Ljava/util/List;
2020-04-18 17:44:22 +00:00
invoke-interface {v4, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
2020-05-07 23:11:04 +00:00
invoke-virtual {v0}, Lf/a/g/p/a;->b()Z
2020-04-18 17:44:22 +00:00
2020-05-07 23:11:04 +00:00
iput-object v0, v2, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/g/p/a;
2020-04-18 17:44:22 +00:00
:goto_4
2020-04-08 16:24:01 +00:00
return-void
2020-04-18 17:44:22 +00:00
:cond_9
const-string v0, "listener"
2020-05-07 23:11:04 +00:00
invoke-static {v0}, Ly/v/b/j;->a(Ljava/lang/String;)V
2020-04-18 17:44:22 +00:00
throw v11
2020-02-20 19:33:18 +00:00
.end method