Files
rr3-apk/decompiled-community/sources/androidx/room/SharedSQLiteStatement.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

72 lines
2.2 KiB
Java

package androidx.room;
import androidx.annotation.RestrictTo;
import androidx.sqlite.db.SupportSQLiteStatement;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
/* loaded from: classes.dex */
public abstract class SharedSQLiteStatement {
private final RoomDatabase database;
private final AtomicBoolean lock;
private final Lazy stmt$delegate;
public abstract String createQuery();
public SharedSQLiteStatement(RoomDatabase database) {
Lazy lazy;
Intrinsics.checkNotNullParameter(database, "database");
this.database = database;
this.lock = new AtomicBoolean(false);
lazy = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: androidx.room.SharedSQLiteStatement$stmt$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final SupportSQLiteStatement invoke() {
SupportSQLiteStatement createNewStatement;
createNewStatement = SharedSQLiteStatement.this.createNewStatement();
return createNewStatement;
}
});
this.stmt$delegate = lazy;
}
private final SupportSQLiteStatement getStmt() {
return (SupportSQLiteStatement) this.stmt$delegate.getValue();
}
public void assertNotMainThread() {
this.database.assertNotMainThread();
}
/* JADX INFO: Access modifiers changed from: private */
public final SupportSQLiteStatement createNewStatement() {
return this.database.compileStatement(createQuery());
}
private final SupportSQLiteStatement getStmt(boolean z) {
if (z) {
return getStmt();
}
return createNewStatement();
}
public SupportSQLiteStatement acquire() {
assertNotMainThread();
return getStmt(this.lock.compareAndSet(false, true));
}
public void release(SupportSQLiteStatement statement) {
Intrinsics.checkNotNullParameter(statement, "statement");
if (statement == getStmt()) {
this.lock.set(false);
}
}
}