diff options
| author | 2019-05-30 17:38:52 -0400 | |
|---|---|---|
| committer | 2019-05-31 17:30:12 -0400 | |
| commit | ff6c25e775bca0e2a488a38c8bfd04e81cf847cf (patch) | |
| tree | 2884d7ec1cd3068867afdc1bb51a2cf3f3ce9a97 | |
| parent | 7ef81a69d9b13c787462b5bb343ae551afb69bfe (diff) | |
Dismiss all snoozed notifications upon swiping another
Fixes: 123873134
Test: manual
Change-Id: I5d7f16a5578c51581b0d075996b3680075c8f2a2
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index a517e760c8b4..6b28789dd8af 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -477,8 +477,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd private float mHorizontalPanelTranslation; private final NotificationLockscreenUserManager mLockscreenUserManager = Dependency.get(NotificationLockscreenUserManager.class); - protected final NotificationGutsManager mGutsManager = - Dependency.get(NotificationGutsManager.class); private final Rect mTmpRect = new Rect(); private final NotificationEntryManager mEntryManager = Dependency.get(NotificationEntryManager.class); @@ -625,7 +623,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd inflateFooterView(); mVisualStabilityManager.setVisibilityLocationProvider(this::isInVisibleLocation); if (mAllowLongPress) { - setLongPressListener(mGutsManager::openGuts); + setLongPressListener(mNotificationGutsManager::openGuts); } } @@ -6152,6 +6150,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd .setType(MetricsEvent.TYPE_ACTION)); mHeadsUpManager.setMenuShown(notificationRow.getEntry(), true); mSwipeHelper.onMenuShown(row); + mNotificationGutsManager.closeAndSaveGuts(true /* removeLeavebehind */, + false /* force */, false /* removeControls */, -1 /* x */, -1 /* y */, + false /* resetMenu */); // Check to see if we want to go directly to the notfication guts NotificationMenuRowPlugin provider = notificationRow.getProvider(); @@ -6159,7 +6160,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd MenuItem item = provider.menuItemToExposeOnSnap(); if (item != null) { Point origin = provider.getRevealAnimationOrigin(); - mGutsManager.openGuts(row, origin.x, origin.y, item); + mNotificationGutsManager.openGuts(row, origin.x, origin.y, item); } else { Log.e(TAG, "Provider has shouldShowGutsOnSnapOpen, but provided no " + "menu item in menuItemtoExposeOnSnap. Skipping."); |