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

Commit 6b19b089 authored by Ned Burns's avatar Ned Burns
Browse files

Only NotificationListener gets to call updateNotificationRanking()

Test: atest
Change-Id: Id0d2c323561cf0696e32dba3c04ed527cb10a55d
parent a13b6f18
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -420,6 +420,7 @@ public class NotificationEntryManager implements
        }
    }

    @Override
    public void updateNotificationRanking(NotificationListenerService.RankingMap rankingMap) {
        List<NotificationEntry> entries = new ArrayList<>();
        entries.addAll(mNotificationData.getActiveNotifications());
+2 −2
Original line number Diff line number Diff line
@@ -1550,12 +1550,12 @@ public class StatusBar extends SystemUI implements DemoMode,

    @Override
    public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
        mEntryManager.updateNotificationRanking(null /* rankingMap */);
        mEntryManager.updateNotifications();
    }

    @Override
    public void onAmbientStateChanged(NotificationEntry entry, boolean isAmbient) {
        mEntryManager.updateNotificationRanking(null);
        mEntryManager.updateNotifications();
        if (isAmbient) {
            mDozeServiceHost.fireNotificationPulse();
        } else if (!mAmbientPulseManager.hasNotifications()) {