apkfuckery/com.discord/smali/com/discord/utilities/voice/VoiceViewUtils.smali

509 lines
11 KiB
Smali

.class public final Lcom/discord/utilities/voice/VoiceViewUtils;
.super Ljava/lang/Object;
.source "VoiceViewUtils.kt"
# static fields
.field public static final INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils;
# direct methods
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/discord/utilities/voice/VoiceViewUtils;
invoke-direct {v0}, Lcom/discord/utilities/voice/VoiceViewUtils;-><init>()V
sput-object v0, Lcom/discord/utilities/voice/VoiceViewUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils;
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 getConnectedText$default(Lcom/discord/utilities/voice/VoiceViewUtils;Landroid/content/Context;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/utilities/streams/StreamContext;ZILjava/lang/Object;)Ljava/lang/String;
.locals 0
and-int/lit8 p5, p5, 0x8
if-eqz p5, :cond_0
const/4 p4, 0x0
:cond_0
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/utilities/voice/VoiceViewUtils;->getConnectedText(Landroid/content/Context;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/utilities/streams/StreamContext;Z)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public final getCallIndicatorIcon(ZLcom/discord/utilities/streams/StreamContext;)I
.locals 1
if-eqz p2, :cond_0
invoke-virtual {p2}, Lcom/discord/utilities/streams/StreamContext;->isCurrentUserSpectating()Z
move-result p2
const/4 v0, 0x1
if-ne p2, v0, :cond_0
const p1, 0x7f080272
goto :goto_0
:cond_0
if-eqz p1, :cond_1
const p1, 0x7f080273
goto :goto_0
:cond_1
const p1, 0x7f080274
:goto_0
return p1
.end method
.method public final getConnectedText(Landroid/content/Context;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/utilities/streams/StreamContext;Z)Ljava/lang/String;
.locals 2
if-eqz p1, :cond_c
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
if-ne p2, v0, :cond_1
if-eqz p3, :cond_1
invoke-virtual {p3}, Lcom/discord/utilities/streams/StreamContext;->isCurrentUserSpectating()Z
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_1
const p2, 0x7f120469
new-array p4, v1, [Ljava/lang/Object;
const/4 v0, 0x0
invoke-virtual {p3}, Lcom/discord/utilities/streams/StreamContext;->getUserNickname()Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_0
goto :goto_0
:cond_0
invoke-virtual {p3}, Lcom/discord/utilities/streams/StreamContext;->getUser()Lcom/discord/models/domain/ModelUser;
move-result-object p3
invoke-virtual {p3}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
move-result-object v1
:goto_0
aput-object v1, p4, v0
invoke-virtual {p1, p2, p4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string p2, "context.getString(\n \u2026ext.user.username\n )"
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
:cond_1
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$c;->a:Lcom/discord/rtcconnection/RtcConnection$State$c;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_2
const p2, 0x7f120463
goto :goto_2
:cond_2
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$e;->a:Lcom/discord/rtcconnection/RtcConnection$State$e;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_3
const p2, 0x7f120466
goto :goto_2
:cond_3
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$b;->a:Lcom/discord/rtcconnection/RtcConnection$State$b;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_4
const p2, 0x7f120461
goto :goto_2
:cond_4
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$a;->a:Lcom/discord/rtcconnection/RtcConnection$State$a;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_5
const p2, 0x7f120460
goto :goto_2
:cond_5
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_6
const p2, 0x7f120467
goto :goto_2
:cond_6
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_8
if-eqz p4, :cond_7
const p2, 0x7f12046a
goto :goto_2
:cond_7
const p2, 0x7f12046b
goto :goto_2
:cond_8
instance-of p3, p2, Lcom/discord/rtcconnection/RtcConnection$State$d;
if-eqz p3, :cond_9
goto :goto_1
:cond_9
sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$h;->a:Lcom/discord/rtcconnection/RtcConnection$State$h;
invoke-static {p2, p3}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_a
goto :goto_1
:cond_a
if-nez p2, :cond_b
:goto_1
const p2, 0x7f120464
:goto_2
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object p1
const-string p2, "context.getString(resId)"
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
:cond_b
new-instance p1, Lx/g;
invoke-direct {p1}, Lx/g;-><init>()V
throw p1
:cond_c
const-string p1, "context"
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final getConnectionStatusColor(Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Landroid/content/Context;)I
.locals 3
.annotation build Landroidx/annotation/ColorInt;
.end annotation
if-eqz p3, :cond_c
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
invoke-static {p1, v0}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
const v1, 0x7f06022b
const v2, 0x7f06020e
if-eqz v0, :cond_4
const p1, 0x7f0601d4
if-nez p2, :cond_0
goto :goto_0
:cond_0
sget-object v0, Lcom/discord/utilities/voice/VoiceViewUtils$WhenMappings;->$EnumSwitchMapping$1:[I
invoke-virtual {p2}, Ljava/lang/Enum;->ordinal()I
move-result p2
aget p2, v0, p2
const/4 v0, 0x1
if-eq p2, v0, :cond_3
const/4 v0, 0x2
if-eq p2, v0, :cond_2
const/4 v0, 0x3
if-eq p2, v0, :cond_1
const/4 v0, 0x4
if-eq p2, v0, :cond_1
:goto_0
invoke-static {p3, p1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_1
:cond_1
invoke-static {p3, p1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_1
:cond_2
invoke-static {p3, v1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_1
:cond_3
invoke-static {p3, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
:goto_1
return p1
:cond_4
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$b;->a:Lcom/discord/rtcconnection/RtcConnection$State$b;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_5
goto :goto_2
:cond_5
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$c;->a:Lcom/discord/rtcconnection/RtcConnection$State$c;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_6
goto :goto_2
:cond_6
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$a;->a:Lcom/discord/rtcconnection/RtcConnection$State$a;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_7
goto :goto_2
:cond_7
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_8
:goto_2
invoke-static {p3, v1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_4
:cond_8
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$e;->a:Lcom/discord/rtcconnection/RtcConnection$State$e;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_9
invoke-static {p3, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_4
:cond_9
instance-of p2, p1, Lcom/discord/rtcconnection/RtcConnection$State$d;
if-eqz p2, :cond_a
goto :goto_3
:cond_a
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$State$h;->a:Lcom/discord/rtcconnection/RtcConnection$State$h;
invoke-static {p1, p2}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_b
:goto_3
invoke-static {p3, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
goto :goto_4
:cond_b
invoke-static {p3, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
move-result p1
:goto_4
return p1
:cond_c
const-string p1, "context"
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final getQualityIndicator(Lcom/discord/rtcconnection/RtcConnection$Quality;)I
.locals 2
.annotation build Landroidx/annotation/DrawableRes;
.end annotation
const v0, 0x7f08047b
if-nez p1, :cond_0
goto :goto_0
:cond_0
sget-object v1, Lcom/discord/utilities/voice/VoiceViewUtils$WhenMappings;->$EnumSwitchMapping$0:[I
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
move-result p1
aget p1, v1, p1
const/4 v1, 0x1
if-eq p1, v1, :cond_3
const/4 v1, 0x2
if-eq p1, v1, :cond_2
const/4 v1, 0x3
if-eq p1, v1, :cond_1
const/4 v1, 0x4
goto :goto_0
:cond_1
const v0, 0x7f08047a
goto :goto_0
:cond_2
const v0, 0x7f080478
goto :goto_0
:cond_3
const v0, 0x7f080479
:goto_0
return v0
.end method