ConditionVariable.smali
.class public final Lcom/google/android/exoplayer2/util/ConditionVariable;
.super Ljava/lang/Object;
.source "ConditionVariable.java"
# instance fields
.field private isOpen:Z
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 22
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public declared-synchronized block()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
monitor-enter p0
.line 57
:goto_1
:try_start_1
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
if-nez v0, :cond_9
.line 58
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_8
.catchall {:try_start_1 .. :try_end_8} :catchall_b
goto :goto_1
.line 60
.end local p0 # "this":Lcom/google/android/exoplayer2/util/ConditionVariable;
:cond_9
monitor-exit p0
return-void
.line 56
:catchall_b
move-exception v0
monitor-exit p0
goto :goto_f
:goto_e
throw v0
:goto_f
goto :goto_e
.end method
.method public declared-synchronized block(J)Z
.registers 9
.param p1, "timeout" # J
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
monitor-enter p0
.line 70
:try_start_1
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
.line 71
.local v0, "now":J
add-long v2, v0, p1
.line 72
.local v2, "end":J
:goto_7
iget-boolean v4, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
if-nez v4, :cond_1a
cmp-long v4, v0, v2
if-gez v4, :cond_1a
.line 73
sub-long v4, v2, v0
invoke-virtual {p0, v4, v5}, Ljava/lang/Object;->wait(J)V
.line 74
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v4
move-wide v0, v4
goto :goto_7
.line 76
.end local p0 # "this":Lcom/google/android/exoplayer2/util/ConditionVariable;
:cond_1a
iget-boolean v4, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
:try_end_1c
.catchall {:try_start_1 .. :try_end_1c} :catchall_1e
monitor-exit p0
return v4
.line 69
.end local v0 # "now":J
.end local v2 # "end":J
.end local p1 # "timeout":J
:catchall_1e
move-exception p1
monitor-exit p0
goto :goto_22
:goto_21
throw p1
:goto_22
goto :goto_21
.end method
.method public declared-synchronized close()Z
.registers 3
monitor-enter p0
.line 46
:try_start_1
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
.line 47
.local v0, "wasOpen":Z
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_8
.line 48
monitor-exit p0
return v0
.line 45
.end local v0 # "wasOpen":Z
.end local p0 # "this":Lcom/google/android/exoplayer2/util/ConditionVariable;
:catchall_8
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized open()Z
.registers 2
monitor-enter p0
.line 32
:try_start_1
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_10
if-eqz v0, :cond_8
.line 33
const/4 v0, 0x0
monitor-exit p0
return v0
.line 35
:cond_8
const/4 v0, 0x1
:try_start_9
iput-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
.line 36
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_e
.catchall {:try_start_9 .. :try_end_e} :catchall_10
.line 37
monitor-exit p0
return v0
.line 31
.end local p0 # "this":Lcom/google/android/exoplayer2/util/ConditionVariable;
:catchall_10
move-exception v0
monitor-exit p0
throw v0
.end method