133 lines
2.3 KiB
Smali
133 lines
2.3 KiB
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 public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public declared-synchronized block()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InterruptedException;
|
|
}
|
|
.end annotation
|
|
|
|
monitor-enter p0
|
|
|
|
.line 1
|
|
:goto_0
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized close()Z
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
.line 1
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 2
|
|
iput-boolean v1, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 3
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized open()Z
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 1
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 3
|
|
:try_start_1
|
|
iput-boolean v0, p0, Lcom/google/android/exoplayer2/util/ConditionVariable;->isOpen:Z
|
|
|
|
.line 4
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 5
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|