.class public Lp0/b; .super Lp0/y; .source "AsyncTimeout.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lp0/b$b;, Lp0/b$a; } .end annotation # static fields .field public static final h:J .field public static final i:J .field public static j:Lp0/b; .field public static final k:Lp0/b$a; # instance fields .field public e:Z .field public f:Lp0/b; .field public g:J # direct methods .method public static constructor ()V .locals 3 new-instance v0, Lp0/b$a; const/4 v1, 0x0 invoke-direct {v0, v1}, Lp0/b$a;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Lp0/b;->k:Lp0/b$a; sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit; const-wide/16 v1, 0x3c invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J move-result-wide v0 sput-wide v0, Lp0/b;->h:J sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit; sget-wide v1, Lp0/b;->h:J invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J move-result-wide v0 sput-wide v0, Lp0/b;->i:J return-void .end method .method public constructor ()V .locals 0 invoke-direct {p0}, Lp0/y;->()V return-void .end method # virtual methods .method public final i()V .locals 10 iget-boolean v0, p0, Lp0/b;->e:Z const/4 v1, 0x1 xor-int/2addr v0, v1 if-eqz v0, :cond_b iget-wide v2, p0, Lp0/y;->c:J iget-boolean v0, p0, Lp0/y;->a:Z const-wide/16 v4, 0x0 cmp-long v6, v2, v4 if-nez v6, :cond_0 if-nez v0, :cond_0 return-void :cond_0 iput-boolean v1, p0, Lp0/b;->e:Z const-class v1, Lp0/b; monitor-enter v1 :try_start_0 sget-object v4, Lp0/b;->j:Lp0/b; if-nez v4, :cond_1 new-instance v4, Lp0/b; invoke-direct {v4}, Lp0/b;->()V sput-object v4, Lp0/b;->j:Lp0/b; new-instance v4, Lp0/b$b; invoke-direct {v4}, Lp0/b$b;->()V invoke-virtual {v4}, Ljava/lang/Thread;->start()V :cond_1 invoke-static {}, Ljava/lang/System;->nanoTime()J move-result-wide v4 if-eqz v6, :cond_2 if-eqz v0, :cond_2 invoke-virtual {p0}, Lp0/y;->c()J move-result-wide v6 sub-long/2addr v6, v4 invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->min(JJ)J move-result-wide v2 add-long/2addr v2, v4 iput-wide v2, p0, Lp0/b;->g:J goto :goto_0 :cond_2 if-eqz v6, :cond_3 add-long/2addr v2, v4 iput-wide v2, p0, Lp0/b;->g:J goto :goto_0 :cond_3 if-eqz v0, :cond_a invoke-virtual {p0}, Lp0/y;->c()J move-result-wide v2 iput-wide v2, p0, Lp0/b;->g:J :goto_0 iget-wide v2, p0, Lp0/b;->g:J sub-long/2addr v2, v4 sget-object v0, Lp0/b;->j:Lp0/b; const/4 v6, 0x0 if-eqz v0, :cond_9 :goto_1 iget-object v7, v0, Lp0/b;->f:Lp0/b; if-eqz v7, :cond_7 iget-object v7, v0, Lp0/b;->f:Lp0/b; if-eqz v7, :cond_6 iget-wide v7, v7, Lp0/b;->g:J sub-long/2addr v7, v4 cmp-long v9, v2, v7 if-gez v9, :cond_4 goto :goto_2 :cond_4 iget-object v0, v0, Lp0/b;->f:Lp0/b; if-eqz v0, :cond_5 goto :goto_1 :cond_5 invoke-static {}, Lk0/n/c/i;->throwNpe()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v6 :cond_6 :try_start_1 invoke-static {}, Lk0/n/c/i;->throwNpe()V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v6 :cond_7 :goto_2 :try_start_2 iget-object v2, v0, Lp0/b;->f:Lp0/b; iput-object v2, p0, Lp0/b;->f:Lp0/b; iput-object p0, v0, Lp0/b;->f:Lp0/b; sget-object v2, Lp0/b;->j:Lp0/b; if-ne v0, v2, :cond_8 invoke-virtual {v1}, Ljava/lang/Object;->notify()V :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 :cond_8 monitor-exit v1 return-void :cond_9 :try_start_3 invoke-static {}, Lk0/n/c/i;->throwNpe()V :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 throw v6 :cond_a :try_start_4 new-instance v0, Ljava/lang/AssertionError; invoke-direct {v0}, Ljava/lang/AssertionError;->()V throw v0 :try_end_4 .catchall {:try_start_4 .. :try_end_4} :catchall_0 :catchall_0 move-exception v0 monitor-exit v1 throw v0 :cond_b const-string v0, "Unbalanced enter/exit" new-instance v1, Ljava/lang/IllegalStateException; invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v1 .end method .method public final j()Z .locals 5 iget-boolean v0, p0, Lp0/b;->e:Z const/4 v1, 0x0 if-nez v0, :cond_0 return v1 :cond_0 iput-boolean v1, p0, Lp0/b;->e:Z const/4 v0, 0x0 const-class v2, Lp0/b; monitor-enter v2 :try_start_0 sget-object v3, Lp0/b;->j:Lp0/b; :goto_0 if-eqz v3, :cond_2 iget-object v4, v3, Lp0/b;->f:Lp0/b; if-ne v4, p0, :cond_1 iget-object v4, p0, Lp0/b;->f:Lp0/b; iput-object v4, v3, Lp0/b;->f:Lp0/b; iput-object v0, p0, Lp0/b;->f:Lp0/b; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit v2 goto :goto_1 :cond_1 :try_start_1 iget-object v3, v3, Lp0/b;->f:Lp0/b; :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 goto :goto_0 :cond_2 const/4 v1, 0x1 monitor-exit v2 :goto_1 return v1 :catchall_0 move-exception v0 monitor-exit v2 throw v0 .end method .method public k(Ljava/io/IOException;)Ljava/io/IOException; .locals 2 new-instance v0, Ljava/io/InterruptedIOException; const-string v1, "timeout" invoke-direct {v0, v1}, Ljava/io/InterruptedIOException;->(Ljava/lang/String;)V if-eqz p1, :cond_0 invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; :cond_0 return-object v0 .end method .method public l()V .locals 0 return-void .end method