summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2018-12-06 21:42:44 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-12-06 21:42:44 +0000
commita4c83f4cb68a775c1f77a4be6e6a229dc8e9dd04 (patch)
tree977d93603b8733b72144c3a46791e761688a1533
parentbef4aa5f19f42daac2138f832baad3df7ec13f0f (diff)
parentbc34215021c536e596515fa5da7d0d23af5282bd (diff)
Merge "Clicks on the notification group header now collapse"
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java8
2 files changed, 12 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
index f4e7913972e6..16a3849a6eec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
@@ -183,6 +183,10 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater.
} else if (row.isChildInGroup() && isMenuVisible(row.getNotificationParent())) {
row.getNotificationParent().animateTranslateNotification(0);
return;
+ } else if (row.isSummaryWithChildren() && row.areChildrenExpanded()) {
+ // We never want to open the app directly if the user clicks in between
+ // the notifications.
+ return;
}
// Mark notification for one frame.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
index 0f38bd9804a9..51180361806b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
@@ -875,6 +875,7 @@ public class NotificationChildrenContainer extends ViewGroup {
ExpandableNotificationRow child = mChildren.get(childIdx);
child.setChildrenExpanded(childrenExpanded, false);
}
+ updateHeaderTouchability();
}
public void setContainingNotification(ExpandableNotificationRow parent) {
@@ -1215,6 +1216,13 @@ public class NotificationChildrenContainer extends ViewGroup {
ExpandableNotificationRow child = mChildren.get(i);
child.setUserLocked(userLocked && !showingAsLowPriority());
}
+ updateHeaderTouchability();
+ }
+
+ private void updateHeaderTouchability() {
+ if (mNotificationHeader != null) {
+ mNotificationHeader.setAcceptAllTouches(mChildrenExpanded || mUserLocked);
+ }
}
public void onNotificationUpdated() {