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

Commit d8276a6a authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Fixes a usability issue where groups were clearable

am: 506deb69

Change-Id: I1779f958c6d3c926d88fb1971a2872323c229126
parents 7a9aa2e5 506deb69
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1175,7 +1175,20 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
     * @see #canViewBeDismissed()
     */
    public boolean isClearable() {
        return mStatusBarNotification != null && mStatusBarNotification.isClearable();
        if (mStatusBarNotification == null || !mStatusBarNotification.isClearable()) {
            return false;
        }
        if (mIsSummaryWithChildren) {
            List<ExpandableNotificationRow> notificationChildren =
                    mChildrenContainer.getNotificationChildren();
            for (int i = 0; i < notificationChildren.size(); i++) {
                ExpandableNotificationRow child = notificationChildren.get(i);
                if (!child.isClearable()) {
                    return false;
                }
            }
        }
        return true;
    }

    @Override