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

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

Merge "bug:2622719 move 'forcing of cursor execution' to ContentProvider" into froyo

parents 6e4895b6 020e5345
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -247,6 +247,8 @@ public abstract class ContentResolver {
                releaseProvider(provider);
                return null;
            }
            // force query execution
            qCursor.getCount();
            long durationMillis = SystemClock.uptimeMillis() - startTime;
            maybeLogQueryToEventLog(durationMillis, uri, projection, selection, sortOrder);
            // Wrap the cursor object into CursorWrapperInner object
+7 −7
Original line number Diff line number Diff line
@@ -1341,18 +1341,18 @@ public class SQLiteDatabase extends SQLiteClosable {
        SQLiteCursorDriver driver = new SQLiteDirectCursorDriver(this, sql, editTable);

        Cursor cursor = null;
        int count = 0;
        try {
            cursor = driver.query(
                    cursorFactory != null ? cursorFactory : mFactory,
                    selectionArgs);
        } finally {
            if (Config.LOGV || mSlowQueryThreshold != -1) {

                // Force query execution
                int count = -1;
                if (cursor != null) {
                    count = cursor.getCount();
                }
        } finally {
            if (Config.LOGV || mSlowQueryThreshold != -1) {

                long duration = System.currentTimeMillis() - timeStart;