Merge "Handle spanned conversation labels" into sc-qpr1-dev am: 1741d5d12c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15546623

Change-Id: I31d94c633afda15f05d660e6854c2b6c552a6d7a
This commit is contained in:
TreeHugger Robot
2021-08-13 04:27:14 +00:00
committed by Automerger Merge Worker
2 changed files with 40 additions and 2 deletions

View File

@@ -233,8 +233,13 @@ public class RecentConversationsPreferenceController extends AbstractPreferenceC
private final Collator sCollator = Collator.getInstance();
@Override
public int compare(ConversationChannel o1, ConversationChannel o2) {
int labelComparison = sCollator.compare(o1.getShortcutInfo().getLabel(),
o2.getShortcutInfo().getLabel());
int labelComparison = 0;
if (o1.getShortcutInfo().getLabel() != null
&& o2.getShortcutInfo().getLabel() != null) {
labelComparison = sCollator.compare(
o1.getShortcutInfo().getLabel().toString(),
o2.getShortcutInfo().getLabel().toString());
}
if (labelComparison == 0) {
return o1.getNotificationChannel().getId().compareTo(