summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-27 18:12:23 -0700
committerJeff Brown <jeffbrown@google.com>2012-03-27 18:13:11 -0700
commitd19ff5f95dc9ea684edb5097ce97e7bf78c2e628 (patch)
tree291303660ae1bd2acb305d1c608e1af10156a3bb /core/java/android
parent0c44525a4888de321c9497204d59c8515f828499 (diff)
downloadframeworks_base-d19ff5f95dc9ea684edb5097ce97e7bf78c2e628.zip
frameworks_base-d19ff5f95dc9ea684edb5097ce97e7bf78c2e628.tar.gz
frameworks_base-d19ff5f95dc9ea684edb5097ce97e7bf78c2e628.tar.bz2
YieldTransaction should actually commit the transaction.
Bug: 6239243 Change-Id: I2e0dfb0c8f0b062674cc2a1c14955eba9a4b9df3
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/database/sqlite/SQLiteSession.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/database/sqlite/SQLiteSession.java b/core/java/android/database/sqlite/SQLiteSession.java
index 43efb03..9410243 100644
--- a/core/java/android/database/sqlite/SQLiteSession.java
+++ b/core/java/android/database/sqlite/SQLiteSession.java
@@ -398,16 +398,16 @@ public final class SQLiteSession {
throwIfNoTransaction();
assert mConnection != null;
- endTransactionUnchecked(cancellationSignal);
+ endTransactionUnchecked(cancellationSignal, false);
}
- private void endTransactionUnchecked(CancellationSignal cancellationSignal) {
+ private void endTransactionUnchecked(CancellationSignal cancellationSignal, boolean yielding) {
if (cancellationSignal != null) {
cancellationSignal.throwIfCanceled();
}
final Transaction top = mTransactionStack;
- boolean successful = top.mMarkedSuccessful && !top.mChildFailed;
+ boolean successful = (top.mMarkedSuccessful || yielding) && !top.mChildFailed;
RuntimeException listenerException = null;
final SQLiteTransactionListener listener = top.mListener;
@@ -534,7 +534,7 @@ public final class SQLiteSession {
final int transactionMode = mTransactionStack.mMode;
final SQLiteTransactionListener listener = mTransactionStack.mListener;
final int connectionFlags = mConnectionFlags;
- endTransactionUnchecked(cancellationSignal); // might throw
+ endTransactionUnchecked(cancellationSignal, true); // might throw
if (sleepAfterYieldDelayMillis > 0) {
try {