summaryrefslogtreecommitdiffstats
path: root/core/java/android/database/sqlite
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-11-05 14:47:59 -0700
committerVasu Nori <vnori@google.com>2010-11-05 14:47:59 -0700
commitb642518e54624d6667253218ab24cbb9dbd6c179 (patch)
treeb264c738eea86f1f5e2d2e0e94bbe41152cce75c /core/java/android/database/sqlite
parent7301a23fb29f67ef77c07fc220cbd2da4bd41828 (diff)
downloadframeworks_base-b642518e54624d6667253218ab24cbb9dbd6c179.zip
frameworks_base-b642518e54624d6667253218ab24cbb9dbd6c179.tar.gz
frameworks_base-b642518e54624d6667253218ab24cbb9dbd6c179.tar.bz2
fix broken build
Change-Id: If1e5639f48d5155e141bce4bf5deef9de5668c27
Diffstat (limited to 'core/java/android/database/sqlite')
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabase.java34
1 files changed, 19 insertions, 15 deletions
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 865b6b2..79425d6 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -2116,21 +2116,25 @@ public class SQLiteDatabase extends SQLiteClosable {
int maxCacheSz = (mConnectionNum == 0) ? mMaxSqlCacheSize :
mParentConnObj.mMaxSqlCacheSize;
- if (SQLiteDebug.DEBUG_SQL_CACHE && (mConnectionNum == 0)
- ? (!mCacheFullWarning && mCompiledQueries.size() == maxCacheSz)
- : (!mParentConnObj.mCacheFullWarning &&
- mParentConnObj.mCompiledQueries.size() == maxCacheSz)) {
- /*
- * cache size of {@link #mMaxSqlCacheSize} is not enough for this app.
- * log a warning.
- * chances are it is NOT using ? for bindargs - or cachesize is too small.
- */
- Log.w(TAG, "Reached MAX size for compiled-sql statement cache for database " +
- getPath() + ". Use setMaxSqlCacheSize() to increase cachesize. ");
- mCacheFullWarning = true;
- Log.d(TAG, "Here are the SQL statements in Cache of database: " + mPath);
- for (String s : mCompiledQueries.keySet()) {
- Log.d(TAG, "Sql stament in Cache: " + s);
+
+ if (SQLiteDebug.DEBUG_SQL_CACHE) {
+ boolean printWarning = (mConnectionNum == 0)
+ ? (!mCacheFullWarning && mCompiledQueries.size() == maxCacheSz)
+ : (!mParentConnObj.mCacheFullWarning &&
+ mParentConnObj.mCompiledQueries.size() == maxCacheSz);
+ if (printWarning) {
+ /*
+ * cache size of {@link #mMaxSqlCacheSize} is not enough for this app.
+ * log a warning.
+ * chances are it is NOT using ? for bindargs - or cachesize is too small.
+ */
+ Log.w(TAG, "Reached MAX size for compiled-sql statement cache for database " +
+ getPath() + ". Use setMaxSqlCacheSize() to increase cachesize. ");
+ mCacheFullWarning = true;
+ Log.d(TAG, "Here are the SQL statements in Cache of database: " + mPath);
+ for (String s : mCompiledQueries.keySet()) {
+ Log.d(TAG, "Sql stament in Cache: " + s);
+ }
}
}
/* add the given SQLiteCompiledSql compiledStatement to cache.