Disable write-ahead log on LockSettingsStorage

As WAL is suspected to be causing data loss on F2FS filesystem.

Bug: 170438530
Test: atest com.android.server.locksettings
Change-Id: I4a7e7e9960a08a7f3f1ce7c2ef9498d4a8f8747f
This commit is contained in:
Rubin Xu
2021-03-30 11:29:11 +01:00
parent 80e8713490
commit 5e0368f4c7

View File

@@ -800,7 +800,7 @@ class LockSettingsStorage {
public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
setWriteAheadLoggingEnabled(true);
setWriteAheadLoggingEnabled(false);
// Memory optimization - close idle connections after 30s of inactivity
setIdleConnectionTimeout(IDLE_CONNECTION_TIMEOUT_MS);
}