Update Settings app to manipulate now-global settings properly
Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
This commit is contained in:
@@ -229,13 +229,13 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
private boolean isNonMarketAppsAllowed() {
|
||||
return Settings.Secure.getInt(getContentResolver(),
|
||||
Settings.Secure.INSTALL_NON_MARKET_APPS, 0) > 0;
|
||||
return Settings.Global.getInt(getContentResolver(),
|
||||
Settings.Global.INSTALL_NON_MARKET_APPS, 0) > 0;
|
||||
}
|
||||
|
||||
private void setNonMarketAppsAllowed(boolean enabled) {
|
||||
// Change the system setting
|
||||
Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS,
|
||||
Settings.Global.putInt(getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS,
|
||||
enabled ? 1 : 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user