195 lines
5.8 KiB
Smali
195 lines
5.8 KiB
Smali
.class public final Lcom/crashlytics/android/core/j;
|
|
.super Ljava/lang/Object;
|
|
.source "CrashlyticsBackgroundWorker.java"
|
|
|
|
|
|
# instance fields
|
|
.field private final executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/concurrent/ExecutorService;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/crashlytics/android/core/j;->executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method final a(Ljava/util/concurrent/Callable;)Ljava/lang/Object;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v2
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/j;->executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v1, 0x4
|
|
|
|
sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-interface {p1, v1, v2, v3}, Ljava/util/concurrent/Future;->get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/j;->executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->DF()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "CrashlyticsCore"
|
|
|
|
const-string v3, "Failed to execute task."
|
|
|
|
invoke-interface {v1, v2, v3, p1}, Lio/fabric/sdk/android/l;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
return-object v0
|
|
|
|
:catch_1
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->DF()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "CrashlyticsCore"
|
|
|
|
const-string v2, "Executor is shut down because we\'re handling a fatal crash."
|
|
|
|
invoke-interface {p1, v1, v2}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Runnable;",
|
|
")",
|
|
"Ljava/util/concurrent/Future<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/crashlytics/android/core/j;->executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v1, Lcom/crashlytics/android/core/j$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/crashlytics/android/core/j$1;-><init>(Lcom/crashlytics/android/core/j;Ljava/lang/Runnable;)V
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->DF()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "CrashlyticsCore"
|
|
|
|
const-string v1, "Executor is shut down because we\'re handling a fatal crash."
|
|
|
|
invoke-interface {p1, v0, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;)",
|
|
"Ljava/util/concurrent/Future<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/crashlytics/android/core/j;->executorService:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v1, Lcom/crashlytics/android/core/j$2;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/crashlytics/android/core/j$2;-><init>(Lcom/crashlytics/android/core/j;Ljava/util/concurrent/Callable;)V
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->DF()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "CrashlyticsCore"
|
|
|
|
const-string v1, "Executor is shut down because we\'re handling a fatal crash."
|
|
|
|
invoke-interface {p1, v0, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|