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

Commit 5b914c45 authored by Rahul Banerjee's avatar Rahul Banerjee
Browse files

Fix HUN Group Expansion Transparency bug.

Bug: 406791391
Test: Manual (build, flash, and follow steps in b/406791391#comment6)
Flag: com.android.systemui.notification_row_transparency
Change-Id: I2cc590b8026141b7e32642332f283f4065b64d83
parent c3ce2baf
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -4080,14 +4080,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++) {