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.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/com/android/settings/notificationlight/NotificationLightSettings.java b/src/com/android/settings/notificationlight/NotificationLightSettings.java
index 3b02d36c9..f0b546ac7 100644
--- a/src/com/android/settings/notificationlight/NotificationLightSettings.java
+++ b/src/com/android/settings/notificationlight/NotificationLightSettings.java
@@ -276,6 +276,7 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
Context context = getActivity();
if (!parsePackageList()) {
+ maybeDisplayApplicationHint(context);
return;
}
@@ -302,17 +303,22 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
}
}
- /* Display a pref explaining how to add apps */
- if (mApplicationPrefList.getPreferenceCount() == 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);
- }
+ maybeDisplayApplicationHint(context);
+ }
+ }
+
+ private void maybeDisplayApplicationHint(Context context)
+ {
+ /* Display a pref explaining how to add apps */
+ if (mApplicationPrefList != null && mApplicationPrefList.getPreferenceCount() == 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);
}
}