Use Settings.Secure values, not Global values

The following Settings are being moved to Settings.Secure
from Settings.Global since they are settings that exist
per user
 - CHARGING_SOUNDS_ENABLED
 - CHARGING_VIBRATION_ENABLED
 - ZEN_DURATION
 - SHOW_ZEN_UPGRADE_NOTIFICATION
 - SHOW_ZEN_SETTINGS_SUGGESTION
 - ZEN_SETTINGS_UPDATE
 - ZEN_SETTINGS_SUGGESTION_VIEWED

Bug: 110926544
Test: make ROBOTEST_FILTER=ZenModeDurationPreferenceControllerTest RunSettingsRoboTests
Change-Id: I3e3d6f6653b81a121fbda7d2f9f1b75651f536b7
This commit is contained in:
Beverly
2018-07-02 16:46:11 -04:00
parent ee8bf5d463
commit b00cef308e
9 changed files with 45 additions and 36 deletions

View File

@@ -136,8 +136,8 @@ public class ZenModeBackend {
}
protected void saveVisualEffectsPolicy(int category, boolean suppress) {
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.ZEN_SETTINGS_UPDATED, 1);
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ZEN_SETTINGS_UPDATED, 1);
int suppressedEffects = getNewSuppressedEffects(suppress, category);
savePolicy(mPolicy.priorityCategories, mPolicy.priorityCallSenders,