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

Commit 09e50cdb authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Code Review
Browse files

Merge "Reorder lock acquision vs try."

parents 8fc378f9 38767b34
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -131,11 +131,11 @@ public class SQLiteCursor extends AbstractWindowedCursor {
            // the cursor's state doesn't change
            while (true) {
                mLock.lock();
                try {
                    if (mCursorState != mThreadState) {
                    mLock.unlock();
                        break;
                    }
                try {

                    int count = mQuery.fillWindow(cw, mMaxRead, mCount);
                    // return -1 means not finished
                    if (count != 0) {
@@ -217,9 +217,8 @@ public class SQLiteCursor extends AbstractWindowedCursor {
        mColumnNameMap = null;
        mQuery = query;

        try {
        db.lock();

        try {
            // Setup the list of columns
            int columnCount = mQuery.columnCountLocked();
            mColumns = new String[columnCount];