summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Svetoslav Ganov <svetoslavganov@google.com> 2017-01-04 17:08:15 -0800
committer Svetoslav Ganov <svetoslavganov@google.com> 2017-01-04 17:12:03 -0800
commit0b1501a7c8965236e93bd47b45d5dfc0767d5c41 (patch)
tree81eb8d4ae5b0672e7e3690042fb8dc02405a35db
parentab156196f88bf7adac9cbf2779c049fc414be890 (diff)
Warn makeDefault ignored for system settings only if true
Test: changed system setting and got it back without a warning bug:33816118 Change-Id: I4e185b46467fc885d2bafedbcbdf41354d0fa9d8
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsService.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsService.java
index 6b01d6687c65..fecc938ad3be 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsService.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsService.java
@@ -355,9 +355,11 @@ final public class SettingsService extends Binder {
final String callPutCommand;
if ("system".equals(table)) {
callPutCommand = Settings.CALL_METHOD_PUT_SYSTEM;
- makeDefault = false;
- getOutPrintWriter().println("Ignored makeDefault - "
- + "doesn't apply to system settings");
+ if (makeDefault) {
+ getOutPrintWriter().print("Ignored makeDefault - "
+ + "doesn't apply to system settings");
+ makeDefault = false;
+ }
} else if ("secure".equals(table)) callPutCommand = Settings.CALL_METHOD_PUT_SECURE;
else if ("global".equals(table)) callPutCommand = Settings.CALL_METHOD_PUT_GLOBAL;
else {