Files
rr3-apk/decompiled/sources/com/mbridge/msdk/playercommon/exoplayer2/util/ConditionVariable.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

44 lines
1.1 KiB
Java

package com.mbridge.msdk.playercommon.exoplayer2.util;
/* loaded from: classes4.dex */
public final class ConditionVariable {
private boolean isOpen;
public final synchronized boolean open() {
if (this.isOpen) {
return false;
}
this.isOpen = true;
notifyAll();
return true;
}
public final synchronized boolean close() {
boolean z;
z = this.isOpen;
this.isOpen = false;
return z;
}
public final synchronized void block() throws InterruptedException {
while (!this.isOpen) {
wait();
}
}
public final synchronized boolean block(long j) throws InterruptedException {
boolean z;
long elapsedRealtime = android.os.SystemClock.elapsedRealtime();
long j2 = j + elapsedRealtime;
while (true) {
z = this.isOpen;
if (z || elapsedRealtime >= j2) {
break;
}
wait(j2 - elapsedRealtime);
elapsedRealtime = android.os.SystemClock.elapsedRealtime();
}
return z;
}
}