diff options
Diffstat (limited to 'android/database/sqlite/SQLiteDatabaseConfiguration.java')
-rw-r--r-- | android/database/sqlite/SQLiteDatabaseConfiguration.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/android/database/sqlite/SQLiteDatabaseConfiguration.java b/android/database/sqlite/SQLiteDatabaseConfiguration.java index a14df1eb..8b9dfcf5 100644 --- a/android/database/sqlite/SQLiteDatabaseConfiguration.java +++ b/android/database/sqlite/SQLiteDatabaseConfiguration.java @@ -111,15 +111,6 @@ public final class SQLiteDatabaseConfiguration { public long idleConnectionTimeoutMs = Long.MAX_VALUE; /** - * Enables compatibility WAL mode. Applications cannot explicitly choose compatibility WAL mode, - * therefore it is not exposed as a flag. - * - * <p>In this mode, only database journal mode will be changed, connection pool - * size will still be limited to a single connection. - */ - public boolean useCompatibilityWal; - - /** * Journal mode to use when {@link SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING} is not set. * <p>Default is returned by {@link SQLiteGlobal#getDefaultJournalMode()} */ @@ -191,7 +182,6 @@ public final class SQLiteDatabaseConfiguration { lookasideSlotSize = other.lookasideSlotSize; lookasideSlotCount = other.lookasideSlotCount; idleConnectionTimeoutMs = other.idleConnectionTimeoutMs; - useCompatibilityWal = other.useCompatibilityWal; journalMode = other.journalMode; syncMode = other.syncMode; } @@ -204,6 +194,11 @@ public final class SQLiteDatabaseConfiguration { return path.equalsIgnoreCase(MEMORY_DB_PATH); } + boolean useCompatibilityWal() { + return journalMode == null && syncMode == null + && (openFlags & SQLiteDatabase.DISABLE_COMPATIBILITY_WAL) == 0; + } + private static String stripPathForLogs(String path) { if (path.indexOf('@') == -1) { return path; |