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

@@ -16,10 +16,10 @@
package com.android.settings.notification;
import static com.android.settings.notification.SettingPref.TYPE_GLOBAL;
import static com.android.settings.notification.SettingPref.TYPE_SECURE;
import android.content.Context;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
@@ -33,7 +33,7 @@ public class ChargingSoundPreferenceController extends SettingPrefController {
Lifecycle lifecycle) {
super(context, parent, lifecycle);
mPreference = new SettingPref(
TYPE_GLOBAL, KEY_CHARGING_SOUNDS, Global.CHARGING_SOUNDS_ENABLED, DEFAULT_ON);
TYPE_SECURE, KEY_CHARGING_SOUNDS, Secure.CHARGING_SOUNDS_ENABLED, DEFAULT_ON);
}
@Override