diff options
-rw-r--r-- | res/values/cm_strings.xml | 1 | ||||
-rw-r--r-- | src/com/android/settings/notificationlight/NotificationLightSettings.java | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index 44c7548..a390a9a 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -310,6 +310,7 @@ <!-- Lights settings, LED notification --> <string name="led_notification_title">Light settings</string> <string name="led_notification_text">LED light enabled by settings</string> + <string name="notification_light_no_apps_summary">To add per app control, activate \'%1$s\' and press \'\u002b\' on the menu bar</string> <!-- Setting checkbox title for Whether to enable Android debugging support on the phone. --> <string name="enable_adb_cm">Android debugging</string> diff --git a/src/com/android/settings/notificationlight/NotificationLightSettings.java b/src/com/android/settings/notificationlight/NotificationLightSettings.java index 95a354d..c4b55d4 100644 --- a/src/com/android/settings/notificationlight/NotificationLightSettings.java +++ b/src/com/android/settings/notificationlight/NotificationLightSettings.java @@ -284,6 +284,18 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem // Do nothing } } + + /* Display a pref explaining how to add apps */ + if (mPackages.size() == 0) { + String summary = getResources().getString( + R.string.notification_light_no_apps_summary); + String useCustom = getResources().getString( + R.string.notification_light_use_custom); + Preference pref = new Preference(context); + pref.setSummary(String.format(summary, useCustom)); + pref.setEnabled(false); + mApplicationPrefList.addPreference(pref); + } } } |