Don't pass useless journal_mode in URI
Since journal_mode is not one of the parameters that SQLite supports in
URIs (see https://www.sqlite.org/uri.html), and SQLite ignores unknown
parameters in URIs, the attempt to set the journal_mode does not
actually do anything. Remove it to avoid confusion.
Test: adb shell dumpsys android.security.maintenance | grep journal_mode
# shows "delete" both before and after this change, even with
# the check of wal_db_journalmode_v3 replaced with 'true'.
Bug: 314419678
Change-Id: Ibf8497195a0e3d954cdec956cb29bf903a91bf5c
diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs
index 626a1c0..34e0c59 100644
--- a/keystore2/src/database.rs
+++ b/keystore2/src/database.rs
@@ -1163,14 +1163,6 @@
let mut persistent_path_str = "file:".to_owned();
persistent_path_str.push_str(&persistent_path.to_string_lossy());
- // Connect to database in specific mode
- let persistent_path_mode = if keystore2_flags::wal_db_journalmode_v3() {
- "?journal_mode=WAL".to_owned()
- } else {
- "?journal_mode=DELETE".to_owned()
- };
- persistent_path_str.push_str(&persistent_path_mode);
-
Ok(persistent_path_str)
}