Merge "when printing requery on UI warning, include additional info"
This commit is contained in:
@@ -416,8 +416,10 @@ public class SQLiteCursor extends AbstractWindowedCursor {
|
||||
// BEGIN STOPSHIP remove the following line
|
||||
t = new RequeryOnUiThreadException(packageName);
|
||||
// END STOPSHIP
|
||||
Log.w(TAG, "should not attempt requery on main (UI) thread: app = " +
|
||||
packageName == null ? "'unknown'" : packageName, t);
|
||||
String s = packageName == null ? "'unknown'" : packageName;
|
||||
Log.w(TAG, "should not attempt requery on main (UI) thread: app = " + s +
|
||||
" (database: " + mQuery.mDatabase.getPath() +
|
||||
", query: " + mQuery.mSql + ")", t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2114,7 +2114,14 @@ public class SQLiteDatabase extends SQLiteClosable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mCacheFullWarning && mCompiledQueries.size() == mMaxSqlCacheSize) {
|
||||
int maxCacheSz = (mConnectionNum == 0) ? mMaxSqlCacheSize :
|
||||
mParentConnObj.mMaxSqlCacheSize;
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user