summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2012-04-16 14:57:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-16 14:57:34 -0700
commit127cdf6e6051cdded8fd84e7b5109dc329dfc7c2 (patch)
tree9aab3b16d8b2372be14e27d0ec4404d6d21b5e3f
parentc24ad532414d428b65a72598b97f096b887af81f (diff)
parent72eebb6b6d4b16bcba415236dd182a3ba9a72951 (diff)
downloadframeworks_base-127cdf6e6051cdded8fd84e7b5109dc329dfc7c2.zip
frameworks_base-127cdf6e6051cdded8fd84e7b5109dc329dfc7c2.tar.gz
frameworks_base-127cdf6e6051cdded8fd84e7b5109dc329dfc7c2.tar.bz2
Merge "Add # of changed rows to executeForChangedRowCount log"
-rw-r--r--core/java/android/database/sqlite/SQLiteConnection.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index 254f652..04f6377 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -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);
+ }
}
}