Loading services/core/java/com/android/server/notification/RankingHelper.java +3 −5 Original line number Diff line number Diff line Loading @@ -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 { Loading services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
services/core/java/com/android/server/notification/RankingHelper.java +3 −5 Original line number Diff line number Diff line Loading @@ -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 { Loading
services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading