am cf831c87: am f9c6dbb6: Merge "Add missing conditional in settings provider" into mnc-dev

* commit 'cf831c878600ec4c386fd4f356756f27fec9718f':
  Add missing conditional in settings provider
This commit is contained in:
Svetoslav
2015-06-25 20:01:06 +00:00
committed by Android Git Automerger

View File

@@ -905,7 +905,9 @@ public class SettingsProvider extends ContentProvider {
private boolean mutateSystemSetting(String name, String value, int runAsUserId,
int operation) {
// Check for permissions first.
hasPermissionsToMutateSystemSettings();
if (!hasPermissionsToMutateSystemSettings()) {
return false;
}
// Verify whether this operation is allowed for the calling package.
if (!isAppOpWriteSettingsAllowedForCallingPackage()) {