243 lines
5.9 KiB
Smali
243 lines
5.9 KiB
Smali
.class public final Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetUserPhoneAdd.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getCountryCodeWithPrefix(Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;->getCountryCodeWithPrefix(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getFormattedPhoneNumber(Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd$Companion;->getFormattedPhoneNumber(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getCountryCodeWithPrefix(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
const-string v0, "+"
|
|
|
|
const-string v1, ""
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x4
|
|
|
|
invoke-static {p1, v0, v1, v2, v3}, Lj0/t/k;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-lez v1, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_0
|
|
if-eqz v2, :cond_1
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const/16 v2, 0x2b
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
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
|
|
|
|
:cond_1
|
|
invoke-static {v0, p1}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/2addr p1, v3
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getFormattedPhoneNumber(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 5
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "-"
|
|
|
|
const-string v2, ""
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
invoke-static {p1, v1, v2, v3, v4}, Lj0/t/k;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x6
|
|
|
|
const/16 v3, 0x2d
|
|
|
|
if-le v1, v2, :cond_0
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->charAt(I)C
|
|
|
|
move-result v1
|
|
|
|
if-eq v1, v3, :cond_0
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->insert(IC)Ljava/lang/StringBuilder;
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-le v1, v2, :cond_1
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->charAt(I)C
|
|
|
|
move-result v1
|
|
|
|
if-eq v1, v3, :cond_1
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->insert(IC)Ljava/lang/StringBuilder;
|
|
|
|
:cond_1
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, p1}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final launch(Landroid/content/Context;Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Mode;)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
sget-object v0, Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase;->Companion:Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Companion;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, p2, v1, v2, v2}, Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Companion;->getLaunchIntent(Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Mode;ZZZ)Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Mode;->NO_HISTORY_FROM_USER_SETTINGS:Lcom/discord/widgets/user/account/WidgetUserAccountVerifyBase$Mode;
|
|
|
|
if-ne p2, v1, :cond_0
|
|
|
|
const/high16 p2, 0x40000000 # 2.0f
|
|
|
|
invoke-virtual {v0, p2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
:cond_0
|
|
const-class p2, Lcom/discord/widgets/user/phone/WidgetUserPhoneAdd;
|
|
|
|
invoke-static {p1, p2, v0}, Lf/a/b/m;->e(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "mode"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|