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

Commit d3d362dd authored by Rahul Banerjee's avatar Rahul Banerjee Committed by Android (Google) Code Review
Browse files

Merge "Fix HUN Group Expansion Transparency bug." into main

parents 939d2e13 5b914c45
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -4084,14 +4084,27 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        updateBackgroundForGroupState();
    }

    /** @return whether a HUN expansion has completed outside the shade, with row transparency. */
    private boolean isHUNGroupExpanded() {
        return mIsHeadsUp
                && isGroupExpanded()
                && !isGroupExpansionChanging();
    }

    /**
     * Updates the parent and children backgrounds in a group based on the expansion state.
     */
    public void updateBackgroundForGroupState() {
        if (mIsSummaryWithChildren) {
            // Only when the group has finished expanding do we hide its background.
            // When the group has finished expanding, we hide its background.
            // Exception: when row transparency is enabled, and a HUN group is expanded,
            // we want to preserve the background at the end of the expansion animation.
            if (notificationRowTransparency() && isHUNGroupExpanded()) {
                mShowNoBackground = false;
            } else {
                mShowNoBackground = !mShowGroupBackgroundWhenExpanded && isGroupExpanded()
                        && !isGroupExpansionChanging() && !isUserLocked();
            }
            mChildrenContainer.updateHeaderForExpansion(mShowNoBackground);
            List<ExpandableNotificationRow> children = mChildrenContainer.getAttachedChildren();
            for (int i = 0; i < children.size(); i++) {