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

Commit e56327d1 authored by Lyn Han's avatar Lyn Han
Browse files

Revert "Fix app icon showing when grouped notif is dismissed via action"

This reverts commit ee612e21.

Reason for revert: b/418888050

Fixes: 418888050
Change-Id: I3f89a335df87fe0fefdb0ec8a2c9d3851436350a
parent 1fbda547
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -96,11 +96,6 @@ public class NotificationChildrenContainer extends ViewGroup
        }
    }.setDuration(200);
    private static final SourceType FROM_PARENT = SourceType.from("FromParent(NCC)");
    /**
     * Temporary "flag" for a hack that works around an issue where isRemoved is always false for
     * rows.
     */
    private static final boolean USE_IS_CHANGING_POSITION_TO_RESTORE = true;

    private final List<View> mDividers = new ArrayList<>();
    private final List<ExpandableNotificationRow> mAttachedChildren = new ArrayList<>();
@@ -423,7 +418,7 @@ public class NotificationChildrenContainer extends ViewGroup
        row.setSystemChildExpanded(false);
        row.setNotificationFaded(false);
        row.setUserLocked(false);
        if (shouldRestoreChild(row)) {
        if (!row.isRemoved()) {
            mGroupingUtil.restoreChildNotification(row);
        }

@@ -431,17 +426,6 @@ public class NotificationChildrenContainer extends ViewGroup
        applyRoundnessAndInvalidate();
    }

    private static boolean shouldRestoreChild(ExpandableNotificationRow row) {
        // TODO: b/417457086 - We're only checking for isChangingPosition here as a quick-and-dirty
        //  fix for b/415665263, but the real issue is that isRemoved is currently ALWAYS false.
        //  We need to fix that behind a flag, so this hack is temporary.
        if (USE_IS_CHANGING_POSITION_TO_RESTORE) {
            return !row.isRemoved() && row.isChangingPosition();
        } else {
            return !row.isRemoved();
        }
    }

    /**
     * @return The number of notification children in the container.
     */