Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -539,7 +539,8 @@ public class NotificationEntryManager implements } } private void addNotificationInternal(StatusBarNotification notification, private void addNotificationInternal( StatusBarNotification notification, RankingMap rankingMap) throws InflationException { String key = notification.getKey(); if (DEBUG) { Loading Loading @@ -579,6 +580,9 @@ public class NotificationEntryManager implements for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onEntryAdded(entry); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } public void addNotification(StatusBarNotification notification, RankingMap ranking) { Loading Loading @@ -635,6 +639,9 @@ public class NotificationEntryManager implements for (NotificationEntryListener listener : mNotificationEntryListeners) { listener.onPostEntryUpdated(entry); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } public void updateNotification(StatusBarNotification notification, RankingMap ranking) { Loading Loading @@ -693,6 +700,9 @@ public class NotificationEntryManager implements for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingUpdate(rankingMap); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } private void updateRankingOfPendingNotifications(@Nullable RankingMap rankingMap) { Loading Loading @@ -799,6 +809,9 @@ public class NotificationEntryManager implements */ public void updateRanking(RankingMap rankingMap, String reason) { updateRankingAndSort(rankingMap, reason); for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } /** Resorts / filters the current notification set with the current RankingMap */ Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java +3 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,9 @@ public interface NotifCollectionListener { * non-lifetime-extended notification entries will have their ranking object updated. * * Ranking updates occur whenever a notification is added, updated, or removed, or when a * standalone ranking is sent from the server. * standalone ranking is sent from the server. If a non-standalone ranking is applied, the event * that accompanied the ranking is emitted first (e.g. {@link #onEntryAdded}), followed by the * ranking event. */ default void onRankingApplied() { } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -539,7 +539,8 @@ public class NotificationEntryManager implements } } private void addNotificationInternal(StatusBarNotification notification, private void addNotificationInternal( StatusBarNotification notification, RankingMap rankingMap) throws InflationException { String key = notification.getKey(); if (DEBUG) { Loading Loading @@ -579,6 +580,9 @@ public class NotificationEntryManager implements for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onEntryAdded(entry); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } public void addNotification(StatusBarNotification notification, RankingMap ranking) { Loading Loading @@ -635,6 +639,9 @@ public class NotificationEntryManager implements for (NotificationEntryListener listener : mNotificationEntryListeners) { listener.onPostEntryUpdated(entry); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } public void updateNotification(StatusBarNotification notification, RankingMap ranking) { Loading Loading @@ -693,6 +700,9 @@ public class NotificationEntryManager implements for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingUpdate(rankingMap); } for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } private void updateRankingOfPendingNotifications(@Nullable RankingMap rankingMap) { Loading Loading @@ -799,6 +809,9 @@ public class NotificationEntryManager implements */ public void updateRanking(RankingMap rankingMap, String reason) { updateRankingAndSort(rankingMap, reason); for (NotifCollectionListener listener : mNotifCollectionListeners) { listener.onRankingApplied(); } } /** Resorts / filters the current notification set with the current RankingMap */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java +3 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,9 @@ public interface NotifCollectionListener { * non-lifetime-extended notification entries will have their ranking object updated. * * Ranking updates occur whenever a notification is added, updated, or removed, or when a * standalone ranking is sent from the server. * standalone ranking is sent from the server. If a non-standalone ranking is applied, the event * that accompanied the ranking is emitted first (e.g. {@link #onEntryAdded}), followed by the * ranking event. */ default void onRankingApplied() { } Loading