apkfuckery/com.discord/smali/u/g.smali
2020-11-21 22:11:07 +00:00

672 lines
13 KiB
Smali

.class public Lu/g;
.super Ljava/lang/Object;
.source "Task.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<TResult:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# static fields
.field public static final h:Ljava/util/concurrent/Executor;
.field public static i:Lu/g;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lu/g<",
"*>;"
}
.end annotation
.end field
.field public static j:Lu/g;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lu/g<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public static k:Lu/g;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lu/g<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
# instance fields
.field public final a:Ljava/lang/Object;
.field public b:Z
.field public c:Z
.field public d:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TTResult;"
}
.end annotation
.end field
.field public e:Ljava/lang/Exception;
.field public f:Z
.field public g:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lu/c<",
"TTResult;",
"Ljava/lang/Void;",
">;>;"
}
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 2
sget-object v0, Lu/b;->c:Lu/b;
iget-object v1, v0, Lu/b;->a:Ljava/util/concurrent/ExecutorService;
iget-object v0, v0, Lu/b;->b:Ljava/util/concurrent/Executor;
sput-object v0, Lu/g;->h:Ljava/util/concurrent/Executor;
sget-object v0, Lu/a;->b:Lu/a;
iget-object v0, v0, Lu/a;->a:Ljava/util/concurrent/Executor;
new-instance v0, Lu/g;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lu/g;-><init>(Ljava/lang/Object;)V
sput-object v0, Lu/g;->i:Lu/g;
new-instance v0, Lu/g;
sget-object v1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
invoke-direct {v0, v1}, Lu/g;-><init>(Ljava/lang/Object;)V
sput-object v0, Lu/g;->j:Lu/g;
new-instance v0, Lu/g;
sget-object v1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
invoke-direct {v0, v1}, Lu/g;-><init>(Ljava/lang/Object;)V
sput-object v0, Lu/g;->k:Lu/g;
new-instance v0, Lu/g;
const/4 v1, 0x1
invoke-direct {v0, v1}, Lu/g;-><init>(Z)V
return-void
.end method
.method public constructor <init>()V
.locals 1
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, Lu/g;->a:Ljava/lang/Object;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lu/g;->g:Ljava/util/List;
return-void
.end method
.method public constructor <init>(Ljava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TTResult;)V"
}
.end annotation
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, Lu/g;->a:Ljava/lang/Object;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lu/g;->g:Ljava/util/List;
invoke-virtual {p0, p1}, Lu/g;->h(Ljava/lang/Object;)Z
return-void
.end method
.method public constructor <init>(Z)V
.locals 1
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, Lu/g;->a:Ljava/lang/Object;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lu/g;->g:Ljava/util/List;
if-eqz p1, :cond_0
invoke-virtual {p0}, Lu/g;->g()Z
goto :goto_0
:cond_0
const/4 p1, 0x0
invoke-virtual {p0, p1}, Lu/g;->h(Ljava/lang/Object;)Z
:goto_0
return-void
.end method
.method public static a(Ljava/util/concurrent/Callable;Ljava/util/concurrent/Executor;)Lu/g;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<TResult:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/Callable<",
"TTResult;>;",
"Ljava/util/concurrent/Executor;",
")",
"Lu/g<",
"TTResult;>;"
}
.end annotation
new-instance v0, Lu/h;
invoke-direct {v0}, Lu/h;-><init>()V
:try_start_0
new-instance v1, Lu/f;
invoke-direct {v1, v0, p0}, Lu/f;-><init>(Lu/h;Ljava/util/concurrent/Callable;)V
invoke-interface {p1, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
new-instance p1, Lbolts/ExecutorException;
invoke-direct {p1, p0}, Lbolts/ExecutorException;-><init>(Ljava/lang/Exception;)V
invoke-virtual {v0, p1}, Lu/h;->b(Ljava/lang/Exception;)V
:goto_0
iget-object p0, v0, Lu/h;->a:Lu/g;
return-object p0
.end method
.method public static c(Ljava/lang/Exception;)Lu/g;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"<TResult:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Exception;",
")",
"Lu/g<",
"TTResult;>;"
}
.end annotation
new-instance v0, Lu/g;
invoke-direct {v0}, Lu/g;-><init>()V
iget-object v1, v0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v1
:try_start_0
iget-boolean v2, v0, Lu/g;->b:Z
const/4 v3, 0x0
const/4 v4, 0x1
if-eqz v2, :cond_0
monitor-exit v1
goto :goto_0
:cond_0
iput-boolean v4, v0, Lu/g;->b:Z
iput-object p0, v0, Lu/g;->e:Ljava/lang/Exception;
iput-boolean v3, v0, Lu/g;->f:Z
iget-object p0, v0, Lu/g;->a:Ljava/lang/Object;
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
invoke-virtual {v0}, Lu/g;->f()V
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v3, 0x1
:goto_0
if-eqz v3, :cond_1
return-object v0
:cond_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "Cannot set the error on a completed task."
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:catchall_0
move-exception p0
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p0
.end method
# virtual methods
.method public b(Lu/c;)Lu/g;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"<TContinuationResult:",
"Ljava/lang/Object;",
">(",
"Lu/c<",
"TTResult;TTContinuationResult;>;)",
"Lu/g<",
"TTContinuationResult;>;"
}
.end annotation
sget-object v0, Lu/g;->h:Ljava/util/concurrent/Executor;
new-instance v1, Lu/h;
invoke-direct {v1}, Lu/h;-><init>()V
iget-object v2, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v2
:try_start_0
iget-object v3, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-boolean v4, p0, Lu/g;->b:Z
monitor-exit v3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-nez v4, :cond_0
:try_start_2
iget-object v3, p0, Lu/g;->g:Ljava/util/List;
new-instance v5, Lu/d;
invoke-direct {v5, p0, v1, p1, v0}, Lu/d;-><init>(Lu/g;Lu/h;Lu/c;Ljava/util/concurrent/Executor;)V
invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:cond_0
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
if-eqz v4, :cond_1
:try_start_3
new-instance v2, Lu/e;
invoke-direct {v2, v1, p1, p0}, Lu/e;-><init>(Lu/h;Lu/c;Lu/g;)V
invoke-interface {v0, v2}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_3
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
goto :goto_0
:catch_0
move-exception p1
new-instance v0, Lbolts/ExecutorException;
invoke-direct {v0, p1}, Lbolts/ExecutorException;-><init>(Ljava/lang/Exception;)V
invoke-virtual {v1, v0}, Lu/h;->b(Ljava/lang/Exception;)V
:cond_1
:goto_0
iget-object p1, v1, Lu/h;->a:Lu/g;
return-object p1
:catchall_0
move-exception p1
:try_start_4
monitor-exit v3
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:try_start_5
throw p1
:catchall_1
move-exception p1
monitor-exit v2
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
throw p1
.end method
.method public d()Ljava/lang/Exception;
.locals 3
iget-object v0, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lu/g;->e:Ljava/lang/Exception;
if-eqz v1, :cond_0
const/4 v2, 0x1
iput-boolean v2, p0, Lu/g;->f:Z
:cond_0
monitor-exit v0
return-object v1
: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 e()Z
.locals 2
iget-object v0, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_0
invoke-virtual {p0}, Lu/g;->d()Ljava/lang/Exception;
move-result-object v1
if-eqz v1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
monitor-exit v0
return v1
: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 final f()V
.locals 3
iget-object v0, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lu/g;->g:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lu/c;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
invoke-interface {v2, p0}, Lu/c;->a(Lu/g;)Ljava/lang/Object;
:try_end_1
.catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catch_0
move-exception v1
:try_start_2
new-instance v2, Ljava/lang/RuntimeException;
invoke-direct {v2, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v2
:catch_1
move-exception v1
throw v1
:cond_0
const/4 v1, 0x0
iput-object v1, p0, Lu/g;->g:Ljava/util/List;
monitor-exit v0
return-void
:catchall_0
move-exception v1
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v1
.end method
.method public g()Z
.locals 3
iget-object v0, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lu/g;->b:Z
if-eqz v1, :cond_0
const/4 v1, 0x0
monitor-exit v0
return v1
:cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lu/g;->b:Z
iput-boolean v1, p0, Lu/g;->c:Z
iget-object v2, p0, Lu/g;->a:Ljava/lang/Object;
invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V
invoke-virtual {p0}, Lu/g;->f()V
monitor-exit v0
return v1
: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 h(Ljava/lang/Object;)Z
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(TTResult;)Z"
}
.end annotation
iget-object v0, p0, Lu/g;->a:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lu/g;->b:Z
if-eqz v1, :cond_0
const/4 p1, 0x0
monitor-exit v0
return p1
:cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lu/g;->b:Z
iput-object p1, p0, Lu/g;->d:Ljava/lang/Object;
iget-object p1, p0, Lu/g;->a:Ljava/lang/Object;
invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V
invoke-virtual {p0}, Lu/g;->f()V
monitor-exit v0
return v1
:catchall_0
move-exception p1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method