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

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

Merge "when printing requery on UI warning, include additional info"

parents 81633150 f0808f81
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }
+8 −1
Original line number Diff line number Diff line
@@ -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.