Report the actual db config in dbinfo
'dumpsys dbinfo' fetches and reports the actual database configuration. The config is fetched by a new native API that is entirely self-contained: it prepares a statement, executes it, and finalizes it. Any errors result in exceptions. The native API can race against SQLiteConnection.dispose() (which closes the connection); this would cause a segfault in the native API. A new lock guards against this race. The sqlite engine protects against all other multi-threaded uses of the connection. Bonus change: the pseudo-enums in DatabaseUtils now use an IntDef, to make it easier to distinguish between use cases for basic and extended statement types. Tested with dumpsys dbinfo and verified that the AppOpsHistory database showed the correct static configuration (WAL/FULL) as well as the correct actual configuration (WAL/NORMAL). Flag: android.database.sqlite.report_active_db_configuration Bug: 444244330 Test: atest * FrameworksCoreTests:android.database * CtsDatabaseTestCases Change-Id: I41b2962fc49753171855ba1d7bf49f6a8a7dd1a7
Loading
Please register or sign in to comment