Conditionally show settings.

Change-Id: I8e62ed6e2515b76de73d3d25adcfb121f809c646
This commit is contained in:
Julia Reynolds
2015-12-18 11:44:43 -05:00
parent 63196c5f82
commit df01cde11c
7 changed files with 55 additions and 24 deletions

View File

@@ -90,20 +90,15 @@ public class ImportanceSeekBarPreference extends SeekBarPreference implements
private String getProgressSummary(int progress) {
switch (progress) {
case NotificationListenerService.Ranking.IMPORTANCE_NONE:
return getContext().getString(
com.android.internal.R.string.notification_importance_blocked);
return getContext().getString(R.string.notification_importance_blocked);
case NotificationListenerService.Ranking.IMPORTANCE_LOW:
return getContext().getString(
com.android.internal.R.string.notification_importance_low);
return getContext().getString(R.string.notification_importance_low);
case NotificationListenerService.Ranking.IMPORTANCE_DEFAULT:
return getContext().getString(
com.android.internal.R.string.notification_importance_default);
return getContext().getString(R.string.notification_importance_default);
case NotificationListenerService.Ranking.IMPORTANCE_HIGH:
return getContext().getString(
com.android.internal.R.string.notification_importance_high);
return getContext().getString(R.string.notification_importance_high);
case NotificationListenerService.Ranking.IMPORTANCE_MAX:
return getContext().getString(
com.android.internal.R.string.notification_importance_max);
return getContext().getString(R.string.notification_importance_max);
default:
return "";
}