128 lines
2.8 KiB
Smali
128 lines
2.8 KiB
Smali
.class public final Lm5/f;
|
|
.super Ljava/lang/Object;
|
|
.source "Executors.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Ljava/util/concurrent/Executor;
|
|
|
|
.field public static final b:Ljava/util/concurrent/Executor;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lm5/f$a;
|
|
|
|
invoke-direct {v0}, Lm5/f$a;-><init>()V
|
|
|
|
sput-object v0, Lm5/f;->a:Ljava/util/concurrent/Executor;
|
|
|
|
.line 2
|
|
new-instance v0, Lm5/f$b;
|
|
|
|
invoke-direct {v0}, Lm5/f$b;-><init>()V
|
|
|
|
sput-object v0, Lm5/f;->b:Ljava/util/concurrent/Executor;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()Ljava/util/concurrent/Executor;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lm5/f;->b:Ljava/util/concurrent/Executor;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static b()Ljava/util/concurrent/Executor;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lm5/f;->a:Ljava/util/concurrent/Executor;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static c(Ljava/util/concurrent/ExecutorService;)V
|
|
.locals 4
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-interface {p0}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;
|
|
|
|
.line 2
|
|
:try_start_0
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v1, 0x5
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Ljava/util/concurrent/ExecutorService;->awaitTermination(JLjava/util/concurrent/TimeUnit;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p0}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;
|
|
|
|
.line 4
|
|
invoke-interface {p0, v1, v2, v0}, Ljava/util/concurrent/ExecutorService;->awaitTermination(JLjava/util/concurrent/TimeUnit;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v1, "Failed to shutdown"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
:try_end_0
|
|
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 6
|
|
invoke-interface {p0}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;
|
|
|
|
.line 7
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Thread;->interrupt()V
|
|
|
|
.line 8
|
|
new-instance p0, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p0
|
|
.end method
|