Merge "Clicks on the notification group header now collapse"

This commit is contained in:
Selim Cinek
2018-12-06 21:42:44 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 0 deletions

View File

@@ -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.

View File

@@ -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() {