1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 01:36:55 +00:00

Enabled restart checkpoints for non Play store versions

This commit is contained in:
M66B 2022-07-07 10:37:09 +02:00
parent 3070021c7f
commit 96c2b4af64

View file

@ -2427,7 +2427,7 @@ public abstract class DB extends RoomDatabase {
long start = new Date().getTime();
StringBuilder sb = new StringBuilder();
SupportSQLiteDatabase sdb = db.getOpenHelper().getWritableDatabase();
String mode = (BuildConfig.DEBUG ? "RESTART" : "PASSIVE");
String mode = (BuildConfig.DEBUG || !BuildConfig.PLAY_STORE_RELEASE ? "RESTART" : "PASSIVE");
try (Cursor cursor = sdb.query("PRAGMA wal_checkpoint(" + mode + ");")) {
if (cursor.moveToNext()) {
for (int i = 0; i < cursor.getColumnCount(); i++) {