q$c.smali 3.4 KB
.class public Lb/h0/i/q$c;
.super Lc/c;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lb/h0/i/q;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "c"
.end annotation


# instance fields
.field public final synthetic k:Lb/h0/i/q;


# direct methods
.method public constructor <init>(Lb/h0/i/q;)V
    .locals 0

    iput-object p1, p0, Lb/h0/i/q$c;->k:Lb/h0/i/q;

    invoke-direct {p0}, Lc/c;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Ljava/io/IOException;)Ljava/io/IOException;
    .locals 2

    new-instance v0, Ljava/net/SocketTimeoutException;

    const-string v1, "timeout"

    invoke-direct {v0, v1}, Ljava/net/SocketTimeoutException;-><init>(Ljava/lang/String;)V

    if-eqz p1, :cond_0

    invoke-virtual {v0, p1}, Ljava/net/SocketTimeoutException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

    :cond_0
    return-object v0
.end method

.method public i()V
    .locals 7

    iget-object v0, p0, Lb/h0/i/q$c;->k:Lb/h0/i/q;

    sget-object v1, Lb/h0/i/b;->f:Lb/h0/i/b;

    .line 1
    invoke-virtual {v0, v1}, Lb/h0/i/q;->b(Lb/h0/i/b;)Z

    move-result v2

    if-nez v2, :cond_0

    goto :goto_0

    :cond_0
    iget-object v2, v0, Lb/h0/i/q;->e:Lb/h0/i/g;

    iget v0, v0, Lb/h0/i/q;->d:I

    invoke-virtual {v2, v0, v1}, Lb/h0/i/g;->a(ILb/h0/i/b;)V

    .line 2
    :goto_0
    iget-object v0, p0, Lb/h0/i/q$c;->k:Lb/h0/i/q;

    iget-object v0, v0, Lb/h0/i/q;->e:Lb/h0/i/g;

    .line 3
    monitor-enter v0

    :try_start_0
    iget-wide v1, v0, Lb/h0/i/g;->p:J

    iget-wide v3, v0, Lb/h0/i/g;->o:J

    cmp-long v1, v1, v3

    if-gez v1, :cond_1

    monitor-exit v0

    goto :goto_1

    :cond_1
    const-wide/16 v1, 0x1

    add-long/2addr v3, v1

    iput-wide v3, v0, Lb/h0/i/g;->o:J

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v1

    const-wide/32 v3, 0x3b9aca00

    add-long/2addr v1, v3

    iput-wide v1, v0, Lb/h0/i/g;->r:J

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :try_start_1
    iget-object v1, v0, Lb/h0/i/g;->j:Ljava/util/concurrent/ScheduledExecutorService;

    new-instance v2, Lb/h0/i/h;
    :try_end_1
    .catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_1 .. :try_end_1} :catch_0

    const-string v3, "OkHttp %s ping"

    const/4 v4, 0x1

    :try_start_2
    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    iget-object v6, v0, Lb/h0/i/g;->f:Ljava/lang/String;

    aput-object v6, v4, v5

    invoke-direct {v2, v0, v3, v4}, Lb/h0/i/h;-><init>(Lb/h0/i/g;Ljava/lang/String;[Ljava/lang/Object;)V

    invoke-interface {v1, v2}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
    :try_end_2
    .catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    :goto_1
    return-void

    :catchall_0
    move-exception v1

    :try_start_3
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v1
.end method

.method public j()V
    .locals 1

    invoke-virtual {p0}, Lc/c;->h()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lb/h0/i/q$c;->a(Ljava/io/IOException;)Ljava/io/IOException;

    move-result-object v0

    throw v0
.end method