OSDN Git Service

Notification groups with only one child behave nicer when swiping
authorSelim Cinek <cinek@google.com>
Tue, 1 Mar 2016 04:43:55 +0000 (20:43 -0800)
committerSelim Cinek <cinek@google.com>
Tue, 1 Mar 2016 19:16:33 +0000 (19:16 +0000)
When swiping the last child of a group away the notification parent
is now swiped instead of the child, unless it is non-dismissable.

Bug: 27420342
Change-Id: Idbb1fac5e46a5a91af829973ee167ad400be82a5

packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java

index 939cacb..f446593 100644 (file)
@@ -412,7 +412,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
     }
 
     public ExpandableNotificationRow getViewAtPosition(float y) {
-        if (!mIsSummaryWithChildren || !mChildrenExpanded) {
+        if (!mIsSummaryWithChildren || !mChildrenExpanded
+                || (getNotificationChildren().size() == 1 && isClearable())) {
             return this;
         } else {
             ExpandableNotificationRow view = mChildrenContainer.getViewAtPosition(y);