2019-02-04 20:08:30 +00:00
|
|
|
.class public Landroidx/core/widget/ContentLoadingProgressBar;
|
|
|
|
.super Landroid/widget/ProgressBar;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "ContentLoadingProgressBar.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final MIN_DELAY:I = 0x1f4
|
|
|
|
|
|
|
|
.field private static final MIN_SHOW_TIME:I = 0x1f4
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private final mDelayedHide:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
.field private final mDelayedShow:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
.field mDismissed:Z
|
|
|
|
|
|
|
|
.field mPostedHide:Z
|
|
|
|
|
|
|
|
.field mPostedShow:Z
|
|
|
|
|
|
|
|
.field mStartTime:J
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, v0}, Landroidx/core/widget/ContentLoadingProgressBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
|
|
|
|
const-wide/16 p1, -0x1
|
|
|
|
|
|
|
|
iput-wide p1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mStartTime:J
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedHide:Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedShow:Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDismissed:Z
|
|
|
|
|
|
|
|
new-instance p1, Landroidx/core/widget/ContentLoadingProgressBar$1;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Landroidx/core/widget/ContentLoadingProgressBar$1;-><init>(Landroidx/core/widget/ContentLoadingProgressBar;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedHide:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
new-instance p1, Landroidx/core/widget/ContentLoadingProgressBar$2;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Landroidx/core/widget/ContentLoadingProgressBar$2;-><init>(Landroidx/core/widget/ContentLoadingProgressBar;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedShow:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private removeCallbacks()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedHide:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks(Ljava/lang/Runnable;)Z
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedShow:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks(Ljava/lang/Runnable;)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public declared-synchronized hide()V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDismissed:Z
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedShow:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks(Ljava/lang/Runnable;)Z
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
iput-boolean v1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedShow:Z
|
|
|
|
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
iget-wide v3, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mStartTime:J
|
|
|
|
|
|
|
|
sub-long/2addr v1, v3
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x1f4
|
|
|
|
|
|
|
|
cmp-long v5, v1, v3
|
|
|
|
|
|
|
|
if-gez v5, :cond_2
|
|
|
|
|
|
|
|
iget-wide v5, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mStartTime:J
|
|
|
|
|
|
|
|
const-wide/16 v7, -0x1
|
|
|
|
|
|
|
|
cmp-long v9, v5, v7
|
|
|
|
|
|
|
|
if-nez v9, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-boolean v5, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedHide:Z
|
|
|
|
|
|
|
|
if-nez v5, :cond_1
|
|
|
|
|
|
|
|
iget-object v5, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedHide:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
sub-long/2addr v3, v1
|
|
|
|
|
|
|
|
invoke-virtual {p0, v5, v3, v4}, Landroidx/core/widget/ContentLoadingProgressBar;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedHide:Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
const/16 v0, 0x8
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/core/widget/ContentLoadingProgressBar;->setVisibility(I)V
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onAttachedToWindow()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0}, Landroid/widget/ProgressBar;->onAttachedToWindow()V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDetachedFromWindow()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0}, Landroid/widget/ProgressBar;->onDetachedFromWindow()V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public declared-synchronized show()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iput-wide v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mStartTime:J
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDismissed:Z
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedHide:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Landroidx/core/widget/ContentLoadingProgressBar;->removeCallbacks(Ljava/lang/Runnable;)Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedHide:Z
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedShow:Z
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mDelayedShow:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
const-wide/16 v1, 0x1f4
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1, v2}, Landroidx/core/widget/ContentLoadingProgressBar;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/core/widget/ContentLoadingProgressBar;->mPostedShow:Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|