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

Commit 127cdf6e authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Add # of changed rows to executeForChangedRowCount log"

parents c24ad532 72eebb6b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -711,6 +711,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
            throw new IllegalArgumentException("sql must not be null.");
        }

        int changedRows = 0;
        final int cookie = mRecentOperations.beginOperation("executeForChangedRowCount",
                sql, bindArgs);
        try {
@@ -721,8 +722,9 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
                applyBlockGuardPolicy(statement);
                attachCancellationSignal(cancellationSignal);
                try {
                    return nativeExecuteForChangedRowCount(
                    changedRows = nativeExecuteForChangedRowCount(
                            mConnectionPtr, statement.mStatementPtr);
                    return changedRows;
                } finally {
                    detachCancellationSignal(cancellationSignal);
                }
@@ -733,7 +735,9 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
            mRecentOperations.failOperation(cookie, ex);
            throw ex;
        } finally {
            mRecentOperations.endOperation(cookie);
            if (mRecentOperations.endOperationDeferLog(cookie)) {
                mRecentOperations.logOperation(cookie, "changedRows=" + changedRows);
            }
        }
    }