Merge "Show channel description."
diff --git a/res/xml/channel_notification_settings.xml b/res/xml/channel_notification_settings.xml
index fde1bfa..5b848e6 100644
--- a/res/xml/channel_notification_settings.xml
+++ b/res/xml/channel_notification_settings.xml
@@ -69,5 +69,4 @@
android:title="@string/app_notification_override_dnd_title"
android:summary="@string/app_notification_override_dnd_summary"
settings:useAdditionalSummary="true" />
-
</PreferenceScreen>
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index 24405b3..fec489a 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -203,7 +203,7 @@
int deletedChannelCount = mBackend.getDeletedChannelCount(mAppRow.pkg, mAppRow.uid);
if (deletedChannelCount > 0) {
DimmableIconPreference deletedPref = new DimmableIconPreference(getPrefContext());
- deletedPref.setEnabled(false);
+ deletedPref.setSelectable(false);
deletedPref.setTitle(getResources().getQuantityString(
R.plurals.deleted_channels, deletedChannelCount, deletedChannelCount));
deletedPref.setIcon(R.drawable.ic_info);
diff --git a/src/com/android/settings/notification/ChannelNotificationSettings.java b/src/com/android/settings/notification/ChannelNotificationSettings.java
index 7f7aa08..b24e92c 100644
--- a/src/com/android/settings/notification/ChannelNotificationSettings.java
+++ b/src/com/android/settings/notification/ChannelNotificationSettings.java
@@ -40,6 +40,7 @@
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.DimmableIconPreference;
import com.android.settings.R;
import com.android.settings.RingtonePreference;
import com.android.settings.applications.AppHeaderController;
@@ -131,6 +132,14 @@
intentPref.setTitle(mContext.getString(R.string.app_settings_link));
getPreferenceScreen().addPreference(intentPref);
}
+
+ if (!TextUtils.isEmpty(mChannel.getDescription())) {
+ DimmableIconPreference descPref = new DimmableIconPreference(getPrefContext());
+ descPref.setSelectable(false);
+ descPref.setSummary(mChannel.getDescription());
+ descPref.setIcon(R.drawable.ic_info);
+ getPreferenceScreen().addPreference(descPref);
+ }
}
private void setupLights() {