It's almost the same time because Cursor.moveToFirst() call SQLiteCursor.getCount().
Look at
- GrepCode / com.google.android / android
- android.database.AbstractCursor
- GrepCode / com.google.android / android / 5.1.1_r1 / android.database.AbstractCursor
- GrepCode / com.google.android / android / 5.1.1_r1 / android.database.AbstractCursor
- GrepCode / com.google.android / android / 2.0_r1 / android.database.AbstractCursor
- GrepCode / com.google.android / android / 5.1.1_r1 / android.database.sqlite.SQLiteCursor
// android.database.AbstractCursor
/* These need to be implemented by subclasses */
abstract public int More ...getCount();
public final boolean moveToFirst() {
return moveToPosition(0);
}
public final boolean moveToPosition(int position) {
// Make sure position isn't past the end of the cursor
final int count = getCount();
// ....
}
// android.database.sqlite.SQLiteCursor
@Override
public int More ...getCount() {
if (mCount == NO_COUNT) {
fillWindow(0);
}
return mCount;
}