3494 lines
81 KiB
Smali
3494 lines
81 KiB
Smali
.class public final Lcom/discord/utilities/icon/IconUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "IconUtils.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final DEFAULT_ICON:Ljava/lang/String; = "asset://asset/images/default_icon.jpg"
|
|
|
|
.field public static final DEFAULT_ICON_BLURPLE:Ljava/lang/String; = "asset://asset/images/default_icon_selected.jpg"
|
|
|
|
.field public static final GROUP_DM_DEFAULT_ICONS:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final IMAGE_SIZE_ASSET_DEFAULT_PX:I = 0xa0
|
|
|
|
.field public static final INSTANCE:Lcom/discord/utilities/icon/IconUtils;
|
|
|
|
.field public static final MEDIA_PROXY_SIZES:[Ljava/lang/Integer;
|
|
|
|
.field public static final UNRESTRICTED:I = 0x7f07005d
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 8
|
|
|
|
new-instance v0, Lcom/discord/utilities/icon/IconUtils;
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/icon/IconUtils;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/utilities/icon/IconUtils;->INSTANCE:Lcom/discord/utilities/icon/IconUtils;
|
|
|
|
new-instance v0, Lkotlin/ranges/IntRange;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x7
|
|
|
|
invoke-direct {v0, v1, v2}, Lkotlin/ranges/IntRange;-><init>(II)V
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
const/16 v4, 0xa
|
|
|
|
invoke-static {v0, v4}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v5
|
|
|
|
invoke-direct {v3, v5}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
move-object v5, v0
|
|
|
|
check-cast v5, Lj0/i/q;
|
|
|
|
invoke-virtual {v5}, Lj0/i/q;->nextInt()I
|
|
|
|
move-result v5
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "asset://asset/images/group_dm_icon_"
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v5, ".png"
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sput-object v3, Lcom/discord/utilities/icon/IconUtils;->GROUP_DM_DEFAULT_ICONS:Ljava/util/List;
|
|
|
|
const/16 v0, 0x12
|
|
|
|
new-array v0, v0, [Ljava/lang/Integer;
|
|
|
|
const/16 v3, 0x10
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/16 v5, 0x14
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/16 v5, 0x20
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
const/16 v5, 0x28
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x4
|
|
|
|
const/16 v5, 0x40
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x5
|
|
|
|
const/16 v5, 0x50
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/4 v1, 0x6
|
|
|
|
const/16 v5, 0x80
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v1
|
|
|
|
const/16 v1, 0xa0
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/16 v1, 0x8
|
|
|
|
const/16 v2, 0x100
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0x9
|
|
|
|
const/16 v2, 0x140
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0x200
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
const/16 v1, 0xb
|
|
|
|
const/16 v2, 0x280
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0xc
|
|
|
|
const/16 v2, 0x400
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0xd
|
|
|
|
const/16 v2, 0x500
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0xe
|
|
|
|
const/16 v2, 0x600
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0xf
|
|
|
|
const/16 v2, 0x800
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/16 v1, 0xc00
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v3
|
|
|
|
const/16 v1, 0x11
|
|
|
|
const/16 v2, 0x1000
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/utilities/icon/IconUtils;->MEDIA_PROXY_SIZES:[Ljava/lang/Integer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic getApplicationIcon$default(Lcom/discord/utilities/icon/IconUtils;JLjava/lang/String;IILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/16 p4, 0xa0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->getApplicationIcon(JLjava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getAssetImage$default(Lcom/discord/utilities/icon/IconUtils;Ljava/lang/Long;Ljava/lang/String;IILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/16 p3, 0xa0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/utilities/icon/IconUtils;->getAssetImage(Ljava/lang/Long;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getAssetPlatformUrl(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const v1, -0x77221946
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "spotify"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const-string p1, "https://i.scdn.co/image/"
|
|
|
|
invoke-static {p1, p2}, Lf/e/b/a/a;->p(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic getBannerForGuild$default(Lcom/discord/utilities/icon/IconUtils;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/icon/IconUtils;->getBannerForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getBannerForGuild$default(Lcom/discord/utilities/icon/IconUtils;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/utilities/icon/IconUtils;->getBannerForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForChannel(JLjava/lang/String;IZLjava/lang/Integer;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v2, 0x1
|
|
|
|
:goto_1
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 p2, 0x3
|
|
|
|
if-ne p3, p2, :cond_2
|
|
|
|
const/16 p2, 0x16
|
|
|
|
ushr-long/2addr p0, p2
|
|
|
|
const-wide p2, 0x14aa2cab000L
|
|
|
|
add-long/2addr p0, p2
|
|
|
|
sget-object p2, Lcom/discord/utilities/icon/IconUtils;->GROUP_DM_DEFAULT_ICONS:Ljava/util/List;
|
|
|
|
invoke-interface {p2}, Ljava/util/List;->size()I
|
|
|
|
move-result p2
|
|
|
|
int-to-long p2, p2
|
|
|
|
rem-long/2addr p0, p2
|
|
|
|
long-to-int p1, p0
|
|
|
|
sget-object p0, Lcom/discord/utilities/icon/IconUtils;->GROUP_DM_DEFAULT_ICONS:Ljava/util/List;
|
|
|
|
invoke-interface {p0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Ljava/lang/String;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
if-eqz p4, :cond_3
|
|
|
|
const-string p0, ""
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 p0, 0x0
|
|
|
|
:goto_2
|
|
return-object p0
|
|
|
|
:cond_4
|
|
const-string p3, "https://cdn.discordapp.com"
|
|
|
|
invoke-interface {p3}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result p3
|
|
|
|
if-nez p3, :cond_5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_5
|
|
if-eqz v0, :cond_6
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, "https://discord.com/api//channels/"
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, "/icons/"
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, ".jpg"
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
sget-object p3, Lcom/discord/utilities/icon/IconUtils;->INSTANCE:Lcom/discord/utilities/icon/IconUtils;
|
|
|
|
new-instance p4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "https://cdn.discordapp.com/channel-icons/"
|
|
|
|
invoke-virtual {p4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p4, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2f
|
|
|
|
invoke-virtual {p4, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, ".webp"
|
|
|
|
invoke-virtual {p4, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p3, p0, p5}, Lcom/discord/utilities/icon/IconUtils;->withSize(Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_3
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForChannel(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ne v1, v2, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
const/4 v1, 0x6
|
|
|
|
invoke-static {p0, p1, v0, v1, v0}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
|
|
:cond_2
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
move-object v5, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForChannel(JLjava/lang/String;IZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getForChannel$default(JLjava/lang/String;IZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 6
|
|
|
|
and-int/lit8 p6, p6, 0x10
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const/4 p5, 0x0
|
|
|
|
:cond_0
|
|
move-object v5, p5
|
|
|
|
move-wide v0, p0
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
move v4, p4
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForChannel(JLjava/lang/String;IZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getForChannel$default(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_0
|
|
invoke-static {p0, p1}, Lcom/discord/utilities/icon/IconUtils;->getForChannel(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Lcom/discord/models/domain/ModelGuild;)Ljava/lang/String;
|
|
.locals 6
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0xe
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0xc
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;Z)Ljava/lang/String;
|
|
.locals 6
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0x8
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
invoke-static {v1, v0, p1, p2, p3}, Lcom/discord/utilities/icon/IconUtils;->getForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Ljava/lang/Long;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x10
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_8
|
|
|
|
if-eqz p0, :cond_8
|
|
|
|
const-string v0, "ICON_UNSET"
|
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_0
|
|
const/4 p2, 0x0
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p4
|
|
|
|
invoke-static {p4}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result p4
|
|
|
|
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object p4, p2
|
|
|
|
:goto_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "https://cdn.discordapp.com"
|
|
|
|
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v1, :cond_3
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "https://discord.com/api//guilds/"
|
|
|
|
invoke-virtual {p3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, "/icons/"
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, ".jpg"
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/4 p3, 0x2
|
|
|
|
const-string v1, "a_"
|
|
|
|
invoke-static {p1, v1, v2, p3}, Lj0/t/k;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
const-string p3, "gif"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-static {}, Lj0/n/c/h;->throwNpe()V
|
|
|
|
throw p2
|
|
|
|
:cond_5
|
|
const-string p3, "webp"
|
|
|
|
:goto_2
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "https://cdn.discordapp.com/icons/"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2f
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2e
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_3
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
if-eqz p4, :cond_6
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p0
|
|
|
|
const-string p1, "?size="
|
|
|
|
invoke-static {p1, p0}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_6
|
|
if-eqz p2, :cond_7
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
const-string p2, ""
|
|
|
|
:goto_4
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_8
|
|
:goto_5
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public static synthetic getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
move-object p1, v0
|
|
|
|
:cond_0
|
|
and-int/lit8 p5, p4, 0x4
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p4, p4, 0x8
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
move-object p3, v0
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3}, Lcom/discord/utilities/icon/IconUtils;->getForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getForGuild$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
move-object p2, v0
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x8
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x10
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
move-object p4, v0
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->getForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Lcom/discord/models/domain/ModelUser;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x6
|
|
|
|
invoke-static {p0, v0, v1, v2, v1}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Lcom/discord/models/domain/ModelUser;Z)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-static {p0, p1, v0, v1, v0}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getAvatar()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object v2, v0
|
|
|
|
:goto_1
|
|
if-eqz p0, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getDiscriminator()I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
invoke-static {v1, v2, v0, p1, p2}, Lcom/discord/utilities/icon/IconUtils;->getForUser(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Ljava/lang/Long;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Z)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x10
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getForUser(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const-string v0, ".jpg"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_4
|
|
|
|
const-string p2, "https://cdn.discordapp.com"
|
|
|
|
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p2, :cond_2
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p3, "https://discord.com/api//users/"
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, "/avatars/"
|
|
|
|
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
if-eqz p3, :cond_3
|
|
|
|
const/4 p2, 0x2
|
|
|
|
const-string p3, "a_"
|
|
|
|
invoke-static {p1, p3, v1, p2}, Lj0/t/k;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
const-string p2, "gif"
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string p2, "webp"
|
|
|
|
:goto_1
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "https://cdn.discordapp.com/avatars/"
|
|
|
|
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2f
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2e
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Lcom/discord/utilities/icon/IconUtils;->INSTANCE:Lcom/discord/utilities/icon/IconUtils;
|
|
|
|
invoke-direct {p1, p0, p4}, Lcom/discord/utilities/icon/IconUtils;->withSize(Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_2
|
|
return-object p0
|
|
|
|
:cond_4
|
|
if-eqz p2, :cond_5
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p0
|
|
|
|
rem-int/lit8 v1, p0, 0x5
|
|
|
|
:cond_5
|
|
const-string p0, "asset://asset/images/default_avatar_"
|
|
|
|
invoke-static {p0, v1, v0}, Lf/e/b/a/a;->i(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getForUser$default(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p3, 0x2
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p3, p3, 0x4
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_1
|
|
invoke-static {p0, p1, p2}, Lcom/discord/utilities/icon/IconUtils;->getForUser(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getForUser$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
move-object p2, v0
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x8
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x10
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
move-object p4, v0
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->getForUser(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getGiftSplashUrl$default(Lcom/discord/utilities/icon/IconUtils;JLjava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->getGiftSplashUrl(JLjava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getGuildSplashUrl$default(Lcom/discord/utilities/icon/IconUtils;JLjava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->getGuildSplashUrl(JLjava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getGuildSplashUrl$default(Lcom/discord/utilities/icon/IconUtils;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/icon/IconUtils;->getGuildSplashUrl(Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final getMediaProxySize(I)I
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/discord/utilities/icon/IconUtils;->MEDIA_PROXY_SIZES:[Ljava/lang/Integer;
|
|
|
|
array-length v1, v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v1, :cond_2
|
|
|
|
aget-object v4, v0, v3
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v5
|
|
|
|
if-lt v5, p0, :cond_0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v5, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v5, :cond_1
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance p0, Ljava/util/NoSuchElementException;
|
|
|
|
const-string v0, "Array contains no element matching the predicate."
|
|
|
|
invoke-direct {p0, v0}, Ljava/util/NoSuchElementException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0xc
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;ILcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;I)V
|
|
.locals 6
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0x8
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;ILcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;ILcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
.locals 9
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-static {p1, v0, v1, v0}, Lcom/discord/utilities/icon/IconUtils;->getForChannel$default(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v7, 0x8
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v2, p0
|
|
|
|
move v4, p2
|
|
|
|
move-object v6, p3
|
|
|
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, v0}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p0, "changeDetector"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p0, "imageView"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;ZILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;I)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;ZILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x10
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;ZILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;Z)V
|
|
.locals 8
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0xa
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p1
|
|
|
|
move v2, p4
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v5, 0x8
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move v2, p2
|
|
|
|
move-object v4, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, v7}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string v0, "changeDetector"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_2
|
|
const-string v0, "imageView"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;)V
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;I)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x10
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
.locals 12
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lcom/discord/utilities/images/MGImages$ChangeDetector;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
move-object v9, p0
|
|
|
|
move-object v10, p1
|
|
|
|
move v0, p2
|
|
|
|
const/4 v11, 0x0
|
|
|
|
if-eqz v9, :cond_5
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
const v1, 0x7f07005d
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v11
|
|
|
|
:goto_0
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p1, v2, v0, v1, v11}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v3, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
move v4, v0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v4, 0x0
|
|
|
|
:goto_2
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v7, 0x10
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move v2, v3
|
|
|
|
move v3, v4
|
|
|
|
move v4, v5
|
|
|
|
move-object v5, p3
|
|
|
|
move-object/from16 v6, p4
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
if-eqz v10, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
:cond_3
|
|
invoke-virtual {p0, v11}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string v0, "changeDetector"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v11
|
|
|
|
:cond_5
|
|
const-string v0, "imageView"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v11
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;I)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x18
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;II)V
|
|
.locals 9
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x70
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;IIZ)V
|
|
.locals 9
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x60
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move v3, p3
|
|
|
|
move v4, p4
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;)V
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Ljava/lang/String;",
|
|
"IIZ",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x40
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move v3, p3
|
|
|
|
move v4, p4
|
|
|
|
move-object v5, p5
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Ljava/lang/String;",
|
|
"IIZ",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lcom/discord/utilities/images/MGImages$ChangeDetector;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v9, 0x80
|
|
|
|
const/4 v10, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move v3, p2
|
|
|
|
move v4, p3
|
|
|
|
move v5, p4
|
|
|
|
move-object/from16 v6, p5
|
|
|
|
move-object/from16 v7, p6
|
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;Ljava/util/List;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v1, "changeDetector"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string v1, "imageView"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Ljava/lang/String;",
|
|
"I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x10
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final setIcon(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
.locals 8
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/ImageView;",
|
|
"Ljava/lang/String;",
|
|
"I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/facebook/imagepipeline/request/ImageRequestBuilder;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lcom/discord/utilities/images/MGImages$ChangeDetector;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v6, p3
|
|
|
|
move-object v7, p4
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p0, "changeDetector"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p0, "imageView"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static synthetic setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;ILcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const p2, 0x7f07005d
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x8
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
sget-object p3, Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;->INSTANCE:Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;
|
|
|
|
:cond_1
|
|
invoke-static {p0, p1, p2, p3}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelChannel;ILcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;ZILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const p2, 0x7f07005d
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x8
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
sget-object p3, Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;->INSTANCE:Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x10
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelGuild;ILcom/discord/utilities/images/MGImages$ChangeDetector;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const p2, 0x7f07005d
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x8
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x10
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
sget-object p4, Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;->INSTANCE:Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
.locals 7
|
|
|
|
and-int/lit8 p8, p7, 0x10
|
|
|
|
if-eqz p8, :cond_0
|
|
|
|
const/4 p4, 0x1
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v4, p4
|
|
|
|
:goto_0
|
|
and-int/lit8 p4, p7, 0x20
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p5, 0x0
|
|
|
|
:cond_1
|
|
move-object v5, p5
|
|
|
|
and-int/lit8 p4, p7, 0x40
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
sget-object p6, Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;->INSTANCE:Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;
|
|
|
|
:cond_2
|
|
move-object v6, p6
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const p2, 0x7f07005d
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x8
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x10
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
sget-object p4, Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;->INSTANCE:Lcom/discord/utilities/images/MGImages$AlwaysUpdateChangeDetector;
|
|
|
|
:cond_2
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/icon/IconUtils;->setIcon(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final withSize(Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const-string v0, "?size="
|
|
|
|
invoke-static {p1, v0}, Lf/e/b/a/a;->H(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getApplicationIcon(JLjava/lang/String;I)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "https://cdn.discordapp.com/app-icons/"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ".webp?size="
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "imageId"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final getAssetImage(Ljava/lang/Long;Ljava/lang/String;I)Ljava/lang/String;
|
|
.locals 5
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"DefaultLocale"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
const/16 v1, 0x3a
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {p2, v1, v2, v3}, Lj0/t/p;->contains$default(Ljava/lang/CharSequence;CZI)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
new-array p3, p1, [C
|
|
|
|
aput-char v1, p3, v2
|
|
|
|
invoke-static {p2, p3, v2, v3, v3}, Lj0/t/p;->split$default(Ljava/lang/CharSequence;[CZII)Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Ljava/lang/String;
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-virtual {p3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
const-string v0, "(this as java.lang.String).toLowerCase()"
|
|
|
|
invoke-static {p3, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
|
|
invoke-direct {p0, p3, p1}, Lcom/discord/utilities/icon/IconUtils;->getAssetPlatformUrl(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
const-string p2, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
if-eqz p1, :cond_2
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "https://cdn.discordapp.com/app-assets/"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ".jpg?size="
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_3
|
|
const-string p1, "imageId"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getBannerForGuild(Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getBanner()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v1, v0, p2}, Lcom/discord/utilities/icon/IconUtils;->getBannerForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getBannerForGuild(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_0
|
|
if-eqz p3, :cond_1
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p3
|
|
|
|
invoke-static {p3}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result p3
|
|
|
|
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object p3, v0
|
|
|
|
:goto_0
|
|
const-string v1, "https://cdn.discordapp.com"
|
|
|
|
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
const-string v2, ".jpg"
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "https://discord.com/api//guilds/"
|
|
|
|
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "/banners/"
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "https://cdn.discordapp.com/banners/"
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
const-string p2, "?size="
|
|
|
|
invoke-static {p2, p1}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_4
|
|
if-eqz v0, :cond_5
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const-string v0, ""
|
|
|
|
:goto_2
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_3
|
|
return-object p1
|
|
|
|
:cond_6
|
|
:goto_4
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getGiftSplashUrl(JLjava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 8
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
if-eqz p4, :cond_8
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
sget-object v1, Lcom/discord/utilities/icon/IconUtils;->MEDIA_PROXY_SIZES:[Ljava/lang/Integer;
|
|
|
|
array-length v2, v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
if-ge v4, v2, :cond_3
|
|
|
|
aget-object v5, v1, v4
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v7
|
|
|
|
invoke-static {v6, v7}, Lj0/n/c/h;->compare(II)I
|
|
|
|
move-result v6
|
|
|
|
if-lez v6, :cond_1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v6, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v6, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
move-object v5, v0
|
|
|
|
:goto_2
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
sget-object p4, Lcom/discord/utilities/icon/IconUtils;->MEDIA_PROXY_SIZES:[Ljava/lang/Integer;
|
|
|
|
if-eqz p4, :cond_7
|
|
|
|
array-length v0, p4
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:cond_5
|
|
if-nez v3, :cond_6
|
|
|
|
invoke-static {p4}, Lf/n/a/k/a;->getLastIndex([Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
aget-object p4, p4, v0
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p4
|
|
|
|
:goto_3
|
|
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
new-instance p1, Ljava/util/NoSuchElementException;
|
|
|
|
const-string p2, "Array is empty."
|
|
|
|
invoke-direct {p1, p2}, Ljava/util/NoSuchElementException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
const-string p1, "$this$last"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_8
|
|
:goto_4
|
|
const-string p4, "?"
|
|
|
|
invoke-static {p4}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p4
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->intValue()I
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "size="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "&keep_aspect_ratio=true"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
goto :goto_5
|
|
|
|
:cond_9
|
|
const-string v0, "keep_aspect_ratio=true"
|
|
|
|
:goto_5
|
|
invoke-virtual {p4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "https://cdn.discordapp.com/app-icons/"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ".webp"
|
|
|
|
invoke-static {v0, p1, p4}, Lf/e/b/a/a;->v(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getGuildSplashUrl(JLjava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p4
|
|
|
|
invoke-static {p4}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result p4
|
|
|
|
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p4, v0
|
|
|
|
:goto_0
|
|
const-string v1, "https://cdn.discordapp.com"
|
|
|
|
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
const-string v2, ".jpg"
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "https://discord.com/api//guilds/"
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "/splashes/"
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "https://cdn.discordapp.com/splashes/"
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_2
|
|
invoke-static {p1}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
const-string p3, "?size="
|
|
|
|
invoke-static {p3, p2}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_3
|
|
if-eqz v0, :cond_4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const-string v0, ""
|
|
|
|
:goto_3
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_5
|
|
const-string p1, "splashHash"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getGuildSplashUrl(Lcom/discord/models/domain/ModelGuild;Ljava/lang/Integer;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getSplash()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-nez v1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getSplash()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, v0, v1, p1, p2}, Lcom/discord/utilities/icon/IconUtils;->getGuildSplashUrl(JLjava/lang/String;Ljava/lang/Integer;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getResourceUriString(Landroid/content/Context;I)Ljava/lang/String;
|
|
.locals 1
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "android.resource://"
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2f
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final getVoiceRegionIconResourceId(Ljava/lang/String;)I
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
sparse-switch v0, :sswitch_data_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:sswitch_0
|
|
const-string v0, "frankfurt"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f08044e
|
|
|
|
goto/16 :goto_3
|
|
|
|
:sswitch_1
|
|
const-string v0, "japan"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f08045b
|
|
|
|
goto/16 :goto_3
|
|
|
|
:sswitch_2
|
|
const-string v0, "amsterdam"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f08045e
|
|
|
|
goto/16 :goto_3
|
|
|
|
:sswitch_3
|
|
const-string v0, "us-west"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:sswitch_4
|
|
const-string v0, "us-east"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_5
|
|
const-string v0, "hongkong"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f080457
|
|
|
|
goto/16 :goto_3
|
|
|
|
:sswitch_6
|
|
const-string v0, "sydney"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f08044a
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_7
|
|
const-string v0, "russia"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f080463
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_8
|
|
const-string v0, "london"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f080456
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_9
|
|
const-string v0, "brazil"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f080461
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_a
|
|
const-string v0, "us-central"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_b
|
|
const-string v0, "eu-west"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:sswitch_c
|
|
const-string v0, "singapore"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const p1, 0x7f080464
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_d
|
|
const-string v0, "us-south"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
:goto_0
|
|
const p1, 0x7f080451
|
|
|
|
goto :goto_3
|
|
|
|
:sswitch_e
|
|
const-string v0, "eu-central"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
:goto_1
|
|
const p1, 0x7f080453
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
:goto_2
|
|
const p1, 0x7f080469
|
|
|
|
:goto_3
|
|
return p1
|
|
|
|
:sswitch_data_0
|
|
.sparse-switch
|
|
-0x7183d2a8 -> :sswitch_e
|
|
-0x6f570222 -> :sswitch_d
|
|
-0x59aa9cdc -> :sswitch_c
|
|
-0x56d1db54 -> :sswitch_b
|
|
-0x55759eba -> :sswitch_a
|
|
-0x5250ac94 -> :sswitch_9
|
|
-0x4164e5e8 -> :sswitch_8
|
|
-0x36d0c7c5 -> :sswitch_7
|
|
-0x34ea75dc -> :sswitch_6
|
|
-0x1b1f38e3 -> :sswitch_5
|
|
-0xbe01634 -> :sswitch_4
|
|
-0xbd7d882 -> :sswitch_3
|
|
-0x80e73aa -> :sswitch_2
|
|
0x6038406 -> :sswitch_1
|
|
0x228fb3e3 -> :sswitch_0
|
|
.end sparse-switch
|
|
.end method
|