diff options
Diffstat (limited to 'foo/bar/ComplexDatabase.java')
-rw-r--r-- | foo/bar/ComplexDatabase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/foo/bar/ComplexDatabase.java b/foo/bar/ComplexDatabase.java index 7f82dcd8..2c473424 100644 --- a/foo/bar/ComplexDatabase.java +++ b/foo/bar/ComplexDatabase.java @@ -93,6 +93,7 @@ public class ComplexDatabase_Impl extends ComplexDatabase { @Override public void clearAllTables() { + super.assertNotMainThread(); final SupportSQLiteDatabase _db = super.getOpenHelper().getWritableDatabase(); try { super.beginTransaction(); @@ -101,7 +102,9 @@ public class ComplexDatabase_Impl extends ComplexDatabase { } finally { super.endTransaction(); _db.query("PRAGMA wal_checkpoint(FULL)").close(); - _db.execSQL("VACUUM"); + if (!_db.inTransaction()) { + _db.execSQL("VACUUM"); + } } } |