.class public final Lcom/google/android/gms/internal/ads/t2;
.super Lcom/google/android/gms/internal/ads/v2;
.source ""


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/google/android/gms/internal/ads/v2<",
        "Lz5/vh0;",
        ">;"
    }
.end annotation


# instance fields
.field public final s:Ljava/util/concurrent/ScheduledExecutorService;

.field public final t:Lu5/c;

.field public u:J
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field

.field public v:J
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field

.field public w:Z
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field

.field public x:Ljava/util/concurrent/ScheduledFuture;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/ScheduledFuture<",
            "*>;"
        }
    .end annotation

    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field


# direct methods
.method public constructor <init>(Ljava/util/concurrent/ScheduledExecutorService;Lu5/c;)V
    .registers 5

    invoke-static {}, Ljava/util/Collections;->emptySet()Ljava/util/Set;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/google/android/gms/internal/ads/v2;-><init>(Ljava/util/Set;)V

    const-wide/16 v0, -0x1

    iput-wide v0, p0, Lcom/google/android/gms/internal/ads/t2;->u:J

    iput-wide v0, p0, Lcom/google/android/gms/internal/ads/t2;->v:J

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/android/gms/internal/ads/t2;->w:Z

    iput-object p1, p0, Lcom/google/android/gms/internal/ads/t2;->s:Ljava/util/concurrent/ScheduledExecutorService;

    iput-object p2, p0, Lcom/google/android/gms/internal/ads/t2;->t:Lu5/c;

    return-void
.end method


# virtual methods
.method public final declared-synchronized v0(I)V
    .registers 8

    monitor-enter p0

    if-gtz p1, :cond_5

    monitor-exit p0

    return-void

    :cond_5
    :try_start_5
    sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    int-to-long v1, p1

    invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J

    move-result-wide v0

    iget-boolean p1, p0, Lcom/google/android/gms/internal/ads/t2;->w:Z

    if-eqz p1, :cond_22

    iget-wide v2, p0, Lcom/google/android/gms/internal/ads/t2;->v:J

    const-wide/16 v4, 0x0

    cmp-long p1, v2, v4

    if-lez p1, :cond_1d

    cmp-long p1, v0, v2

    if-gez p1, :cond_1d

    goto :goto_1e

    :cond_1d
    move-wide v0, v2

    :goto_1e
    iput-wide v0, p0, Lcom/google/android/gms/internal/ads/t2;->v:J
    :try_end_20
    .catchall {:try_start_5 .. :try_end_20} :catchall_41

    monitor-exit p0

    return-void

    :cond_22
    :try_start_22
    iget-object p1, p0, Lcom/google/android/gms/internal/ads/t2;->t:Lu5/c;

    invoke-interface {p1}, Lu5/c;->c()J

    move-result-wide v2

    iget-wide v4, p0, Lcom/google/android/gms/internal/ads/t2;->u:J

    cmp-long p1, v2, v4

    if-gtz p1, :cond_3c

    iget-object p1, p0, Lcom/google/android/gms/internal/ads/t2;->t:Lu5/c;

    invoke-interface {p1}, Lu5/c;->c()J

    move-result-wide v2
    :try_end_34
    .catchall {:try_start_22 .. :try_end_34} :catchall_41

    sub-long/2addr v4, v2

    cmp-long p1, v4, v0

    if-lez p1, :cond_3a

    goto :goto_3c

    :cond_3a
    monitor-exit p0

    return-void

    :cond_3c
    :goto_3c
    :try_start_3c
    invoke-virtual {p0, v0, v1}, Lcom/google/android/gms/internal/ads/t2;->w0(J)V
    :try_end_3f
    .catchall {:try_start_3c .. :try_end_3f} :catchall_41

    monitor-exit p0

    return-void

    :catchall_41
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public final declared-synchronized w0(J)V
    .registers 6

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/google/android/gms/internal/ads/t2;->x:Ljava/util/concurrent/ScheduledFuture;

    if-eqz v0, :cond_11

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

    move-result v0

    if-nez v0, :cond_11

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/t2;->x:Ljava/util/concurrent/ScheduledFuture;

    const/4 v1, 0x1

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

    :cond_11
    iget-object v0, p0, Lcom/google/android/gms/internal/ads/t2;->t:Lu5/c;

    invoke-interface {v0}, Lu5/c;->c()J

    move-result-wide v0

    add-long/2addr v0, p1

    iput-wide v0, p0, Lcom/google/android/gms/internal/ads/t2;->u:J

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/t2;->s:Ljava/util/concurrent/ScheduledExecutorService;

    new-instance v1, Lz5/dc0;

    invoke-direct {v1, p0}, Lz5/dc0;-><init>(Lcom/google/android/gms/internal/ads/t2;)V

    sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v0, v1, p1, p2, v2}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;

    move-result-object p1

    iput-object p1, p0, Lcom/google/android/gms/internal/ads/t2;->x:Ljava/util/concurrent/ScheduledFuture;
    :try_end_29
    .catchall {:try_start_1 .. :try_end_29} :catchall_2b

    monitor-exit p0

    return-void

    :catchall_2b
    move-exception p1

    monitor-exit p0

    throw p1
.end method
