158 lines
3.2 KiB
Smali
158 lines
3.2 KiB
Smali
.class public final Lcom/discord/utilities/billing/PaymentSourceUtilsKt;
|
|
.super Ljava/lang/Object;
|
|
.source "PaymentSourceUtils.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final getPaymentSourceIcon(Lcom/discord/models/domain/ModelPaymentSource;)I
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
|
|
const-string v0, "paymentSource"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
instance-of v0, p0, Lcom/discord/models/domain/ModelPaymentSource$ModelPaymentSourcePaypal;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const p0, 0x7f080203
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
instance-of v0, p0, Lcom/discord/models/domain/ModelPaymentSource$ModelPaymentSourceCard;
|
|
|
|
const v1, 0x7f080201
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
check-cast p0, Lcom/discord/models/domain/ModelPaymentSource$ModelPaymentSourceCard;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelPaymentSource$ModelPaymentSourceCard;->getBrand()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "(this as java.lang.String).toLowerCase()"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
sparse-switch v0, :sswitch_data_0
|
|
|
|
goto :goto_2
|
|
|
|
:sswitch_0
|
|
const-string v0, "master-card"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:sswitch_1
|
|
const-string v0, "discover"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const p0, 0x7f080200
|
|
|
|
return p0
|
|
|
|
:sswitch_2
|
|
const-string v0, "american-express"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_3
|
|
const-string v0, "visa"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const p0, 0x7f080204
|
|
|
|
return p0
|
|
|
|
:sswitch_4
|
|
const-string v0, "amex"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
:goto_0
|
|
const p0, 0x7f0801ff
|
|
|
|
return p0
|
|
|
|
:sswitch_5
|
|
const-string v0, "mastercard"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
:goto_1
|
|
const p0, 0x7f080202
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
:goto_2
|
|
return v1
|
|
|
|
:cond_2
|
|
new-instance p0, Lkotlin/r;
|
|
|
|
const-string v0, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
invoke-direct {p0, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_3
|
|
return v1
|
|
|
|
nop
|
|
|
|
:sswitch_data_0
|
|
.sparse-switch
|
|
-0x79845b8e -> :sswitch_5
|
|
0x2dbddf -> :sswitch_4
|
|
0x373c41 -> :sswitch_3
|
|
0x3a3b6c3 -> :sswitch_2
|
|
0x104877e9 -> :sswitch_1
|
|
0x46009f9b -> :sswitch_0
|
|
.end sparse-switch
|
|
.end method
|