apkfuckery/com.discord/smali/androidx/activity/OnBackPressedCallback.smali

123 lines
3.3 KiB
Smali
Raw Normal View History

2019-10-07 23:23:22 +00:00
.class public abstract Landroidx/activity/OnBackPressedCallback;
.super Ljava/lang/Object;
.source "OnBackPressedCallback.java"
# instance fields
2019-12-06 03:29:40 +00:00
.field public mCancellables:Ljava/util/concurrent/CopyOnWriteArrayList;
2019-10-07 23:23:22 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/CopyOnWriteArrayList<",
"Landroidx/activity/Cancellable;",
">;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public mEnabled:Z
2019-10-07 23:23:22 +00:00
# direct methods
.method public constructor <init>(Z)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-direct {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V
iput-object v0, p0, Landroidx/activity/OnBackPressedCallback;->mCancellables:Ljava/util/concurrent/CopyOnWriteArrayList;
iput-boolean p1, p0, Landroidx/activity/OnBackPressedCallback;->mEnabled:Z
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public addCancellable(Landroidx/activity/Cancellable;)V
2019-10-07 23:23:22 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/activity/Cancellable;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/OnBackPressedCallback;->mCancellables:Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-virtual {v0, p1}, Ljava/util/concurrent/CopyOnWriteArrayList;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public abstract handleOnBackPressed()V
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
.end method
.method public final isEnabled()Z
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iget-boolean v0, p0, Landroidx/activity/OnBackPressedCallback;->mEnabled:Z
return v0
.end method
.method public final remove()V
.locals 2
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/OnBackPressedCallback;->mCancellables:Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-virtual {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/activity/Cancellable;
invoke-interface {v1}, Landroidx/activity/Cancellable;->cancel()V
goto :goto_0
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public removeCancellable(Landroidx/activity/Cancellable;)V
2019-10-07 23:23:22 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/activity/Cancellable;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/OnBackPressedCallback;->mCancellables:Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-virtual {v0, p1}, Ljava/util/concurrent/CopyOnWriteArrayList;->remove(Ljava/lang/Object;)Z
return-void
.end method
.method public final setEnabled(Z)V
.locals 0
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iput-boolean p1, p0, Landroidx/activity/OnBackPressedCallback;->mEnabled:Z
return-void
.end method