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

Commit e0c1acbc authored by Vasu Nori's avatar Vasu Nori Committed by Android (Google) Code Review
Browse files

Merge "add new param to device config properties: db connection pool size"

parents 8dc81c10 627b331b
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.database.sqlite;

import android.content.res.Resources;
import android.os.SystemClock;
import android.util.Log;

@@ -31,13 +32,9 @@ import java.util.Random;

    private static final String TAG = "DatabaseConnectionPool";

    /** The default connection pool size. It is set based on the amount of memory the device has.
     * TODO: set this with 'a system call' which returns the amount of memory the device has
     */
    private static final int DEFAULT_CONNECTION_POOL_SIZE = 1;

    /** the pool size set for this {@link SQLiteDatabase} */
    private volatile int mMaxPoolSize = DEFAULT_CONNECTION_POOL_SIZE;
    /** The default connection pool size. */
    private volatile int mMaxPoolSize =
        Resources.getSystem().getInteger(com.android.internal.R.integer.db_connection_pool_size);

    /** The connection pool objects are stored in this member.
     * TODO: revisit this data struct as the number of pooled connections increase beyond
+4 −0
Original line number Diff line number Diff line
@@ -416,4 +416,8 @@

    <!-- Enables SIP on WIFI only -->
    <bool name="config_sip_wifi_only">false</bool>

    <!-- Number of database connections opened and managed by framework layer
         to handle queries on each database. -->
    <integer name="db_connection_pool_size">1</integer>
</resources>