diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-03-27 18:20:04 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-27 18:20:04 -0700 |
| commit | 73667fe34a26e8334f39345b71a82e86c4ba0bfa (patch) | |
| tree | c580380e3b6390715a6909d6e844a512fc562c19 /core/java | |
| parent | 3df92c50febef4d5f1f55ab135c32006a123eeae (diff) | |
| parent | d19ff5f95dc9ea684edb5097ce97e7bf78c2e628 (diff) | |
| download | frameworks_base-73667fe34a26e8334f39345b71a82e86c4ba0bfa.zip frameworks_base-73667fe34a26e8334f39345b71a82e86c4ba0bfa.tar.gz frameworks_base-73667fe34a26e8334f39345b71a82e86c4ba0bfa.tar.bz2 | |
Merge "YieldTransaction should actually commit the transaction."
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteSession.java | 8 |
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 { |
