446 lines
12 KiB
Smali
446 lines
12 KiB
Smali
.class public Lcom/facebook/common/b/HandlerExecutorServiceImpl;
|
|
.super Ljava/util/concurrent/AbstractExecutorService;
|
|
.source "HandlerExecutorServiceImpl.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/facebook/common/b/b;
|
|
|
|
|
|
# instance fields
|
|
.field private final a:Landroid/os/Handler;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/os/Handler;)V
|
|
.locals 0
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Ljava/util/concurrent/AbstractExecutorService;-><init>()V
|
|
|
|
.line 27
|
|
iput-object p1, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a(Ljava/lang/Runnable;Ljava/lang/Object;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/Runnable;",
|
|
"TT;)",
|
|
"Lcom/facebook/common/b/ScheduledFutureImpl<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 62
|
|
new-instance v0, Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
iget-object v1, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-direct {v0, v1, p1, p2}, Lcom/facebook/common/b/ScheduledFutureImpl;-><init>(Landroid/os/Handler;Ljava/lang/Runnable;Ljava/lang/Object;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected a(Ljava/util/concurrent/Callable;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;)",
|
|
"Lcom/facebook/common/b/ScheduledFutureImpl<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 67
|
|
new-instance v0, Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
iget-object v1, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/facebook/common/b/ScheduledFutureImpl;-><init>(Landroid/os/Handler;Ljava/util/concurrent/Callable;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/Runnable;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Runnable;",
|
|
")",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 72
|
|
check-cast v0, Ljava/lang/Void;
|
|
|
|
invoke-virtual {p0, p1, v0}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->b(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a()Z
|
|
.locals 2
|
|
|
|
.line 124
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-virtual {v1}, Landroid/os/Handler;->getLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/os/Looper;->getThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public awaitTermination(JLjava/util/concurrent/TimeUnit;)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InterruptedException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 52
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public b(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 0
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/Runnable;",
|
|
"TT;)",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 77
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/NullPointerException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 78
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/lang/Runnable;Ljava/lang/Object;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
.line 79
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public b(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;)",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 85
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/NullPointerException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 86
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/util/concurrent/Callable;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
.line 87
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public execute(Ljava/lang/Runnable;)V
|
|
.locals 1
|
|
|
|
.line 57
|
|
iget-object v0, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public isShutdown()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isTerminated()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method protected synthetic newTaskFor(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/RunnableFuture;
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-virtual {p0, p1, p2}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/lang/Runnable;Ljava/lang/Object;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method protected synthetic newTaskFor(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/RunnableFuture;
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/util/concurrent/Callable;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Runnable;",
|
|
"J",
|
|
"Ljava/util/concurrent/TimeUnit;",
|
|
")",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 93
|
|
invoke-virtual {p0, p1, v0}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/lang/Runnable;Ljava/lang/Object;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
.line 94
|
|
iget-object v0, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
|
|
|
|
move-result-wide p2
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public schedule(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<V:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TV;>;J",
|
|
"Ljava/util/concurrent/TimeUnit;",
|
|
")",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 100
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/util/concurrent/Callable;)Lcom/facebook/common/b/ScheduledFutureImpl;
|
|
|
|
move-result-object p1
|
|
|
|
.line 101
|
|
iget-object v0, p0, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a:Landroid/os/Handler;
|
|
|
|
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
|
|
|
|
move-result-wide p2
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public scheduleAtFixedRate(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Runnable;",
|
|
"JJ",
|
|
"Ljava/util/concurrent/TimeUnit;",
|
|
")",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 108
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public scheduleWithFixedDelay(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Runnable;",
|
|
"JJ",
|
|
"Ljava/util/concurrent/TimeUnit;",
|
|
")",
|
|
"Ljava/util/concurrent/ScheduledFuture<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 114
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public shutdown()V
|
|
.locals 1
|
|
|
|
.line 32
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public shutdownNow()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Runnable;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 37
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->a(Ljava/lang/Runnable;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public synthetic submit(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Future;
|
|
.locals 0
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 21
|
|
invoke-virtual {p0, p1, p2}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->b(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public synthetic submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-virtual {p0, p1}, Lcom/facebook/common/b/HandlerExecutorServiceImpl;->b(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|