110 lines
2.8 KiB
Smali
110 lines
2.8 KiB
Smali
.class public final Lcom/discord/utilities/textprocessing/node/UrlNode$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "UrlNode.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/textprocessing/node/UrlNode;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/textprocessing/node/UrlNode$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final convertUrlDomainToAscii(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 5
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
const-string v0, "url"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/net/URL;
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getHost()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1, v1}, Ljava/net/IDN;->toASCII(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Ljava/net/URL;
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getProtocol()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getPort()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getFile()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v1, v2, p1, v3, v4}, Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/net/URL;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p1, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getRef()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/16 v1, 0x23
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->getRef()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "safeUrlStringBuilder.toString()"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|