Fix runPostSuccessfulTransaction behavior.

This commit is contained in:
Greyson Parrelli 2024-06-03 10:27:53 -04:00 committed by Oscar Mira
parent f3e371995a
commit 9d4938a350
No known key found for this signature in database
GPG key ID: B371B98C5DC32237

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() {