public boolean yieldTransaction(long sleepAfterYieldDelayMillis, boolean throwIfUnsafe,
            CancellationSignal cancellationSignal) {
        if (throwIfUnsafe) {
            throwIfNoTransaction();
            throwIfTransactionMarkedSuccessful();
            throwIfNestedTransaction();
        } else {
            if (mTransactionStack == null || mTransactionStack.mMarkedSuccessful
                    || mTransactionStack.mParent != null) {
                return false;
            }
        }
        assert mConnection != null;

        if (mTransactionStack.mChildFailed) {
            return false;
        }

        return yieldTransactionUnchecked(sleepAfterYieldDelayMillis,
                cancellationSignal); // might throw
    }
public boolean yieldTransaction ( long sleepAfterYieldDelayMillis , boolean throwIfUnsafe , CancellationSignal cancellationSignal ) { if ( throwIfUnsafe ) { throwIfNoTransaction ( ) ; throwIfTransactionMarkedSuccessful ( ) ; throwIfNestedTransaction ( ) ; } else { if ( mTransactionStack == null || mTransactionStack . mMarkedSuccessful || mTransactionStack . mParent != null ) { return false ; } } assert mConnection != null ; if ( mTransactionStack . mChildFailed ) { return false ; } return yieldTransactionUnchecked ( sleepAfterYieldDelayMillis , cancellationSignal ) ; }
Temporarily ends a transaction to let other threads have use of
the database.  Begins a new transaction after a specified delay.
<p>
If there are other threads waiting to acquire connections,
then the current transaction is committed and the database
connection is released.  After a short delay, a new transaction
is started.
</p><p>
The transaction is assumed to be successful so far.  Do not call
{@link #setTransactionSuccessful()} before calling this method.
This method will fail if the transaction has already been marked
successful.
</p><p>
The changes that were committed by a yield cannot be rolled back later.
</p><p>
Before this method was called, there must already have been
a transaction in progress.  When this method returns, there will
still be a transaction in progress, either the same one as before
or a new one if the transaction was actually yielded.
</p><p>
This method should not be called when there is a nested transaction
in progress because it is not possible to yield a nested transaction.
If <code>throwIfNested</code> is true, then attempting to yield
a nested transaction will throw {@link IllegalStateException}, otherwise
the method will return <code>false</code> in that case.
</p><p>
If there is no nested transaction in progress but a previous nested
transaction failed, then the transaction is not yielded (because it
must be rolled back) and this method returns <code>false</code>.
</p>

@param sleepAfterYieldDelayMillis A delay time to wait after yielding
the database connection to allow other threads some time to run.
If the value is less than or equal to zero, there will be no additional
delay beyond the time it will take to begin a new transaction.
@param throwIfUnsafe If true, then instead of returning false when no
transaction is in progress, a nested transaction is in progress, or when
the transaction has already been marked successful, throws {@link IllegalStateException}.
@param cancellationSignal A signal to cancel the operation in progress, or null if none.
@return True if the transaction was actually yielded.

@throws IllegalStateException if <code>throwIfNested</code> is true and
there is no current transaction, there is a nested transaction in progress or
if {@link #setTransactionSuccessful} has already been called for the current transaction.
@throws SQLiteException if an error occurs.
@throws OperationCanceledException if the operation was canceled.

@see #beginTransaction
@see #endTransaction