granularity level: instruction
.class public Lcom/google/android/gms/common/api/internal/TaskUtil;
.super Ljava/lang/Object;
.source "com.google.android.gms:play-services-base@@18.0.1"
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static setResultOrApiException(Lcom/google/android/gms/common/api/Status;Lcom/google/android/gms/tasks/TaskCompletionSource;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/android/gms/common/api/Status;",
"Lcom/google/android/gms/tasks/TaskCompletionSource<",
"Ljava/lang/Void;",
">;)V"
}
.end annotation
const/4 v0, 0x0
invoke-static {p0, v0, p1}, Lcom/google/android/gms/common/api/internal/TaskUtil;->setResultOrApiException(Lcom/google/android/gms/common/api/Status;Ljava/lang/Object;Lcom/google/android/gms/tasks/TaskCompletionSource;)V
return-void
.end method
.method public static setResultOrApiException(Lcom/google/android/gms/common/api/Status;Ljava/lang/Object;Lcom/google/android/gms/tasks/TaskCompletionSource;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<TResult:",
"Ljava/lang/Object;",
">(",
"Lcom/google/android/gms/common/api/Status;",
"TTResult;",
"Lcom/google/android/gms/tasks/TaskCompletionSource<",
"TTResult;>;)V"
}
.end annotation
invoke-virtual {p0}, Lcom/google/android/gms/common/api/Status;->isSuccess()Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p2, p1}, Lcom/google/android/gms/tasks/TaskCompletionSource;->setResult(Ljava/lang/Object;)V
return-void
:cond_0
new-instance p1, Lcom/google/android/gms/common/api/ApiException;
invoke-direct {p1, p0}, Lcom/google/android/gms/common/api/ApiException;-><init>(Lcom/google/android/gms/common/api/Status;)V
invoke-virtual {p2, p1}, Lcom/google/android/gms/tasks/TaskCompletionSource;->setException(Ljava/lang/Exception;)V
return-void
.end method
.method public static toVoidTaskThatFailsOnFalse(Lcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/android/gms/tasks/Task<",
"Ljava/lang/Boolean;",
">;)",
"Lcom/google/android/gms/tasks/Task<",
"Ljava/lang/Void;",
">;"
}
.end annotation
new-instance v0, Lcom/google/android/gms/common/api/internal/zacx;
invoke-direct {v0}, Lcom/google/android/gms/common/api/internal/zacx;-><init>()V
invoke-virtual {p0, v0}, Lcom/google/android/gms/tasks/Task;->continueWith(Lcom/google/android/gms/tasks/Continuation;)Lcom/google/android/gms/tasks/Task;
move-result-object p0
return-object p0
.end method
.method public static trySetResultOrApiException(Lcom/google/android/gms/common/api/Status;Ljava/lang/Object;Lcom/google/android/gms/tasks/TaskCompletionSource;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<ResultT:",
"Ljava/lang/Object;",
">(",
"Lcom/google/android/gms/common/api/Status;",
"TResultT;",
"Lcom/google/android/gms/tasks/TaskCompletionSource<",
"TResultT;>;)Z"
}
.end annotation
invoke-virtual {p0}, Lcom/google/android/gms/common/api/Status;->isSuccess()Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p2, p1}, Lcom/google/android/gms/tasks/TaskCompletionSource;->trySetResult(Ljava/lang/Object;)Z
move-result p0
return p0
:cond_0
new-instance p1, Lcom/google/android/gms/common/api/ApiException;
invoke-direct {p1, p0}, Lcom/google/android/gms/common/api/ApiException;-><init>(Lcom/google/android/gms/common/api/Status;)V
invoke-virtual {p2, p1}, Lcom/google/android/gms/tasks/TaskCompletionSource;->trySetException(Ljava/lang/Exception;)Z
move-result p0
return p0
.end method