500 lines
8.7 KiB
Smali
500 lines
8.7 KiB
Smali
.class public Lof/a;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicFuture.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/concurrent/Future;
|
|
.implements Lof/b;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Ljava/util/concurrent/Future<",
|
|
"TT;>;",
|
|
"Lof/b;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Lof/c;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lof/c<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public volatile b:Z
|
|
|
|
.field public volatile c:Z
|
|
|
|
.field public volatile d:Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TT;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public volatile e:Ljava/lang/Exception;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lof/c;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lof/c<",
|
|
"TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lof/a;->a:Lof/c;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/lang/Object;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
monitor-enter p0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 3
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 4
|
|
iput-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
.line 5
|
|
iput-object p1, p0, Lof/a;->d:Ljava/lang/Object;
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
|
|
.line 7
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 8
|
|
iget-object v1, p0, Lof/a;->a:Lof/c;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 9
|
|
invoke-interface {v1, p1}, Lof/c;->b(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 10
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public b(Ljava/lang/Exception;)Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
monitor-enter p0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 3
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 4
|
|
iput-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
.line 5
|
|
iput-object p1, p0, Lof/a;->e:Ljava/lang/Exception;
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
|
|
.line 7
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 8
|
|
iget-object v1, p0, Lof/a;->a:Lof/c;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 9
|
|
invoke-interface {v1, p1}, Lof/c;->c(Ljava/lang/Exception;)V
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 10
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final c()Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/util/concurrent/ExecutionException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lof/a;->e:Ljava/lang/Exception;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lof/a;->d:Ljava/lang/Object;
|
|
|
|
return-object v0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance v0, Ljava/util/concurrent/ExecutionException;
|
|
|
|
iget-object v1, p0, Lof/a;->e:Ljava/lang/Exception;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/ExecutionException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public cancel()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 11
|
|
invoke-virtual {p0, v0}, Lof/a;->cancel(Z)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public cancel(Z)Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
monitor-enter p0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-boolean p1, p0, Lof/a;->b:Z
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 3
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
.line 4
|
|
iput-boolean p1, p0, Lof/a;->b:Z
|
|
|
|
.line 5
|
|
iput-boolean p1, p0, Lof/a;->c:Z
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
|
|
.line 7
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 8
|
|
iget-object v0, p0, Lof/a;->a:Lof/c;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 9
|
|
invoke-interface {v0}, Lof/c;->a()V
|
|
|
|
:cond_1
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 10
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized get()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InterruptedException;,
|
|
Ljava/util/concurrent/ExecutionException;
|
|
}
|
|
.end annotation
|
|
|
|
monitor-enter p0
|
|
|
|
.line 1
|
|
:goto_0
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-virtual {p0}, Lof/a;->c()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Ljava/util/concurrent/TimeUnit;",
|
|
")TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InterruptedException;,
|
|
Ljava/util/concurrent/ExecutionException;,
|
|
Ljava/util/concurrent/TimeoutException;
|
|
}
|
|
.end annotation
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "Time unit"
|
|
|
|
.line 4
|
|
invoke-static {p3, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 5
|
|
invoke-virtual {p3, p1, p2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
|
|
|
|
move-result-wide p1
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long p3, p1, v0
|
|
|
|
if-gtz p3, :cond_0
|
|
|
|
move-wide v2, v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v2
|
|
|
|
.line 7
|
|
:goto_0
|
|
iget-boolean v4, p0, Lof/a;->b:Z
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 8
|
|
invoke-virtual {p0}, Lof/a;->c()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
if-lez p3, :cond_4
|
|
|
|
move-wide v4, p1
|
|
|
|
.line 9
|
|
:goto_1
|
|
:try_start_1
|
|
invoke-virtual {p0, v4, v5}, Ljava/lang/Object;->wait(J)V
|
|
|
|
.line 10
|
|
iget-boolean p3, p0, Lof/a;->b:Z
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
.line 11
|
|
invoke-virtual {p0}, Lof/a;->c()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
.line 12
|
|
:cond_2
|
|
:try_start_2
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
sub-long/2addr v4, v2
|
|
|
|
sub-long v4, p1, v4
|
|
|
|
cmp-long p3, v4, v0
|
|
|
|
if-lez p3, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 13
|
|
:cond_3
|
|
new-instance p1, Ljava/util/concurrent/TimeoutException;
|
|
|
|
invoke-direct {p1}, Ljava/util/concurrent/TimeoutException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 14
|
|
:cond_4
|
|
new-instance p1, Ljava/util/concurrent/TimeoutException;
|
|
|
|
invoke-direct {p1}, Ljava/util/concurrent/TimeoutException;-><init>()V
|
|
|
|
throw p1
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public isCancelled()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lof/a;->c:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isDone()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lof/a;->b:Z
|
|
|
|
return v0
|
|
.end method
|