Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -89,7 +89,6 @@ public class NotificationEntryManager implements private NotificationRowBinder mNotificationRowBinder; private NotificationRowBinder mNotificationRowBinder; private NotificationPresenter mPresenter; private NotificationPresenter mPresenter; private NotificationListenerService.RankingMap mLatestRankingMap; @VisibleForTesting @VisibleForTesting protected NotificationData mNotificationData; protected NotificationData mNotificationData; Loading Loading @@ -168,8 +167,7 @@ public class NotificationEntryManager implements /** Adds a {@link NotificationLifetimeExtender}. */ /** Adds a {@link NotificationLifetimeExtender}. */ public void addNotificationLifetimeExtender(NotificationLifetimeExtender extender) { public void addNotificationLifetimeExtender(NotificationLifetimeExtender extender) { mNotificationLifetimeExtenders.add(extender); mNotificationLifetimeExtenders.add(extender); extender.setCallback(key -> removeNotification(key, mLatestRankingMap, extender.setCallback(key -> removeNotification(key, null, UNDEFINED_DISMISS_REASON)); UNDEFINED_DISMISS_REASON)); } } public NotificationData getNotificationData() { public NotificationData getNotificationData() { Loading Loading @@ -293,7 +291,6 @@ public class NotificationEntryManager implements if (!forceRemove && !entryDismissed) { if (!forceRemove && !entryDismissed) { for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { if (extender.shouldExtendLifetime(entry)) { if (extender.shouldExtendLifetime(entry)) { mLatestRankingMap = ranking; extendLifetime(entry, extender); extendLifetime(entry, extender); lifetimeExtended = true; lifetimeExtended = true; break; break; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationData.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -200,6 +200,9 @@ public class NotificationData { removed = mEntries.remove(key); removed = mEntries.remove(key); } } if (removed == null) return null; if (removed == null) return null; // NEM may pass us a null ranking map if removing a lifetime-extended notification, // so use the most recent ranking if (ranking == null) ranking = mRankingMap; mGroupManager.onEntryRemoved(removed); mGroupManager.onEntryRemoved(removed); updateRankingAndSort(ranking); updateRankingAndSort(ranking); return removed; return removed; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -89,7 +89,6 @@ public class NotificationEntryManager implements private NotificationRowBinder mNotificationRowBinder; private NotificationRowBinder mNotificationRowBinder; private NotificationPresenter mPresenter; private NotificationPresenter mPresenter; private NotificationListenerService.RankingMap mLatestRankingMap; @VisibleForTesting @VisibleForTesting protected NotificationData mNotificationData; protected NotificationData mNotificationData; Loading Loading @@ -168,8 +167,7 @@ public class NotificationEntryManager implements /** Adds a {@link NotificationLifetimeExtender}. */ /** Adds a {@link NotificationLifetimeExtender}. */ public void addNotificationLifetimeExtender(NotificationLifetimeExtender extender) { public void addNotificationLifetimeExtender(NotificationLifetimeExtender extender) { mNotificationLifetimeExtenders.add(extender); mNotificationLifetimeExtenders.add(extender); extender.setCallback(key -> removeNotification(key, mLatestRankingMap, extender.setCallback(key -> removeNotification(key, null, UNDEFINED_DISMISS_REASON)); UNDEFINED_DISMISS_REASON)); } } public NotificationData getNotificationData() { public NotificationData getNotificationData() { Loading Loading @@ -293,7 +291,6 @@ public class NotificationEntryManager implements if (!forceRemove && !entryDismissed) { if (!forceRemove && !entryDismissed) { for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { if (extender.shouldExtendLifetime(entry)) { if (extender.shouldExtendLifetime(entry)) { mLatestRankingMap = ranking; extendLifetime(entry, extender); extendLifetime(entry, extender); lifetimeExtended = true; lifetimeExtended = true; break; break; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationData.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -200,6 +200,9 @@ public class NotificationData { removed = mEntries.remove(key); removed = mEntries.remove(key); } } if (removed == null) return null; if (removed == null) return null; // NEM may pass us a null ranking map if removing a lifetime-extended notification, // so use the most recent ranking if (ranking == null) ranking = mRankingMap; mGroupManager.onEntryRemoved(removed); mGroupManager.onEntryRemoved(removed); updateRankingAndSort(ranking); updateRankingAndSort(ranking); return removed; return removed; Loading