.class public final Ln6/l;
.super Ljava/lang/Object;
.source ""


# direct methods
.method public static a(Ln6/i;)Ljava/lang/Object;
    .registers 3
    .param p0    # Ln6/i;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .annotation build Landroidx/annotation/RecentlyNonNull;
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(",
            "Ln6/i<",
            "TTResult;>;)TTResult;"
        }
    .end annotation

    const-string v0, "Must not be called on the main application thread"

    .line 1
    invoke-static {v0}, Lcom/google/android/gms/common/internal/d;->g(Ljava/lang/String;)V

    const-string v0, "Task must not be null"

    .line 2
    invoke-static {p0, v0}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {p0}, Ln6/i;->m()Z

    move-result v0

    if-eqz v0, :cond_15

    invoke-static {p0}, Ln6/l;->f(Ln6/i;)Ljava/lang/Object;

    move-result-object p0

    return-object p0

    :cond_15
    new-instance v0, Lf/o;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Lf/o;-><init>(Ll5/m;)V

    .line 3
    sget-object v1, Ln6/k;->b:Ljava/util/concurrent/Executor;

    invoke-virtual {p0, v1, v0}, Ln6/i;->e(Ljava/util/concurrent/Executor;Ln6/f;)Ln6/i;

    invoke-virtual {p0, v1, v0}, Ln6/i;->d(Ljava/util/concurrent/Executor;Ln6/e;)Ln6/i;

    invoke-virtual {p0, v1, v0}, Ln6/i;->a(Ljava/util/concurrent/Executor;Ln6/c;)Ln6/i;

    .line 4
    iget-object v0, v0, Lf/o;->s:Ljava/lang/Object;

    check-cast v0, Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->await()V

    .line 5
    invoke-static {p0}, Ln6/l;->f(Ln6/i;)Ljava/lang/Object;

    move-result-object p0

    return-object p0
.end method

.method public static b(Ln6/i;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
    .registers 6
    .param p0    # Ln6/i;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .param p3    # Ljava/util/concurrent/TimeUnit;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .annotation build Landroidx/annotation/RecentlyNonNull;
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(",
            "Ln6/i<",
            "TTResult;>;J",
            "Ljava/util/concurrent/TimeUnit;",
            ")TTResult;"
        }
    .end annotation

    const-string v0, "Must not be called on the main application thread"

    .line 1
    invoke-static {v0}, Lcom/google/android/gms/common/internal/d;->g(Ljava/lang/String;)V

    const-string v0, "Task must not be null"

    .line 2
    invoke-static {p0, v0}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string v0, "TimeUnit must not be null"

    invoke-static {p3, v0}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {p0}, Ln6/i;->m()Z

    move-result v0

    if-eqz v0, :cond_1a

    invoke-static {p0}, Ln6/l;->f(Ln6/i;)Ljava/lang/Object;

    move-result-object p0

    return-object p0

    :cond_1a
    new-instance v0, Lf/o;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Lf/o;-><init>(Ll5/m;)V

    .line 3
    sget-object v1, Ln6/k;->b:Ljava/util/concurrent/Executor;

    invoke-virtual {p0, v1, v0}, Ln6/i;->e(Ljava/util/concurrent/Executor;Ln6/f;)Ln6/i;

    invoke-virtual {p0, v1, v0}, Ln6/i;->d(Ljava/util/concurrent/Executor;Ln6/e;)Ln6/i;

    invoke-virtual {p0, v1, v0}, Ln6/i;->a(Ljava/util/concurrent/Executor;Ln6/c;)Ln6/i;

    .line 4
    iget-object v0, v0, Lf/o;->s:Ljava/lang/Object;

    check-cast v0, Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {v0, p1, p2, p3}, Ljava/util/concurrent/CountDownLatch;->await(JLjava/util/concurrent/TimeUnit;)Z

    move-result p1

    if-eqz p1, :cond_3a

    .line 5
    invoke-static {p0}, Ln6/l;->f(Ln6/i;)Ljava/lang/Object;

    move-result-object p0

    return-object p0

    :cond_3a
    new-instance p0, Ljava/util/concurrent/TimeoutException;

    const-string p1, "Timed out waiting for Task"

    invoke-direct {p0, p1}, Ljava/util/concurrent/TimeoutException;-><init>(Ljava/lang/String;)V

    throw p0
.end method

.method public static c(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Callable;)Ln6/i;
    .registers 4
    .param p0    # Ljava/util/concurrent/Executor;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .param p1    # Ljava/util/concurrent/Callable;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/util/concurrent/Executor;",
            "Ljava/util/concurrent/Callable<",
            "TTResult;>;)",
            "Ln6/i<",
            "TTResult;>;"
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    const-string v0, "Executor must not be null"

    invoke-static {p0, v0}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string v0, "Callback must not be null"

    invoke-static {p1, v0}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v0, Ln6/u;

    invoke-direct {v0}, Ln6/u;-><init>()V

    new-instance v1, Ll5/m;

    invoke-direct {v1, v0, p1}, Ll5/m;-><init>(Ln6/u;Ljava/util/concurrent/Callable;)V

    invoke-interface {p0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V

    return-object v0
.end method

.method public static d(Ljava/lang/Exception;)Ln6/i;
    .registers 2
    .param p0    # Ljava/lang/Exception;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/Exception;",
            ")",
            "Ln6/i<",
            "TTResult;>;"
        }
    .end annotation

    new-instance v0, Ln6/u;

    invoke-direct {v0}, Ln6/u;-><init>()V

    invoke-virtual {v0, p0}, Ln6/u;->q(Ljava/lang/Exception;)V

    return-object v0
.end method

.method public static e(Ljava/lang/Object;)Ln6/i;
    .registers 2
    .param p0    # Ljava/lang/Object;
        .annotation build Landroidx/annotation/RecentlyNonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(TTResult;)",
            "Ln6/i<",
            "TTResult;>;"
        }
    .end annotation

    new-instance v0, Ln6/u;

    invoke-direct {v0}, Ln6/u;-><init>()V

    invoke-virtual {v0, p0}, Ln6/u;->p(Ljava/lang/Object;)V

    return-object v0
.end method

.method public static f(Ln6/i;)Ljava/lang/Object;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<TResult:",
            "Ljava/lang/Object;",
            ">(",
            "Ln6/i<",
            "TTResult;>;)TTResult;"
        }
    .end annotation

    invoke-virtual {p0}, Ln6/i;->n()Z

    move-result v0

    if-eqz v0, :cond_b

    invoke-virtual {p0}, Ln6/i;->j()Ljava/lang/Object;

    move-result-object p0

    return-object p0

    :cond_b
    invoke-virtual {p0}, Ln6/i;->l()Z

    move-result v0

    if-eqz v0, :cond_19

    new-instance p0, Ljava/util/concurrent/CancellationException;

    const-string v0, "Task is already canceled"

    invoke-direct {p0, v0}, Ljava/util/concurrent/CancellationException;-><init>(Ljava/lang/String;)V

    throw p0

    :cond_19
    new-instance v0, Ljava/util/concurrent/ExecutionException;

    invoke-virtual {p0}, Ln6/i;->i()Ljava/lang/Exception;

    move-result-object p0

    invoke-direct {v0, p0}, Ljava/util/concurrent/ExecutionException;-><init>(Ljava/lang/Throwable;)V

    throw v0
.end method
