diff options
author | d34d <clark@cyngn.com> | 2015-11-12 13:00:17 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-11-12 18:03:34 -0800 |
commit | f77689bb6e6569d38b8454512c558cd12722e636 (patch) | |
tree | 7024124043cc4b6d0d94f507715adaf6ac481074 /src/com/android/settings/notification | |
parent | ef97f62c602db9efaaa319e901fc5f0c8a50552f (diff) | |
download | packages_apps_Settings-f77689bb6e6569d38b8454512c558cd12722e636.zip packages_apps_Settings-f77689bb6e6569d38b8454512c558cd12722e636.tar.gz packages_apps_Settings-f77689bb6e6569d38b8454512c558cd12722e636.tar.bz2 |
Settings: Move Global settings to CMSettings
Change-Id: I73e3477ccc3c804de0f32974d926e6bc9df9b227
Diffstat (limited to 'src/com/android/settings/notification')
-rw-r--r-- | src/com/android/settings/notification/OtherSoundSettings.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/com/android/settings/notification/OtherSoundSettings.java b/src/com/android/settings/notification/OtherSoundSettings.java index 259b049..9e24c34 100644 --- a/src/com/android/settings/notification/OtherSoundSettings.java +++ b/src/com/android/settings/notification/OtherSoundSettings.java @@ -236,25 +236,25 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In // power state change notification sounds mPowerSounds = (SwitchPreference) findPreference(KEY_POWER_NOTIFICATIONS); - mPowerSounds.setChecked(Global.getInt(getContentResolver(), - Global.POWER_NOTIFICATIONS_ENABLED, 0) != 0); + mPowerSounds.setChecked(CMSettings.Global.getInt(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_ENABLED, 0) != 0); mPowerSoundsVibrate = (SwitchPreference) findPreference(KEY_POWER_NOTIFICATIONS_VIBRATE); - mPowerSoundsVibrate.setChecked(Global.getInt(getContentResolver(), - Global.POWER_NOTIFICATIONS_VIBRATE, 0) != 0); + mPowerSoundsVibrate.setChecked(CMSettings.Global.getInt(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_VIBRATE, 0) != 0); Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); if (vibrator == null || !vibrator.hasVibrator()) { removePreference(KEY_POWER_NOTIFICATIONS_VIBRATE); } mPowerSoundsRingtone = findPreference(KEY_POWER_NOTIFICATIONS_RINGTONE); - String currentPowerRingtonePath = - Global.getString(getContentResolver(), Global.POWER_NOTIFICATIONS_RINGTONE); + String currentPowerRingtonePath = CMSettings.Global.getString(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE); // set to default notification if we don't yet have one if (currentPowerRingtonePath == null) { currentPowerRingtonePath = System.DEFAULT_NOTIFICATION_URI.toString(); - Global.putString(getContentResolver(), - Global.POWER_NOTIFICATIONS_RINGTONE, currentPowerRingtonePath); + CMSettings.Global.putString(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE, currentPowerRingtonePath); } // is it silent ? if (currentPowerRingtonePath.equals(POWER_NOTIFICATIONS_SILENT_URI)) { @@ -288,19 +288,19 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (preference == mPowerSounds) { - Global.putInt(getContentResolver(), - Global.POWER_NOTIFICATIONS_ENABLED, + CMSettings.Global.putInt(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_ENABLED, mPowerSounds.isChecked() ? 1 : 0); } else if (preference == mPowerSoundsVibrate) { - Global.putInt(getContentResolver(), - Global.POWER_NOTIFICATIONS_VIBRATE, + CMSettings.Global.putInt(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_VIBRATE, mPowerSoundsVibrate.isChecked() ? 1 : 0); } else if (preference == mPowerSoundsRingtone) { launchNotificationSoundPicker(REQUEST_CODE_POWER_NOTIFICATIONS_RINGTONE, - Global.getString(getContentResolver(), - Global.POWER_NOTIFICATIONS_RINGTONE)); + CMSettings.Global.getString(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE)); } else { // If we didn't handle it, let preferences handle it. return super.onPreferenceTreeClick(preferenceScreen, preference); @@ -407,8 +407,8 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In } mPowerSoundsRingtone.setSummary(toneName); - Global.putString(getContentResolver(), - Global.POWER_NOTIFICATIONS_RINGTONE, toneUriPath); + CMSettings.Global.putString(getContentResolver(), + CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE, toneUriPath); } @Override |