2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/utilities/view/ToastManager;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ToastManager.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Ljava/io/Closeable;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public toast:Landroid/widget/Toast;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic show$default(Lcom/discord/utilities/view/ToastManager;Landroid/content/Context;IIILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-nez p5, :cond_1
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/utilities/view/ToastManager;->show(Landroid/content/Context;II)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
|
|
|
|
const-string p1, "Super calls with default arguments not supported in this target, function: show"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic show$default(Lcom/discord/utilities/view/ToastManager;Landroid/content/Context;Ljava/lang/CharSequence;IILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-nez p5, :cond_1
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/utilities/view/ToastManager;->show(Landroid/content/Context;Ljava/lang/CharSequence;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
|
|
|
|
const-string p1, "Super calls with default arguments not supported in this target, function: show"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public close()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/view/ToastManager;->toast:Landroid/widget/Toast;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->cancel()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/view/ToastManager;->toast:Landroid/widget/Toast;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final show(Landroid/content/Context;I)V
|
|
|
|
.locals 6
|
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/StringRes;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x4
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
move v2, p2
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/view/ToastManager;->show$default(Lcom/discord/utilities/view/ToastManager;Landroid/content/Context;IIILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final show(Landroid/content/Context;II)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/StringRes;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "context"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/utilities/view/ToastManager;->show(Landroid/content/Context;Ljava/lang/CharSequence;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public show(Landroid/content/Context;Ljava/lang/CharSequence;I)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
|
|
value = {
|
|
|
|
"ShowToast"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "context"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1, p2, p3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "Toast.makeText(context, text, duration)"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/view/ToastManager;->show(Landroid/widget/Toast;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public show(Landroid/widget/Toast;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "newToast"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/view/ToastManager;->toast:Landroid/widget/Toast;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->cancel()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/view/ToastManager;->toast:Landroid/widget/Toast;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|