- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
package okio;
|
|
|
|
import android.support.v4.media.session.PlaybackStateCompat;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class SegmentPool {
|
|
public static long byteCount;
|
|
public static Segment next;
|
|
|
|
public static Segment take() {
|
|
synchronized (SegmentPool.class) {
|
|
try {
|
|
Segment segment = next;
|
|
if (segment != null) {
|
|
next = segment.next;
|
|
segment.next = null;
|
|
byteCount -= PlaybackStateCompat.ACTION_PLAY_FROM_URI;
|
|
return segment;
|
|
}
|
|
return new Segment();
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void recycle(Segment segment) {
|
|
if (segment.next != null || segment.prev != null) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
if (segment.shared) {
|
|
return;
|
|
}
|
|
synchronized (SegmentPool.class) {
|
|
try {
|
|
long j = byteCount;
|
|
if (j + PlaybackStateCompat.ACTION_PLAY_FROM_URI > PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH) {
|
|
return;
|
|
}
|
|
byteCount = j + PlaybackStateCompat.ACTION_PLAY_FROM_URI;
|
|
segment.next = next;
|
|
segment.limit = 0;
|
|
segment.pos = 0;
|
|
next = segment;
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
}
|