Context$CancellableContext.smali
.class public final Lio/grpc/Context$CancellableContext;
.super Lio/grpc/Context;
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/grpc/Context;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "CancellableContext"
.end annotation
# instance fields
.field private final o:Lio/grpc/Context;
.field private p:Z
.field private q:Ljava/lang/Throwable;
.field private r:Ljava/util/concurrent/ScheduledFuture;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ScheduledFuture<",
"*>;"
}
.end annotation
.end field
# virtual methods
.method public E(Ljava/lang/Throwable;)Z
.registers 5
monitor-enter p0
:try_start_1
iget-boolean v0, p0, Lio/grpc/Context$CancellableContext;->p:Z
const/4 v1, 0x1
const/4 v2, 0x0
if-nez v0, :cond_18
iput-boolean v1, p0, Lio/grpc/Context$CancellableContext;->p:Z
iget-object v0, p0, Lio/grpc/Context$CancellableContext;->r:Ljava/util/concurrent/ScheduledFuture;
if-eqz v0, :cond_15
iget-object v0, p0, Lio/grpc/Context$CancellableContext;->r:Ljava/util/concurrent/ScheduledFuture;
invoke-interface {v0, v2}, Ljava/util/concurrent/ScheduledFuture;->cancel(Z)Z
const/4 v0, 0x0
iput-object v0, p0, Lio/grpc/Context$CancellableContext;->r:Ljava/util/concurrent/ScheduledFuture;
:cond_15
iput-object p1, p0, Lio/grpc/Context$CancellableContext;->q:Ljava/lang/Throwable;
goto :goto_19
:cond_18
const/4 v1, 0x0
:goto_19
monitor-exit p0
:try_end_1a
.catchall {:try_start_1 .. :try_end_1a} :catchall_20
if-eqz v1, :cond_1f
invoke-virtual {p0}, Lio/grpc/Context;->u()V
:cond_1f
return v1
:catchall_20
move-exception p1
:try_start_21
monitor-exit p0
:try_end_22
.catchall {:try_start_21 .. :try_end_22} :catchall_20
throw p1
.end method
.method public close()V
.registers 2
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lio/grpc/Context$CancellableContext;->E(Ljava/lang/Throwable;)Z
return-void
.end method
.method public e()Lio/grpc/Context;
.registers 2
iget-object v0, p0, Lio/grpc/Context$CancellableContext;->o:Lio/grpc/Context;
invoke-virtual {v0}, Lio/grpc/Context;->e()Lio/grpc/Context;
move-result-object v0
return-object v0
.end method
.method f()Z
.registers 2
const/4 v0, 0x1
return v0
.end method
.method public j()Ljava/lang/Throwable;
.registers 2
invoke-virtual {p0}, Lio/grpc/Context$CancellableContext;->r()Z
move-result v0
if-eqz v0, :cond_9
iget-object v0, p0, Lio/grpc/Context$CancellableContext;->q:Ljava/lang/Throwable;
return-object v0
:cond_9
const/4 v0, 0x0
return-object v0
.end method
.method public p(Lio/grpc/Context;)V
.registers 3
iget-object v0, p0, Lio/grpc/Context$CancellableContext;->o:Lio/grpc/Context;
invoke-virtual {v0, p1}, Lio/grpc/Context;->p(Lio/grpc/Context;)V
return-void
.end method
.method public r()Z
.registers 3
monitor-enter p0
:try_start_1
iget-boolean v0, p0, Lio/grpc/Context$CancellableContext;->p:Z
const/4 v1, 0x1
if-eqz v0, :cond_8
monitor-exit p0
return v1
:cond_8
monitor-exit p0
:try_end_9
.catchall {:try_start_1 .. :try_end_9} :catchall_19
invoke-super {p0}, Lio/grpc/Context;->r()Z
move-result v0
if-eqz v0, :cond_17
invoke-super {p0}, Lio/grpc/Context;->j()Ljava/lang/Throwable;
move-result-object v0
invoke-virtual {p0, v0}, Lio/grpc/Context$CancellableContext;->E(Ljava/lang/Throwable;)Z
return v1
:cond_17
const/4 v0, 0x0
return v0
:catchall_19
move-exception v0
:try_start_1a
monitor-exit p0
:try_end_1b
.catchall {:try_start_1a .. :try_end_1b} :catchall_19
throw v0
.end method