Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43d30f03 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where the top child notification wasn't expandable

Because we also applied the hack to the expand helper to dismiss
the whole group instead of the child.

Bug: 27420342
Change-Id: I6179d3b99150c8005d0c45b6efdabb2de4dbe941
parent 166f7c4a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -411,8 +411,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    }

    public ExpandableNotificationRow getViewAtPosition(float y) {
        if (!mIsSummaryWithChildren || !mChildrenExpanded
                || (getNotificationChildren().size() == 1 && isClearable())) {
        if (!mIsSummaryWithChildren || !mChildrenExpanded) {
            return this;
        } else {
            ExpandableNotificationRow view = mChildrenContainer.getViewAtPosition(y);
+7 −4
Original line number Diff line number Diff line
@@ -778,12 +778,15 @@ public class NotificationStackScrollLayout extends ViewGroup
        if (child instanceof ExpandableNotificationRow) {
            ExpandableNotificationRow row = (ExpandableNotificationRow) child;
            ExpandableNotificationRow parent = row.getNotificationParent();
            if (mGearExposedView != null && parent != null
                    && parent.areChildrenExpanded() && mGearExposedView == parent) {
            if (parent != null && parent.areChildrenExpanded()
                    && (mGearExposedView == parent
                        || (parent.getNotificationChildren().size() == 1
                                && parent.isClearable()))) {
                // In this case the group is expanded and showing the gear for the
                // group, further interaction should apply to the group, not any
                // child notifications so we use the parent of the child.
                child = row.getNotificationParent();
                // child notifications so we use the parent of the child. We also do the same
                // if we only have a single child.
                child = parent;
            }
        }
        return child;