145 lines
3.9 KiB
Smali
145 lines
3.9 KiB
Smali
.class final Lcom/amplifyframework/datastore/AmplifyDisposables$1;
|
|
.super Ljava/lang/Object;
|
|
.source "AmplifyDisposables.java"
|
|
|
|
# interfaces
|
|
.implements Lio/reactivex/rxjava3/disposables/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/amplifyframework/datastore/AmplifyDisposables;->fromCancelable(Lcom/amplifyframework/core/async/Cancelable;)Lio/reactivex/rxjava3/disposables/c;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = null
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final synthetic val$cancelable:Lcom/amplifyframework/core/async/Cancelable;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/amplifyframework/core/async/Cancelable;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->val$cancelable:Lcom/amplifyframework/core/async/Cancelable;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dispose()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-object v1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 3
|
|
iget-object v1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->val$cancelable:Lcom/amplifyframework/core/async/Cancelable;
|
|
|
|
invoke-interface {v1}, Lcom/amplifyframework/core/async/Cancelable;->cancel()V
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
sget-object v2, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
|
|
|
|
.line 5
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public isDisposed()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-object v1, p0, Lcom/amplifyframework/datastore/AmplifyDisposables$1;->isCanceled:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v1
|
|
|
|
monitor-exit v0
|
|
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 3
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|