Files
rr3-apk/decompiled-community/sources/androidx/room/QueryInterceptorDatabase.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

432 lines
19 KiB
Java

package androidx.room;
import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteTransactionListener;
import android.os.CancellationSignal;
import android.util.Pair;
import androidx.annotation.RequiresApi;
import androidx.room.RoomDatabase;
import androidx.sqlite.db.SupportSQLiteDatabase;
import androidx.sqlite.db.SupportSQLiteQuery;
import androidx.sqlite.db.SupportSQLiteStatement;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Executor;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nQueryInterceptorDatabase.kt\nKotlin\n*S Kotlin\n*F\n+ 1 QueryInterceptorDatabase.kt\nandroidx/room/QueryInterceptorDatabase\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,146:1\n1#2:147\n37#3,2:148\n*S KotlinDebug\n*F\n+ 1 QueryInterceptorDatabase.kt\nandroidx/room/QueryInterceptorDatabase\n*L\n143#1:148,2\n*E\n"})
/* loaded from: classes.dex */
public final class QueryInterceptorDatabase implements SupportSQLiteDatabase {
private final SupportSQLiteDatabase delegate;
private final RoomDatabase.QueryCallback queryCallback;
private final Executor queryCallbackExecutor;
@Override // java.io.Closeable, java.lang.AutoCloseable
public void close() {
this.delegate.close();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public int delete(String table, String str, Object[] objArr) {
Intrinsics.checkNotNullParameter(table, "table");
return this.delegate.delete(table, str, objArr);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
@RequiresApi(api = 16)
public void disableWriteAheadLogging() {
this.delegate.disableWriteAheadLogging();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean enableWriteAheadLogging() {
return this.delegate.enableWriteAheadLogging();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void execPerConnectionSQL(String sql, @SuppressLint({"ArrayReturn"}) Object[] objArr) {
Intrinsics.checkNotNullParameter(sql, "sql");
this.delegate.execPerConnectionSQL(sql, objArr);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public List<Pair<String, String>> getAttachedDbs() {
return this.delegate.getAttachedDbs();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public long getMaximumSize() {
return this.delegate.getMaximumSize();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public long getPageSize() {
return this.delegate.getPageSize();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public String getPath() {
return this.delegate.getPath();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public int getVersion() {
return this.delegate.getVersion();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean inTransaction() {
return this.delegate.inTransaction();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public long insert(String table, int i, ContentValues values) {
Intrinsics.checkNotNullParameter(table, "table");
Intrinsics.checkNotNullParameter(values, "values");
return this.delegate.insert(table, i, values);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean isDatabaseIntegrityOk() {
return this.delegate.isDatabaseIntegrityOk();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean isDbLockedByCurrentThread() {
return this.delegate.isDbLockedByCurrentThread();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean isExecPerConnectionSQLSupported() {
return this.delegate.isExecPerConnectionSQLSupported();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean isOpen() {
return this.delegate.isOpen();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean isReadOnly() {
return this.delegate.isReadOnly();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
@RequiresApi(api = 16)
public boolean isWriteAheadLoggingEnabled() {
return this.delegate.isWriteAheadLoggingEnabled();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean needUpgrade(int i) {
return this.delegate.needUpgrade(i);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
@RequiresApi(api = 16)
public void setForeignKeyConstraintsEnabled(boolean z) {
this.delegate.setForeignKeyConstraintsEnabled(z);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void setLocale(Locale locale) {
Intrinsics.checkNotNullParameter(locale, "locale");
this.delegate.setLocale(locale);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void setMaxSqlCacheSize(int i) {
this.delegate.setMaxSqlCacheSize(i);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public long setMaximumSize(long j) {
return this.delegate.setMaximumSize(j);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void setPageSize(long j) {
this.delegate.setPageSize(j);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void setVersion(int i) {
this.delegate.setVersion(i);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public int update(String table, int i, ContentValues values, String str, Object[] objArr) {
Intrinsics.checkNotNullParameter(table, "table");
Intrinsics.checkNotNullParameter(values, "values");
return this.delegate.update(table, i, values, str, objArr);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean yieldIfContendedSafely() {
return this.delegate.yieldIfContendedSafely();
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public boolean yieldIfContendedSafely(long j) {
return this.delegate.yieldIfContendedSafely(j);
}
public QueryInterceptorDatabase(SupportSQLiteDatabase delegate, Executor queryCallbackExecutor, RoomDatabase.QueryCallback queryCallback) {
Intrinsics.checkNotNullParameter(delegate, "delegate");
Intrinsics.checkNotNullParameter(queryCallbackExecutor, "queryCallbackExecutor");
Intrinsics.checkNotNullParameter(queryCallback, "queryCallback");
this.delegate = delegate;
this.queryCallbackExecutor = queryCallbackExecutor;
this.queryCallback = queryCallback;
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public SupportSQLiteStatement compileStatement(String sql) {
Intrinsics.checkNotNullParameter(sql, "sql");
return new QueryInterceptorStatement(this.delegate.compileStatement(sql), sql, this.queryCallbackExecutor, this.queryCallback);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void beginTransaction() {
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.beginTransaction$lambda$0(QueryInterceptorDatabase.this);
}
});
this.delegate.beginTransaction();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void beginTransaction$lambda$0(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("BEGIN EXCLUSIVE TRANSACTION", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void beginTransactionNonExclusive() {
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.beginTransactionNonExclusive$lambda$1(QueryInterceptorDatabase.this);
}
});
this.delegate.beginTransactionNonExclusive();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void beginTransactionNonExclusive$lambda$1(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("BEGIN DEFERRED TRANSACTION", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void beginTransactionWithListener(SQLiteTransactionListener transactionListener) {
Intrinsics.checkNotNullParameter(transactionListener, "transactionListener");
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda11
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.beginTransactionWithListener$lambda$2(QueryInterceptorDatabase.this);
}
});
this.delegate.beginTransactionWithListener(transactionListener);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void beginTransactionWithListener$lambda$2(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("BEGIN EXCLUSIVE TRANSACTION", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void beginTransactionWithListenerNonExclusive(SQLiteTransactionListener transactionListener) {
Intrinsics.checkNotNullParameter(transactionListener, "transactionListener");
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.beginTransactionWithListenerNonExclusive$lambda$3(QueryInterceptorDatabase.this);
}
});
this.delegate.beginTransactionWithListenerNonExclusive(transactionListener);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void beginTransactionWithListenerNonExclusive$lambda$3(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("BEGIN DEFERRED TRANSACTION", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void endTransaction() {
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda8
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.endTransaction$lambda$4(QueryInterceptorDatabase.this);
}
});
this.delegate.endTransaction();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void endTransaction$lambda$4(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("END TRANSACTION", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void setTransactionSuccessful() {
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.setTransactionSuccessful$lambda$5(QueryInterceptorDatabase.this);
}
});
this.delegate.setTransactionSuccessful();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void setTransactionSuccessful$lambda$5(QueryInterceptorDatabase this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.queryCallback.onQuery("TRANSACTION SUCCESSFUL", CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public Cursor query(final String query) {
Intrinsics.checkNotNullParameter(query, "query");
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda7
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.query$lambda$6(QueryInterceptorDatabase.this, query);
}
});
return this.delegate.query(query);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void query$lambda$6(QueryInterceptorDatabase this$0, String query) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(query, "$query");
this$0.queryCallback.onQuery(query, CollectionsKt__CollectionsKt.emptyList());
}
/* JADX INFO: Access modifiers changed from: private */
public static final void query$lambda$7(QueryInterceptorDatabase this$0, String query, Object[] bindArgs) {
List<? extends Object> list;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(query, "$query");
Intrinsics.checkNotNullParameter(bindArgs, "$bindArgs");
RoomDatabase.QueryCallback queryCallback = this$0.queryCallback;
list = ArraysKt___ArraysKt.toList(bindArgs);
queryCallback.onQuery(query, list);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public Cursor query(final String query, final Object[] bindArgs) {
Intrinsics.checkNotNullParameter(query, "query");
Intrinsics.checkNotNullParameter(bindArgs, "bindArgs");
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.query$lambda$7(QueryInterceptorDatabase.this, query, bindArgs);
}
});
return this.delegate.query(query, bindArgs);
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public Cursor query(final SupportSQLiteQuery query) {
Intrinsics.checkNotNullParameter(query, "query");
final QueryInterceptorProgram queryInterceptorProgram = new QueryInterceptorProgram();
query.bindTo(queryInterceptorProgram);
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.query$lambda$8(QueryInterceptorDatabase.this, query, queryInterceptorProgram);
}
});
return this.delegate.query(query);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void query$lambda$8(QueryInterceptorDatabase this$0, SupportSQLiteQuery query, QueryInterceptorProgram queryInterceptorProgram) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(query, "$query");
Intrinsics.checkNotNullParameter(queryInterceptorProgram, "$queryInterceptorProgram");
this$0.queryCallback.onQuery(query.getSql(), queryInterceptorProgram.getBindArgsCache$room_runtime_release());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public Cursor query(final SupportSQLiteQuery query, CancellationSignal cancellationSignal) {
Intrinsics.checkNotNullParameter(query, "query");
final QueryInterceptorProgram queryInterceptorProgram = new QueryInterceptorProgram();
query.bindTo(queryInterceptorProgram);
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.query$lambda$9(QueryInterceptorDatabase.this, query, queryInterceptorProgram);
}
});
return this.delegate.query(query);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void query$lambda$9(QueryInterceptorDatabase this$0, SupportSQLiteQuery query, QueryInterceptorProgram queryInterceptorProgram) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(query, "$query");
Intrinsics.checkNotNullParameter(queryInterceptorProgram, "$queryInterceptorProgram");
this$0.queryCallback.onQuery(query.getSql(), queryInterceptorProgram.getBindArgsCache$room_runtime_release());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void execSQL(final String sql) {
Intrinsics.checkNotNullParameter(sql, "sql");
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda10
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.execSQL$lambda$10(QueryInterceptorDatabase.this, sql);
}
});
this.delegate.execSQL(sql);
}
/* JADX INFO: Access modifiers changed from: private */
public static final void execSQL$lambda$10(QueryInterceptorDatabase this$0, String sql) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(sql, "$sql");
this$0.queryCallback.onQuery(sql, CollectionsKt__CollectionsKt.emptyList());
}
@Override // androidx.sqlite.db.SupportSQLiteDatabase
public void execSQL(final String sql, Object[] bindArgs) {
List createListBuilder;
final List build;
Intrinsics.checkNotNullParameter(sql, "sql");
Intrinsics.checkNotNullParameter(bindArgs, "bindArgs");
createListBuilder = CollectionsKt__CollectionsJVMKt.createListBuilder();
CollectionsKt__MutableCollectionsKt.addAll(createListBuilder, bindArgs);
build = CollectionsKt__CollectionsJVMKt.build(createListBuilder);
this.queryCallbackExecutor.execute(new Runnable() { // from class: androidx.room.QueryInterceptorDatabase$$ExternalSyntheticLambda9
@Override // java.lang.Runnable
public final void run() {
QueryInterceptorDatabase.execSQL$lambda$12(QueryInterceptorDatabase.this, sql, build);
}
});
this.delegate.execSQL(sql, build.toArray(new Object[0]));
}
/* JADX INFO: Access modifiers changed from: private */
public static final void execSQL$lambda$12(QueryInterceptorDatabase this$0, String sql, List inputArguments) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(sql, "$sql");
Intrinsics.checkNotNullParameter(inputArguments, "$inputArguments");
this$0.queryCallback.onQuery(sql, inputArguments);
}
}