.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 ()V .locals 1 new-instance v0, Lcom/discord/utilities/voice/VoiceViewUtils; invoke-direct {v0}, Lcom/discord/utilities/voice/VoiceViewUtils;->()V sput-object v0, Lcom/discord/utilities/voice/VoiceViewUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils; return-void .end method .method public constructor ()V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()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 2 if-eqz p2, :cond_1 invoke-virtual {p2}, Lcom/discord/utilities/streams/StreamContext;->isCurrentUserParticipating()Z move-result v0 const/4 v1, 0x1 if-ne v0, v1, :cond_1 invoke-virtual {p2}, Lcom/discord/utilities/streams/StreamContext;->isSelfStream()Z move-result p1 if-eqz p1, :cond_0 const p1, 0x7f080276 goto :goto_0 :cond_0 const p1, 0x7f080277 goto :goto_0 :cond_1 if-eqz p1, :cond_2 const p1, 0x7f08046a goto :goto_0 :cond_2 const p1, 0x7f080278 :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 const-string v0, "context" invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f; if-ne p2, v0, :cond_2 if-eqz p3, :cond_2 invoke-virtual {p3}, Lcom/discord/utilities/streams/StreamContext;->isCurrentUserParticipating()Z move-result v0 const/4 v1, 0x1 if-ne v0, v1, :cond_2 invoke-virtual {p3}, Lcom/discord/utilities/streams/StreamContext;->isSelfStream()Z move-result p2 if-eqz p2, :cond_0 const p2, 0x7f1204ec invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String; move-result-object p1 const-string p2, "context.getString(R.stri\u2026us_stream_self_connected)" invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V goto :goto_1 :cond_0 const p2, 0x7f1204eb 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_1 goto :goto_0 :cond_1 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}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V :goto_1 return-object p1 :cond_2 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$c;->a:Lcom/discord/rtcconnection/RtcConnection$State$c; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_3 const p2, 0x7f1204e5 goto :goto_3 :cond_3 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$e;->a:Lcom/discord/rtcconnection/RtcConnection$State$e; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_4 const p2, 0x7f1204e8 goto :goto_3 :cond_4 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$b;->a:Lcom/discord/rtcconnection/RtcConnection$State$b; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_5 const p2, 0x7f1204e3 goto :goto_3 :cond_5 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$a;->a:Lcom/discord/rtcconnection/RtcConnection$State$a; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_6 const p2, 0x7f1204e2 goto :goto_3 :cond_6 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_7 const p2, 0x7f1204e9 goto :goto_3 :cond_7 sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_9 if-eqz p4, :cond_8 const p2, 0x7f1204ed goto :goto_3 :cond_8 const p2, 0x7f1204ee goto :goto_3 :cond_9 instance-of p3, p2, Lcom/discord/rtcconnection/RtcConnection$State$d; if-eqz p3, :cond_a goto :goto_2 :cond_a sget-object p3, Lcom/discord/rtcconnection/RtcConnection$State$h;->a:Lcom/discord/rtcconnection/RtcConnection$State$h; invoke-static {p2, p3}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p3 if-eqz p3, :cond_b goto :goto_2 :cond_b if-nez p2, :cond_c :goto_2 const p2, 0x7f1204e6 :goto_3 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}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object p1 :cond_c new-instance p1, Lkotlin/NoWhenBranchMatchedException; invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;->()V 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 const-string v0, "context" invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f; invoke-static {p1, v0}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 const v1, 0x7f06025d const v2, 0x7f060240 if-eqz v0, :cond_4 const p1, 0x7f060206 if-nez p2, :cond_0 goto :goto_0 :cond_0 invoke-virtual {p2}, Ljava/lang/Enum;->ordinal()I move-result p2 if-eqz p2, :cond_3 const/4 v0, 0x1 if-eq p2, v0, :cond_2 const/4 v0, 0x2 if-eq p2, v0, :cond_1 const/4 v0, 0x3 if-eq p2, v0, :cond_3 :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, v1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I move-result p1 goto :goto_1 :cond_2 invoke-static {p3, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I move-result p1 goto :goto_1 :cond_3 invoke-static {p3, p1}, 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}, Lc0/n/c/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}, Lc0/n/c/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}, Lc0/n/c/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}, Lc0/n/c/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}, Lc0/n/c/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}, Lc0/n/c/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 .end method .method public final getIsSoundshareSupported()Z .locals 2 sget v0, Landroid/os/Build$VERSION;->SDK_INT:I const/16 v1, 0x1d if-lt v0, v1, :cond_0 const/4 v0, 0x1 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 return v0 .end method .method public final getQualityIndicator(Lcom/discord/rtcconnection/RtcConnection$Quality;)I .locals 2 .annotation build Landroidx/annotation/DrawableRes; .end annotation const v0, 0x7f080473 if-nez p1, :cond_0 goto :goto_0 :cond_0 invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I move-result p1 if-eqz p1, :cond_4 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 goto :goto_0 :cond_1 const v0, 0x7f080472 goto :goto_0 :cond_2 const v0, 0x7f080470 goto :goto_0 :cond_3 const v0, 0x7f080471 :cond_4 :goto_0 return v0 .end method