Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccbb94ca authored by Lee Shombert's avatar Lee Shombert
Browse files

Clean up database.sqlite flags

This change removes the following flags:
 * android.database.sqlite.concurrent_open_helper
 * android.database.sqlite.oneway_finalizer_close_fixed

The concurrent_open_helper should not have been exported but it
was and so cannot be removed.

Flag: EXEMPT removing android.database.sqlite.concurrent_open_helper
Flag: EXEMPT removing android.database.sqlite.oneway_finalizer_close_fixed
Bug: 424001157
Test: atest
 * CtsDatabaseTestCases
 * FrameworksCoreTests:android.database

Change-Id: If38d706ee81185d9050184ddd7b7c3e2cbdafc1d
parent 9b769d46
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -215,8 +215,7 @@ final class BulkCursorProxy implements IBulkCursor {
            // If close() is being called from the finalizer thread, do not wait for a reply from
            // the remote side.
            final boolean fromFinalizer =
                    android.database.sqlite.Flags.onewayFinalizerCloseFixed()
                    && "FinalizerDaemon".equals(Thread.currentThread().getName());
                    "FinalizerDaemon".equals(Thread.currentThread().getName());
            mRemote.transact(CLOSE_TRANSACTION, data, reply,
                    fromFinalizer ? IBinder.FLAG_ONEWAY: 0);
            if (!fromFinalizer) {
+1 −5
Original line number Diff line number Diff line
@@ -25,13 +25,9 @@ import android.database.DatabaseErrorHandler;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.os.FileUtils;
import android.util.ArrayMap;
import android.util.Log;

import com.android.internal.annotations.GuardedBy;

import java.io.File;
import java.io.IOException;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

@@ -182,7 +178,7 @@ public abstract class SQLiteOpenHelper implements AutoCloseable {
        setOpenParamsBuilder(openParamsBuilder);

        Object lock = null;
        if (!Flags.concurrentOpenHelper() || mName == null) {
        if (mName == null) {
            lock = new Object();
        } else {
            lock = sDbLock.computeIfAbsent(mName, (String k) -> new Object());
+0 −8
Original line number Diff line number Diff line
package: "android.database.sqlite"
container: "system"

flag {
     name: "oneway_finalizer_close_fixed"
     namespace: "system_performance"
     is_fixed_read_only: true
     description: "Make BuildCursorNative.close oneway if in the finalizer"
     bug: "368221351"
}

flag {
     name: "sqlite_apis_35"
     is_exported: true