summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-06-25 11:53:02 -0700
committerSvetoslav <svetoslavganov@google.com>2015-06-25 11:53:02 -0700
commit45146493c6cbb3f39d92b41e5bc8742fb1e04ff6 (patch)
tree26bc5209ad5e58bf677dba5984181af755896300
parent7008b51817361443fc6f136c5b187e1d471c94f5 (diff)
downloadframeworks_base-45146493c6cbb3f39d92b41e5bc8742fb1e04ff6.zip
frameworks_base-45146493c6cbb3f39d92b41e5bc8742fb1e04ff6.tar.gz
frameworks_base-45146493c6cbb3f39d92b41e5bc8742fb1e04ff6.tar.bz2
Add missing conditional in settings provider
Change-Id: I717e8b87eccbedf1a1abead77e7856a2aa2405fa
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 44b9d8b..41043eb 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -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()) {