summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-11-12 12:55:23 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-12 18:03:00 -0800
commita16992359a19dd3fd9cc921edc981c8966556e1b (patch)
treef1bfd39a233af3e053eb09daa48c4185379c4e88 /packages/SystemUI/src/com/android/systemui/power
parent11feb561aa1b34263ce200d696a02c0e6f8234a5 (diff)
downloadframeworks_base-a16992359a19dd3fd9cc921edc981c8966556e1b.zip
frameworks_base-a16992359a19dd3fd9cc921edc981c8966556e1b.tar.gz
frameworks_base-a16992359a19dd3fd9cc921edc981c8966556e1b.tar.bz2
fw: Move Global settings to CMSettings
This moves all Settings.Global.* settings, that were added to CyanogenMod and not used in boot classpath, to CMSettings. * WAKE_WHEN_PLUGGED_OR_UNPLUGGED * BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX * POWER_NOTIFICATIONS_ENABLED * POWER_NOTIFICATIONS_VIBRATE * POWER_NOTIFICATIONS_RINGTONE * ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK * WIFI_AUTO_PRIORITIES_CONFIGURATION Change-Id: I5a23971b278d150c633d2b4ade49a143c4423c26
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/power')
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerUI.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index 4c1a16c..a1a11ca 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -39,6 +39,7 @@ import android.util.Slog;
import com.android.systemui.SystemUI;
import com.android.systemui.statusbar.phone.PhoneStatusBar;
+import cyanogenmod.providers.CMSettings;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -236,8 +237,8 @@ public class PowerUI extends SystemUI {
if (mIgnoreFirstPowerEvent) {
mIgnoreFirstPowerEvent = false;
} else {
- if (Settings.Global.getInt(cr,
- Settings.Global.POWER_NOTIFICATIONS_ENABLED, 0) == 1) {
+ if (CMSettings.Global.getInt(cr,
+ CMSettings.Global.POWER_NOTIFICATIONS_ENABLED, 0) == 1) {
playPowerNotificationSound();
}
}
@@ -250,7 +251,7 @@ public class PowerUI extends SystemUI {
void playPowerNotificationSound() {
final ContentResolver cr = mContext.getContentResolver();
final String soundPath =
- Settings.Global.getString(cr, Settings.Global.POWER_NOTIFICATIONS_RINGTONE);
+ CMSettings.Global.getString(cr, CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE);
if (soundPath != null) {
Ringtone powerRingtone = RingtoneManager.getRingtone(mContext, Uri.parse(soundPath));
@@ -258,8 +259,8 @@ public class PowerUI extends SystemUI {
powerRingtone.play();
}
}
- if (Settings.Global.getInt(cr,
- Settings.Global.POWER_NOTIFICATIONS_VIBRATE, 0) == 1) {
+ if (CMSettings.Global.getInt(cr,
+ CMSettings.Global.POWER_NOTIFICATIONS_VIBRATE, 0) == 1) {
Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
if (vibrator != null) {
vibrator.vibrate(250);