diff --git a/core/java/android/database/sqlite/DatabaseConnectionPool.java b/core/java/android/database/sqlite/DatabaseConnectionPool.java index 54b06054f86c4..4f5c4e63770b6 100644 --- a/core/java/android/database/sqlite/DatabaseConnectionPool.java +++ b/core/java/android/database/sqlite/DatabaseConnectionPool.java @@ -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 diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index ff37d05d5b9f0..b4e1fcbbd0cc3 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -416,4 +416,8 @@ false + + + 1