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

Commit 506deb69 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixes a usability issue where groups were clearable

If any child is not dismissable the summary now also becomes
non-dismissable.

Change-Id: I4a7b64dc6cd2151f46b4034195b895bfb868a990
Fixes: 30182606
parent 9e624e73
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