Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872ce8d2 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Ignore summary time if it has children" into main

parents 1516fd86 49bff38a
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -147,11 +147,9 @@ public class RankingHelper {
                if (sortSectionByTime()) {
                    final String groupKey = record.getGroupKey();
                    NotificationRecord existingProxy = mProxyByGroupTmp.get(groupKey);
                    // summaries are mostly hidden in systemui - if there is a child notification
                    // with better information, use its rank
                    if (existingProxy == null
                            || (existingProxy.getNotification().isGroupSummary()
                            && !existingProxy.getNotification().hasAppProvidedWhen())) {
                    // summaries are mostly hidden in systemui - if there is a child notification,
                    // use its rank
                    if (existingProxy == null || existingProxy.getNotification().isGroupSummary()) {
                        mProxyByGroupTmp.put(groupKey, record);
                    }
                } else {
+1 −1
Original line number Diff line number Diff line
@@ -517,10 +517,10 @@ public class RankingHelperTest extends UiServiceTestCase {
                        mUser, null, System.currentTimeMillis()), getLowChannel());

        ArrayList<NotificationRecord> expected = new ArrayList<>();
        expected.add(unrelated);
        expected.add(summary);
        expected.add(child2);
        expected.add(child1);
        expected.add(unrelated);

        ArrayList<NotificationRecord> actual = new ArrayList<>();
        actual.addAll(expected);