settings data stored in com.android.providers.settings/databases/settings.dbthe default data for data in the database is frameworks/base/packages/settingsprovider/res/values/ Defaults.xml, if you want to add a new field to the database, you can use the following steps: 1. Define a default value (such as def_mtk_off_flag) for the newly added data in Defaults.xml (which can be given directly in the code, of course)
2, in frameworks/base/packages/settingsprovider/src/com/android/providers/settings/ Add code for adding a new field to the Loadsystemsettings () method in Databasehelper.java, as follows:loadintegersetting (stmt, "Is_mtk_off_flag",r.integer.def_mtk_off_flag);
3, recompile a settingsprovider.apk, and then replace the original settingsprovider.apk
4, use Settings.System.putInt (); Settings.System.getInt () to set and get the set value
Add a new default configuration item to the Android settings.db database