Android Nested Transactions do not use SQLite nested transaction / save support.
Rather, an Android nested transaction suppresses the manifestation of a SQLite transaction. A nested transaction cannot be undone on its own because it does not exist separately from an external transaction. This can be seen here with mTransactionStack == null guard.
The only way to actually support nested transactions that SQLite supports rather than BEGIN / COMMIT is to manually use the SAVEPOINT / RELEASE commands. Of course, designing the code so as not to rely on this will eliminate the additional manual control that it requires.
(I would probably move all transactional work from the actual individual operations, leaving control to the high-level callers, this works pretty well for the UoW pattern, but may not always be applicable.)
source share