2020-11-12 02:11:44 +00:00
|
|
|
.class public Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;
|
|
|
|
.super Lcom/discord/app/AppDialog;
|
|
|
|
.source "WidgetServerSettingsSecurity.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/servers/WidgetServerSettingsSecurity;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "ToggleMfaDialog"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public static final ARG_GUILD_ID:Ljava/lang/String; = "ARG_GUILD_ID"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public static final ARG_MFA_ENABLED:Ljava/lang/String; = "ARG_MFA_ENABLED"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public cancelButton:Lcom/google/android/material/button/MaterialButton;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public codeEditText:Lcom/google/android/material/textfield/TextInputLayout;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public confirmButton:Lcom/google/android/material/button/MaterialButton;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppDialog;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic access$100(Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;JZ)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->configure(JZ)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private configure(JZ)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->confirmButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v1, 0x7f1205f1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-11-16 01:00:50 +00:00
|
|
|
const v1, 0x7f12067f
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->confirmButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v2, 0x7f060238
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-11-16 01:00:50 +00:00
|
|
|
const v2, 0x7f060200
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-static {v1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/google/android/material/button/MaterialButton;->setBackgroundTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->confirmButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
new-instance v1, Lf/a/n/e/m2;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-direct {v1, p0, p3, p1, p2}, Lf/a/n/e/m2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;ZJ)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->cancelButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
new-instance p2, Lf/a/n/e/n2;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-direct {p2, p0}, Lf/a/n/e/n2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static show(JZLandroidx/fragment/app/FragmentManager;Ljava/lang/String;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "ARG_GUILD_ID"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p0, p1}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V
|
|
|
|
|
|
|
|
const-string p0, "ARG_MFA_ENABLED"
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0, p2}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
new-instance p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, p3, p4}, Lcom/discord/app/AppDialog;->show(Landroidx/fragment/app/FragmentManager;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public synthetic f(ZJLandroid/view/View;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
|
|
|
|
iget-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->codeEditText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
|
|
|
|
invoke-static {p4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getTextOrEmpty(Lcom/google/android/material/textfield/TextInputLayout;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/restapi/RestAPIParams$GuildMFA;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1, p4}, Lcom/discord/restapi/RestAPIParams$GuildMFA;-><init>(ILjava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, p3, v0}, Lcom/discord/utilities/rest/RestAPI;->setMfaLevel(JLcom/discord/restapi/RestAPIParams$GuildMFA;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {}, Lf/a/b/s;->e()Lrx/Observable$c;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p0}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
new-instance p2, Lf/a/n/e/o2;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-direct {p2, p0}, Lf/a/n/e/o2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p2, p0}, Lf/a/b/s;->n(Lrx/functions/Action1;Lcom/discord/app/AppDialog;)Lrx/Observable$c;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.method public synthetic g(Landroid/view/View;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-11-12 02:11:44 +00:00
|
|
|
.method public getContentViewResId()I
|
|
|
|
.locals 1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v0, 0x7f0d0280
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.method public synthetic h(Ljava/lang/Void;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-11-12 02:11:44 +00:00
|
|
|
.method public onDismiss(Landroid/content/DialogInterface;)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # Landroid/content/DialogInterface;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/DialogFragment;->onDismiss(Landroid/content/DialogInterface;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->hideKeyboard()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroid/view/View;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppDialog;->onViewBound(Landroid/view/View;)V
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v0, 0x7f0a08f9
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->codeEditText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v0, 0x7f0a08f6
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->cancelButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
const v0, 0x7f0a08f7
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->confirmButton:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppDialog;->onViewBoundOrOnResume()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->getArgumentsOrDefault()Landroid/os/Bundle;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "ARG_GUILD_ID"
|
|
|
|
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;J)J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->getArgumentsOrDefault()Landroid/os/Bundle;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "ARG_MFA_ENABLED"
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3, v4}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsSecurity$ToggleMfaDialog;->configure(JZ)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|