Enabled SQLiteCompatibilityWalFlags class
In system_server, it should be deactivated until InstallSystemProviders
is finished.
Test: SQLiteCompatibilityWalFlagsTest
Test: setting put global ... + verify that dumpsys dbinfo has the new flag
Bug: 70226732
Bug: 70517616
Change-Id: Iec6a5e61a5d7e4cc0ac602f2b630357c54bb4456
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 7aa628a..4310a98 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -26,6 +26,7 @@
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources.Theme;
+import android.database.sqlite.SQLiteCompatibilityWalFlags;
import android.os.BaseBundle;
import android.os.Binder;
import android.os.Build;
@@ -327,6 +328,8 @@
// The system server should never make non-oneway calls
Binder.setWarnOnBlocking(true);
+ // Deactivate SQLiteCompatibilityWalFlags until settings provider is initialized
+ SQLiteCompatibilityWalFlags.init(null);
// Here we go!
Slog.i(TAG, "Entered the Android system server!");
@@ -803,6 +806,8 @@
traceBeginAndSlog("InstallSystemProviders");
mActivityManagerService.installSystemProviders();
+ // Now that SettingsProvider is ready, reactivate SQLiteCompatibilityWalFlags
+ SQLiteCompatibilityWalFlags.reset();
traceEnd();
traceBeginAndSlog("StartVibratorService");