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>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
package com.singular.sdk.internal;
import android.content.Context;
import com.singular.sdk.internal.QueueFile;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.OutputStreamWriter;
/* loaded from: classes4.dex */
public final class FixedSizePersistentQueue implements Queue {
public static final SingularLog logger = SingularLog.getLogger(FixedSizePersistentQueue.class.getSimpleName());
public final int MAX_SIZE;
public final DirectByteArrayOutputStream bytes = new DirectByteArrayOutputStream();
public final QueueFile queueFile;
public static class DirectByteArrayOutputStream extends ByteArrayOutputStream {
public byte[] getArray() {
return ((ByteArrayOutputStream) this).buf;
}
}
public static FixedSizePersistentQueue create(Context context, String str, int i) {
File file = new File(context.getFilesDir(), str);
if (file.exists()) {
logger.debug("FYI - file %s already exists, will reuse.", file.getName());
}
return new FixedSizePersistentQueue(new QueueFile.Builder(file).build(), i);
}
public FixedSizePersistentQueue(QueueFile queueFile, int i) {
this.queueFile = queueFile;
this.MAX_SIZE = i;
}
public synchronized int size() {
return this.queueFile.size();
}
public synchronized boolean isEmpty() {
return size() == 0;
}
@Override // com.singular.sdk.internal.Queue
public synchronized void add(String str) {
try {
if (Utils.isEmptyOrNull(str)) {
return;
}
if (this.queueFile.size() >= this.MAX_SIZE) {
this.queueFile.remove(1);
}
this.bytes.reset();
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(this.bytes);
outputStreamWriter.write(str);
outputStreamWriter.close();
this.queueFile.add(this.bytes.getArray(), 0, this.bytes.size());
} catch (Throwable th) {
throw th;
}
}
@Override // com.singular.sdk.internal.Queue
public synchronized String peek() {
byte[] peek = this.queueFile.peek();
if (peek == null) {
return null;
}
return new String(peek, "UTF-8");
}
@Override // com.singular.sdk.internal.Queue
public synchronized void remove() {
remove(1);
}
public synchronized void remove(int i) {
if (i <= size()) {
this.queueFile.remove(i);
}
}
}