f.smali
.class public Lf1/f;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
# instance fields
.field private final a:Ljava/lang/Object;
.field private final b:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lf1/e;",
">;"
}
.end annotation
.end field
.field private final c:Ljava/util/concurrent/ScheduledExecutorService;
.field private d:Ljava/util/concurrent/ScheduledFuture;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ScheduledFuture<",
"*>;"
}
.end annotation
.end field
.field private e:Z
.field private f:Z
# direct methods
.method public constructor <init>()V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lf1/f;->b:Ljava/util/List;
invoke-static {}, Lf1/c;->d()Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
iput-object v0, p0, Lf1/f;->c:Ljava/util/concurrent/ScheduledExecutorService;
return-void
.end method
.method private b()V
.registers 3
iget-object v0, p0, Lf1/f;->d:Ljava/util/concurrent/ScheduledFuture;
if-eqz v0, :cond_b
const/4 v1, 0x1
invoke-interface {v0, v1}, Ljava/util/concurrent/Future;->cancel(Z)Z
const/4 v0, 0x0
iput-object v0, p0, Lf1/f;->d:Ljava/util/concurrent/ScheduledFuture;
:cond_b
return-void
.end method
.method private f(Ljava/util/List;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lf1/e;",
">;)V"
}
.end annotation
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_4
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_14
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lf1/e;
invoke-virtual {v0}, Lf1/e;->a()V
goto :goto_4
:cond_14
return-void
.end method
.method private h()V
.registers 3
iget-boolean v0, p0, Lf1/f;->f:Z
if-nez v0, :cond_5
return-void
:cond_5
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Object already closed"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public a()V
.registers 4
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
invoke-direct {p0}, Lf1/f;->h()V
iget-boolean v1, p0, Lf1/f;->e:Z
if-eqz v1, :cond_c
monitor-exit v0
return-void
:cond_c
invoke-direct {p0}, Lf1/f;->b()V
const/4 v1, 0x1
iput-boolean v1, p0, Lf1/f;->e:Z
new-instance v1, Ljava/util/ArrayList;
iget-object v2, p0, Lf1/f;->b:Ljava/util/List;
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
monitor-exit v0
:try_end_1a
.catchall {:try_start_3 .. :try_end_1a} :catchall_1e
invoke-direct {p0, v1}, Lf1/f;->f(Ljava/util/List;)V
return-void
:catchall_1e
move-exception v1
:try_start_1f
monitor-exit v0
:try_end_20
.catchall {:try_start_1f .. :try_end_20} :catchall_1e
throw v1
.end method
.method public c()Lf1/d;
.registers 3
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
invoke-direct {p0}, Lf1/f;->h()V
new-instance v1, Lf1/d;
invoke-direct {v1, p0}, Lf1/d;-><init>(Lf1/f;)V
monitor-exit v0
return-object v1
:catchall_d
move-exception v1
monitor-exit v0
:try_end_f
.catchall {:try_start_3 .. :try_end_f} :catchall_d
throw v1
.end method
.method public close()V
.registers 4
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
iget-boolean v1, p0, Lf1/f;->f:Z
if-eqz v1, :cond_9
monitor-exit v0
return-void
:cond_9
invoke-direct {p0}, Lf1/f;->b()V
iget-object v1, p0, Lf1/f;->b:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_12
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_22
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lf1/e;
invoke-virtual {v2}, Lf1/e;->close()V
goto :goto_12
:cond_22
iget-object v1, p0, Lf1/f;->b:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->clear()V
const/4 v1, 0x1
iput-boolean v1, p0, Lf1/f;->f:Z
monitor-exit v0
return-void
:catchall_2c
move-exception v1
monitor-exit v0
:try_end_2e
.catchall {:try_start_3 .. :try_end_2e} :catchall_2c
goto :goto_30
:goto_2f
throw v1
:goto_30
goto :goto_2f
.end method
.method public d()Z
.registers 3
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
invoke-direct {p0}, Lf1/f;->h()V
iget-boolean v1, p0, Lf1/f;->e:Z
monitor-exit v0
return v1
:catchall_a
move-exception v1
monitor-exit v0
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_a
throw v1
.end method
.method g(Ljava/lang/Runnable;)Lf1/e;
.registers 4
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
invoke-direct {p0}, Lf1/f;->h()V
new-instance v1, Lf1/e;
invoke-direct {v1, p0, p1}, Lf1/e;-><init>(Lf1/f;Ljava/lang/Runnable;)V
iget-boolean p1, p0, Lf1/f;->e:Z
if-eqz p1, :cond_13
invoke-virtual {v1}, Lf1/e;->a()V
goto :goto_18
:cond_13
iget-object p1, p0, Lf1/f;->b:Ljava/util/List;
invoke-interface {p1, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:goto_18
monitor-exit v0
return-object v1
:catchall_1a
move-exception p1
monitor-exit v0
:try_end_1c
.catchall {:try_start_3 .. :try_end_1c} :catchall_1a
throw p1
.end method
.method i(Lf1/e;)V
.registers 4
iget-object v0, p0, Lf1/f;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_3
invoke-direct {p0}, Lf1/f;->h()V
iget-object v1, p0, Lf1/f;->b:Ljava/util/List;
invoke-interface {v1, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
monitor-exit v0
return-void
:catchall_d
move-exception p1
monitor-exit v0
:try_end_f
.catchall {:try_start_3 .. :try_end_f} :catchall_d
throw p1
.end method
.method public toString()Ljava/lang/String;
.registers 5
sget-object v0, Ljava/util/Locale;->US:Ljava/util/Locale;
const/4 v1, 0x3
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
aput-object v2, v1, v3
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
move-result v2
invoke-static {v2}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v2
const/4 v3, 0x1
aput-object v2, v1, v3
invoke-virtual {p0}, Lf1/f;->d()Z
move-result v2
invoke-static {v2}, Ljava/lang/Boolean;->toString(Z)Ljava/lang/String;
move-result-object v2
const/4 v3, 0x2
aput-object v2, v1, v3
const-string v2, "%s@%s[cancellationRequested=%s]"
invoke-static {v0, v2, v1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method