Loading core/java/android/provider/Settings.java +9 −2 Original line number Diff line number Diff line Loading @@ -4322,8 +4322,15 @@ public final class Settings { public static final String WEB_AUTOFILL_QUERY_URL = "web_autofill_query_url"; /** Whether package verification is enabled. {@hide} */ public static final String PACKAGE_VERIFIER_ENABLE = "verifier_enable"; /** * Whether the package manager should send package verification broadcasts for verifiers to * review apps prior to installation. * * 1 = request apps to be verified prior to installation, if a verifier exists. * 0 = do not verify apps before installation * {@hide} */ public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; /** Timeout for package verification. {@hide} */ public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; Loading packages/SettingsProvider/res/values/defaults.xml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ <bool name="def_bluetooth_on">false</bool> <bool name="def_install_non_market_apps">false</bool> <bool name="def_package_verifier_enable">true</bool> <!-- Comma-separated list of location providers. Network location is off by default because it requires user opt-in via Setup Wizard or Settings. Loading packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +21 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. private static final int DATABASE_VERSION = 81; private static final int DATABASE_VERSION = 82; private Context mContext; Loading Loading @@ -1145,6 +1145,23 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 81; } if (upgradeVersion == 81) { // Add package verification setting db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO secure(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.Secure.PACKAGE_VERIFIER_ENABLE, R.bool.def_package_verifier_enable); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } upgradeVersion = 82; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading Loading @@ -1642,6 +1659,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.INSTALL_NON_MARKET_APPS, R.bool.def_install_non_market_apps); loadBooleanSetting(stmt, Settings.Secure.PACKAGE_VERIFIER_ENABLE, R.bool.def_package_verifier_enable); loadStringSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, R.string.def_location_providers_allowed); Loading Loading
core/java/android/provider/Settings.java +9 −2 Original line number Diff line number Diff line Loading @@ -4322,8 +4322,15 @@ public final class Settings { public static final String WEB_AUTOFILL_QUERY_URL = "web_autofill_query_url"; /** Whether package verification is enabled. {@hide} */ public static final String PACKAGE_VERIFIER_ENABLE = "verifier_enable"; /** * Whether the package manager should send package verification broadcasts for verifiers to * review apps prior to installation. * * 1 = request apps to be verified prior to installation, if a verifier exists. * 0 = do not verify apps before installation * {@hide} */ public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; /** Timeout for package verification. {@hide} */ public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; Loading
packages/SettingsProvider/res/values/defaults.xml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ <bool name="def_bluetooth_on">false</bool> <bool name="def_install_non_market_apps">false</bool> <bool name="def_package_verifier_enable">true</bool> <!-- Comma-separated list of location providers. Network location is off by default because it requires user opt-in via Setup Wizard or Settings. Loading
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +21 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. private static final int DATABASE_VERSION = 81; private static final int DATABASE_VERSION = 82; private Context mContext; Loading Loading @@ -1145,6 +1145,23 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 81; } if (upgradeVersion == 81) { // Add package verification setting db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO secure(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.Secure.PACKAGE_VERIFIER_ENABLE, R.bool.def_package_verifier_enable); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } upgradeVersion = 82; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading Loading @@ -1642,6 +1659,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.INSTALL_NON_MARKET_APPS, R.bool.def_install_non_market_apps); loadBooleanSetting(stmt, Settings.Secure.PACKAGE_VERIFIER_ENABLE, R.bool.def_package_verifier_enable); loadStringSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, R.string.def_location_providers_allowed); Loading