Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class NotificationAlertingManager { } @Override public void onPostEntryUpdated(NotificationEntry entry) { public void onPreEntryUpdated(NotificationEntry entry) { updateAlertState(entry); } Loading Loading @@ -114,8 +114,8 @@ public class NotificationAlertingManager { private void updateAlertState(NotificationEntry entry) { boolean alertAgain = alertAgain(entry, entry.getSbn().getNotification()); boolean shouldAlert; shouldAlert = mNotificationInterruptionStateProvider.shouldHeadsUp(entry); // includes check for whether this notification should be filtered: boolean shouldAlert = mNotificationInterruptionStateProvider.shouldHeadsUp(entry); final boolean wasAlerting = mHeadsUpManager.isAlerting(entry.getKey()); if (wasAlerting) { if (shouldAlert) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +3 −10 Original line number Diff line number Diff line Loading @@ -69,20 +69,13 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener, Dumpabl notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPreEntryUpdated(NotificationEntry entry) { final boolean mAmbientStateHasChanged = final boolean ambientStateHasChanged = entry.isAmbient() != entry.getRow().isLowPriority(); if (mAmbientStateHasChanged) { if (ambientStateHasChanged) { // note: entries are removed in onReorderingFinished mLowPriorityReorderingViews.add(entry); } } @Override public void onPostEntryUpdated(NotificationEntry entry) { // This line is technically not required as we'll get called as the hierarchy // manager will call onReorderingFinished() immediately before this. // TODO: Find a way to make this relationship more explicit mLowPriorityReorderingViews.remove(entry); } }); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java +3 −3 Original line number Diff line number Diff line Loading @@ -220,8 +220,8 @@ public class NotificationLogger implements StateListener { } @Override public void onEntryReinflated(NotificationEntry entry) { mExpansionStateLogger.onEntryReinflated(entry.getKey()); public void onPreEntryUpdated(NotificationEntry entry) { mExpansionStateLogger.onEntryUpdated(entry.getKey()); } @Override Loading Loading @@ -480,7 +480,7 @@ public class NotificationLogger implements StateListener { } @VisibleForTesting void onEntryReinflated(String key) { void onEntryUpdated(String key) { // When the notification is updated, we should consider the notification as not // yet logged. mLoggedExpansionState.remove(key); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +4 −4 Original line number Diff line number Diff line Loading @@ -608,10 +608,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPostEntryUpdated(NotificationEntry entry) { if (!entry.getSbn().isClearable()) { // The user may have performed a dismiss action on the notification, since it's // not clearable we should snap it back. public void onPreEntryUpdated(NotificationEntry entry) { if (entry.rowExists() && !entry.getSbn().isClearable()) { // If the row already exists, the user may have performed a dismiss action on // the notification. Since it's not clearable we should snap it back. snapViewIfNeeded(entry); } } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/ExpansionStateLoggerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class ExpansionStateLoggerTest extends SysuiTestCase { } @Test public void testOnEntryReinflated() throws RemoteException { public void testOnEntryUpdated() throws RemoteException { mLogger.onExpansionChanged(NOTIFICATION_KEY, true, true, NotificationVisibility.NotificationLocation.LOCATION_UNKNOWN); mLogger.onVisibilityChanged( Loading @@ -168,7 +168,7 @@ public class ExpansionStateLoggerTest extends SysuiTestCase { verify(mBarService).onNotificationExpansionChanged( NOTIFICATION_KEY, true, true, ExpandableViewState.LOCATION_UNKNOWN); mLogger.onEntryReinflated(NOTIFICATION_KEY); mLogger.onEntryUpdated(NOTIFICATION_KEY); mLogger.onVisibilityChanged( Collections.singletonList(createNotificationVisibility(NOTIFICATION_KEY, true)), Collections.emptyList()); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class NotificationAlertingManager { } @Override public void onPostEntryUpdated(NotificationEntry entry) { public void onPreEntryUpdated(NotificationEntry entry) { updateAlertState(entry); } Loading Loading @@ -114,8 +114,8 @@ public class NotificationAlertingManager { private void updateAlertState(NotificationEntry entry) { boolean alertAgain = alertAgain(entry, entry.getSbn().getNotification()); boolean shouldAlert; shouldAlert = mNotificationInterruptionStateProvider.shouldHeadsUp(entry); // includes check for whether this notification should be filtered: boolean shouldAlert = mNotificationInterruptionStateProvider.shouldHeadsUp(entry); final boolean wasAlerting = mHeadsUpManager.isAlerting(entry.getKey()); if (wasAlerting) { if (shouldAlert) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +3 −10 Original line number Diff line number Diff line Loading @@ -69,20 +69,13 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener, Dumpabl notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPreEntryUpdated(NotificationEntry entry) { final boolean mAmbientStateHasChanged = final boolean ambientStateHasChanged = entry.isAmbient() != entry.getRow().isLowPriority(); if (mAmbientStateHasChanged) { if (ambientStateHasChanged) { // note: entries are removed in onReorderingFinished mLowPriorityReorderingViews.add(entry); } } @Override public void onPostEntryUpdated(NotificationEntry entry) { // This line is technically not required as we'll get called as the hierarchy // manager will call onReorderingFinished() immediately before this. // TODO: Find a way to make this relationship more explicit mLowPriorityReorderingViews.remove(entry); } }); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java +3 −3 Original line number Diff line number Diff line Loading @@ -220,8 +220,8 @@ public class NotificationLogger implements StateListener { } @Override public void onEntryReinflated(NotificationEntry entry) { mExpansionStateLogger.onEntryReinflated(entry.getKey()); public void onPreEntryUpdated(NotificationEntry entry) { mExpansionStateLogger.onEntryUpdated(entry.getKey()); } @Override Loading Loading @@ -480,7 +480,7 @@ public class NotificationLogger implements StateListener { } @VisibleForTesting void onEntryReinflated(String key) { void onEntryUpdated(String key) { // When the notification is updated, we should consider the notification as not // yet logged. mLoggedExpansionState.remove(key); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +4 −4 Original line number Diff line number Diff line Loading @@ -608,10 +608,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPostEntryUpdated(NotificationEntry entry) { if (!entry.getSbn().isClearable()) { // The user may have performed a dismiss action on the notification, since it's // not clearable we should snap it back. public void onPreEntryUpdated(NotificationEntry entry) { if (entry.rowExists() && !entry.getSbn().isClearable()) { // If the row already exists, the user may have performed a dismiss action on // the notification. Since it's not clearable we should snap it back. snapViewIfNeeded(entry); } } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/ExpansionStateLoggerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class ExpansionStateLoggerTest extends SysuiTestCase { } @Test public void testOnEntryReinflated() throws RemoteException { public void testOnEntryUpdated() throws RemoteException { mLogger.onExpansionChanged(NOTIFICATION_KEY, true, true, NotificationVisibility.NotificationLocation.LOCATION_UNKNOWN); mLogger.onVisibilityChanged( Loading @@ -168,7 +168,7 @@ public class ExpansionStateLoggerTest extends SysuiTestCase { verify(mBarService).onNotificationExpansionChanged( NOTIFICATION_KEY, true, true, ExpandableViewState.LOCATION_UNKNOWN); mLogger.onEntryReinflated(NOTIFICATION_KEY); mLogger.onEntryUpdated(NOTIFICATION_KEY); mLogger.onVisibilityChanged( Collections.singletonList(createNotificationVisibility(NOTIFICATION_KEY, true)), Collections.emptyList()); Loading