summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notificationlight/NotificationLightSettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/notificationlight/NotificationLightSettings.java')
-rw-r--r--src/com/android/settings/notificationlight/NotificationLightSettings.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/settings/notificationlight/NotificationLightSettings.java b/src/com/android/settings/notificationlight/NotificationLightSettings.java
index b17918a..1c3601c 100644
--- a/src/com/android/settings/notificationlight/NotificationLightSettings.java
+++ b/src/com/android/settings/notificationlight/NotificationLightSettings.java
@@ -18,6 +18,7 @@ package com.android.settings.notificationlight;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.app.NotificationManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
@@ -97,6 +98,8 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
PreferenceScreen prefSet = getPreferenceScreen();
Resources resources = getResources();
+ final NotificationManager nm = getContext().getSystemService(NotificationManager.class);
+
PreferenceGroup mAdvancedPrefs = (PreferenceGroup) prefSet.findPreference("advanced_section");
// Get the system defined default notification color
@@ -135,8 +138,7 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
} else {
mNotificationLedBrightnessPref.setOnPreferenceChangeListener(this);
}
- if (!resources.getBoolean(
- org.cyanogenmod.platform.internal.R.bool.config_multipleNotificationLeds)) {
+ if (!nm.deviceLightsCan(NotificationManager.LIGHTS_MULTIPLE_LED)) {
mAdvancedPrefs.removePreference(mMultipleLedsEnabledPref);
} else {
mMultipleLedsEnabledPref.setOnPreferenceChangeListener(this);
@@ -164,7 +166,7 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
mPackages = new HashMap<String, Package>();
setHasOptionsMenu(true);
- mMultiColorLed = resources.getBoolean(com.android.internal.R.bool.config_multiColorNotificationLed);
+ mMultiColorLed = nm.deviceLightsCan(NotificationManager.LIGHTS_RGB_NOTIFICATION);
if (!mMultiColorLed) {
resetColors();
PreferenceGroup mGeneralPrefs = (PreferenceGroup) prefSet.findPreference("general_section");