Merge "Sort Uncategorized channel to the bottom." into pi-dev

am: 97f63ba910

Change-Id: I4e272ef729124c926a2de3510985556e5375bfa5
This commit is contained in:
Alison Cichowlas
2018-03-16 16:02:23 +00:00
committed by android-build-merger

View File

@@ -355,7 +355,13 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
(left, right) -> {
if (left.isDeleted() != right.isDeleted()) {
return Boolean.compare(left.isDeleted(), right.isDeleted());
} else if (left.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
// Uncategorized/miscellaneous legacy channel goes last
return 1;
} else if (right.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
return -1;
}
return left.getId().compareTo(right.getId());
};