283 lines
8 KiB
Smali
283 lines
8 KiB
Smali
.class public final Lcom/discord/views/UploadProgressView;
|
|
.super Landroidx/constraintlayout/widget/ConstraintLayout;
|
|
.source "UploadProgressView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Landroid/widget/ProgressBar;
|
|
|
|
.field public final e:Landroid/widget/TextView;
|
|
|
|
.field public final f:Landroid/widget/TextView;
|
|
|
|
.field public final g:Landroid/widget/ImageView;
|
|
|
|
.field public final h:Landroid/graphics/drawable/Drawable;
|
|
|
|
.field public final i:Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 3
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0d013f
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0729
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.progress_text)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->e:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0728
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.progress_subtext)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->f:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a071f
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.progress_bar)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ProgressBar;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
const p1, 0x7f0a0723
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.progress_file_image)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->g:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f040441
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p0, p2, v0, v1, v2}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/view/View;IIILjava/lang/Object;)I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p1, p2}, Landroidx/core/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->i:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f080186
|
|
|
|
invoke-static {p1, p2}, Landroidx/core/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UploadProgressView;->h:Landroid/graphics/drawable/Drawable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic b(Lcom/discord/views/UploadProgressView;Ljava/lang/String;ILjava/lang/String;I)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p4, 0x4
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/views/UploadProgressView;->a(Ljava/lang/String;ILjava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/lang/String;ILjava/lang/String;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
iget-object v0, p0, Lcom/discord/views/UploadProgressView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-ltz p2, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V
|
|
|
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v2, 0x18
|
|
|
|
if-lt v1, v2, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/ProgressBar;->getProgress()I
|
|
|
|
move-result v1
|
|
|
|
if-lt p2, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {v1, p2, p1}, Landroid/widget/ProgressBar;->setProgress(IZ)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ProgressBar;->setProgress(I)V
|
|
|
|
:goto_1
|
|
iget-object p1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
const/16 v1, 0x64
|
|
|
|
if-ne p2, v1, :cond_2
|
|
|
|
iget-object p2, p0, Lcom/discord/views/UploadProgressView;->h:Landroid/graphics/drawable/Drawable;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
iget-object p2, p0, Lcom/discord/views/UploadProgressView;->i:Landroid/graphics/drawable/Drawable;
|
|
|
|
:goto_2
|
|
invoke-virtual {p1, p2}, Landroid/widget/ProgressBar;->setProgressDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ProgressBar;->setVisibility(I)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v1, -0x1
|
|
|
|
if-ne p2, v1, :cond_4
|
|
|
|
iget-object p2, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/ProgressBar;->setVisibility(I)V
|
|
|
|
iget-object p2, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 p1, -0x2
|
|
|
|
if-ne p2, p1, :cond_5
|
|
|
|
iget-object p1, p0, Lcom/discord/views/UploadProgressView;->d:Landroid/widget/ProgressBar;
|
|
|
|
const/4 p2, 0x4
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ProgressBar;->setVisibility(I)V
|
|
|
|
:goto_3
|
|
iget-object p1, p0, Lcom/discord/views/UploadProgressView;->f:Landroid/widget/TextView;
|
|
|
|
invoke-static {p1, p3}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p3, "invalid argument supplied to progress: "
|
|
|
|
invoke-static {p3, p2}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_6
|
|
const-string p1, "title"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final setIcon(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/discord/views/UploadProgressView;->g:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
.end method
|