.class public final Lcom/google/android/gms/internal/ads/l8;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<V:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Ljava/lang/Runnable;"
    }
.end annotation


# instance fields
.field public r:Lcom/google/android/gms/internal/ads/m8;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/google/android/gms/internal/ads/m8<",
            "TV;>;"
        }
    .end annotation

    .annotation runtime Ljavax/annotation/CheckForNull;
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lcom/google/android/gms/internal/ads/m8;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/android/gms/internal/ads/m8<",
            "TV;>;)V"
        }
    .end annotation

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/google/android/gms/internal/ads/l8;->r:Lcom/google/android/gms/internal/ads/m8;

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 9

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/l8;->r:Lcom/google/android/gms/internal/ads/m8;

    if-nez v0, :cond_5

    return-void

    .line 1
    :cond_5
    iget-object v1, v0, Lcom/google/android/gms/internal/ads/m8;->y:Lz5/fc1;

    if-nez v1, :cond_a

    return-void

    :cond_a
    const/4 v2, 0x0

    .line 2
    iput-object v2, p0, Lcom/google/android/gms/internal/ads/l8;->r:Lcom/google/android/gms/internal/ads/m8;

    invoke-interface {v1}, Ljava/util/concurrent/Future;->isDone()Z

    move-result v3

    if-eqz v3, :cond_17

    invoke-virtual {v0, v1}, Lcom/google/android/gms/internal/ads/w7;->l(Lz5/fc1;)Z

    return-void

    :cond_17
    const/4 v3, 0x1

    .line 3
    :try_start_18
    iget-object v4, v0, Lcom/google/android/gms/internal/ads/m8;->z:Ljava/util/concurrent/ScheduledFuture;

    .line 4
    iput-object v2, v0, Lcom/google/android/gms/internal/ads/m8;->z:Ljava/util/concurrent/ScheduledFuture;

    const-string v2, "Timed out"
    :try_end_1e
    .catchall {:try_start_18 .. :try_end_1e} :catchall_84

    if-eqz v4, :cond_4b

    .line 5
    :try_start_20
    sget-object v5, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v4, v5}, Ljava/util/concurrent/ScheduledFuture;->getDelay(Ljava/util/concurrent/TimeUnit;)J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Math;->abs(J)J

    move-result-wide v4

    const-wide/16 v6, 0xa

    cmp-long v6, v4, v6

    if-lez v6, :cond_4b

    new-instance v6, Ljava/lang/StringBuilder;

    const/16 v7, 0x4b

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(I)V

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v7, " (timeout delayed by "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v4, " ms after scheduled time)"

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    :cond_4b
    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v5

    add-int/lit8 v5, v5, 0x2

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v6

    add-int/2addr v5, v6

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, ": "

    invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2
    :try_end_6e
    .catchall {:try_start_20 .. :try_end_6e} :catchall_7a

    :try_start_6e
    new-instance v4, Lz5/kc1;

    invoke-direct {v4, v2}, Lz5/kc1;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v4}, Lcom/google/android/gms/internal/ads/w7;->k(Ljava/lang/Throwable;)Z
    :try_end_76
    .catchall {:try_start_6e .. :try_end_76} :catchall_84

    invoke-interface {v1, v3}, Ljava/util/concurrent/Future;->cancel(Z)Z

    return-void

    :catchall_7a
    move-exception v4

    :try_start_7b
    new-instance v5, Lz5/kc1;

    invoke-direct {v5, v2}, Lz5/kc1;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v5}, Lcom/google/android/gms/internal/ads/w7;->k(Ljava/lang/Throwable;)Z

    throw v4
    :try_end_84
    .catchall {:try_start_7b .. :try_end_84} :catchall_84

    :catchall_84
    move-exception v0

    invoke-interface {v1, v3}, Ljava/util/concurrent/Future;->cancel(Z)Z

    throw v0
.end method
