Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +0 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Map; import java.util.Objects; /** Loading Loading @@ -343,7 +342,6 @@ public class NotificationData { entry.notification.setOverrideGroupKey(overrideGroupKey); mGroupManager.onEntryUpdated(entry, oldSbn); } //mGroupManager.onEntryBundlingUpdated(entry, getOverrideGroupKey(entry.key)); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +11 −15 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Objects; /** * A class to handle notifications and their corresponding groups. Loading @@ -43,6 +42,7 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged private int mBarState = -1; private HashMap<String, StatusBarNotification> mIsolatedEntries = new HashMap<>(); private HeadsUpManager mHeadsUpManager; private boolean mUpdatingSuppressionBlocked; public void setOnGroupChangeListener(OnGroupChangeListener listener) { mListener = listener; Loading Loading @@ -140,17 +140,8 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged } } public void onEntryBundlingUpdated(final NotificationData.Entry updated, final String overrideGroupKey) { final StatusBarNotification oldSbn = updated.notification.clone(); if (!Objects.equals(oldSbn.getOverrideGroupKey(), overrideGroupKey)) { updated.notification.setOverrideGroupKey(overrideGroupKey); onEntryUpdated(updated, oldSbn); } } private void updateSuppression(NotificationGroup group) { if (group == null) { if (group == null || mUpdatingSuppressionBlocked) { return; } boolean prevSuppressed = group.suppressed; Loading Loading @@ -192,19 +183,24 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged public void onEntryUpdated(NotificationData.Entry entry, StatusBarNotification oldNotification) { String oldKey = oldNotification.getGroupKey(); String newKey = entry.notification.getGroupKey(); boolean groupKeysChanged = !oldKey.equals(newKey); boolean wasGroupChild = isGroupChild(oldNotification); boolean isGroupChild = isGroupChild(entry.notification); mUpdatingSuppressionBlocked = !groupKeysChanged && wasGroupChild == isGroupChild; if (mGroupMap.get(getGroupKey(oldNotification)) != null) { onEntryRemovedInternal(entry, oldNotification); } onEntryAdded(entry); mUpdatingSuppressionBlocked = false; if (isIsolated(entry.notification)) { mIsolatedEntries.put(entry.key, entry.notification); String oldKey = oldNotification.getGroupKey(); String newKey = entry.notification.getGroupKey(); if (!oldKey.equals(newKey)) { if (groupKeysChanged) { updateSuppression(mGroupMap.get(oldKey)); updateSuppression(mGroupMap.get(newKey)); } } else if (!isGroupChild(oldNotification) && isGroupChild(entry.notification)) { } else if (!wasGroupChild && isGroupChild) { onEntryBecomingChild(entry); } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +0 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Map; import java.util.Objects; /** Loading Loading @@ -343,7 +342,6 @@ public class NotificationData { entry.notification.setOverrideGroupKey(overrideGroupKey); mGroupManager.onEntryUpdated(entry, oldSbn); } //mGroupManager.onEntryBundlingUpdated(entry, getOverrideGroupKey(entry.key)); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +11 −15 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Objects; /** * A class to handle notifications and their corresponding groups. Loading @@ -43,6 +42,7 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged private int mBarState = -1; private HashMap<String, StatusBarNotification> mIsolatedEntries = new HashMap<>(); private HeadsUpManager mHeadsUpManager; private boolean mUpdatingSuppressionBlocked; public void setOnGroupChangeListener(OnGroupChangeListener listener) { mListener = listener; Loading Loading @@ -140,17 +140,8 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged } } public void onEntryBundlingUpdated(final NotificationData.Entry updated, final String overrideGroupKey) { final StatusBarNotification oldSbn = updated.notification.clone(); if (!Objects.equals(oldSbn.getOverrideGroupKey(), overrideGroupKey)) { updated.notification.setOverrideGroupKey(overrideGroupKey); onEntryUpdated(updated, oldSbn); } } private void updateSuppression(NotificationGroup group) { if (group == null) { if (group == null || mUpdatingSuppressionBlocked) { return; } boolean prevSuppressed = group.suppressed; Loading Loading @@ -192,19 +183,24 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged public void onEntryUpdated(NotificationData.Entry entry, StatusBarNotification oldNotification) { String oldKey = oldNotification.getGroupKey(); String newKey = entry.notification.getGroupKey(); boolean groupKeysChanged = !oldKey.equals(newKey); boolean wasGroupChild = isGroupChild(oldNotification); boolean isGroupChild = isGroupChild(entry.notification); mUpdatingSuppressionBlocked = !groupKeysChanged && wasGroupChild == isGroupChild; if (mGroupMap.get(getGroupKey(oldNotification)) != null) { onEntryRemovedInternal(entry, oldNotification); } onEntryAdded(entry); mUpdatingSuppressionBlocked = false; if (isIsolated(entry.notification)) { mIsolatedEntries.put(entry.key, entry.notification); String oldKey = oldNotification.getGroupKey(); String newKey = entry.notification.getGroupKey(); if (!oldKey.equals(newKey)) { if (groupKeysChanged) { updateSuppression(mGroupMap.get(oldKey)); updateSuppression(mGroupMap.get(newKey)); } } else if (!isGroupChild(oldNotification) && isGroupChild(entry.notification)) { } else if (!wasGroupChild && isGroupChild) { onEntryBecomingChild(entry); } } Loading