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

Commit c2f64348 authored by Ben Lin's avatar Ben Lin Committed by android-build-merger
Browse files

Merge "Safe check so we don\'t move cursor beyond possible pos scope." into nyc-dev

am: 2360aa3

* commit '2360aa33db829121a25be271edbaaaf26e5b093e':
  Safe check so we don't move cursor beyond possible pos scope.

Change-Id: I6794563ae70782e773bdb83390758120f930fed8
parents fb2f8bfe 4eb283cb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -149,7 +149,10 @@ public class Model {

        mCursor.moveToPosition(-1);
        for (int pos = 0; pos < mCursorCount; ++pos) {
            mCursor.moveToNext();
            if (!mCursor.moveToNext()) {
                Log.e(TAG, "Fail to move cursor to next pos: " + pos);
                return;
            }
            positions[pos] = pos;

            // Generates a Model ID for a cursor entry that refers to a document. The Model ID is a