Fix runPostSuccessfulTransaction behavior.

This commit is contained in:
Greyson Parrelli
2024-06-03 10:27:53 -04:00
committed by Cody Henthorne
parent 164f089d37
commit c3ab8dddd0

View File

@@ -317,13 +317,11 @@ public class SQLiteDatabase implements SupportSQLiteDatabase {
public void endTransaction() {
trace("endTransaction()", wrapped::endTransaction);
traceLockEnd();
if (!wrapped.inTransaction()) {
Set<Runnable> tasks = getPostSuccessfulTransactionTasks();
for (Runnable r : new HashSet<>(tasks)) {
r.run();
}
tasks.clear();
Set<Runnable> tasks = getPostSuccessfulTransactionTasks();
for (Runnable r : new HashSet<>(tasks)) {
r.run();
}
tasks.clear();
}
public void setTransactionSuccessful() {