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

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

Merge "Fix HUN BG Mismatch on Expansion." into main

parents 170b5d83 2591101d
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -1106,6 +1106,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    public void markHeadsUpSeen() {
    public void markHeadsUpSeen() {
        super.markHeadsUpSeen();
        super.markHeadsUpSeen();
        mMustStayOnScreen = false;
        mMustStayOnScreen = false;
        if (notificationRowTransparency()) {
            updateBackgroundTint();
        }
    }
    }


    /**
    /**
@@ -4135,6 +4138,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                    mChildrenContainer.getAttachedChildren();
                    mChildrenContainer.getAttachedChildren();
            for (int i = 0; i < notificationChildren.size(); i++) {
            for (int i = 0; i < notificationChildren.size(); i++) {
                ExpandableNotificationRow child = notificationChildren.get(i);
                ExpandableNotificationRow child = notificationChildren.get(i);
                if (notificationRowTransparency()) {
                    child.updateBackgroundTint();
                }
                child.updateBackgroundForGroupState();
                child.updateBackgroundForGroupState();
            }
            }
        }
        }
@@ -4160,13 +4166,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            mShowNoBackground = true;
            mShowNoBackground = true;
            mChildrenContainer.updateHeaderForExpansion(mShowNoBackground);
            mChildrenContainer.updateHeaderForExpansion(mShowNoBackground);
        } else if (mIsSummaryWithChildren) {
        } else if (mIsSummaryWithChildren) {
            // With row transparency, a pinned notification should not hide its background.
            if (notificationRowTransparency() && isPinned()) {
                mShowNoBackground = false;
            } else {
            mShowNoBackground = !mShowGroupBackgroundWhenExpanded && isGroupExpanded()
            mShowNoBackground = !mShowGroupBackgroundWhenExpanded && isGroupExpanded()
                    && !isGroupExpansionChanging() && !isUserLocked();
                    && !isGroupExpansionChanging() && !isUserLocked();
            }
            mChildrenContainer.updateHeaderForExpansion(mShowNoBackground);
            mChildrenContainer.updateHeaderForExpansion(mShowNoBackground);
            List<ExpandableNotificationRow> children = mChildrenContainer.getAttachedChildren();
            List<ExpandableNotificationRow> children = mChildrenContainer.getAttachedChildren();
            for (int i = 0; i < children.size(); i++) {
            for (int i = 0; i < children.size(); i++) {
@@ -4880,6 +4881,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        // Also, for an unpinned HUN on the unlocked shade, the row bg should be transparent.
        // Also, for an unpinned HUN on the unlocked shade, the row bg should be transparent.
        return super.usesTransparentBackground()
        return super.usesTransparentBackground()
                && !mustStayOnScreen()
                && !mustStayOnScreen()
                && !(isChildInGroup() && !mNotificationParent.usesTransparentBackground())
                && !mHeadsupDisappearRunning
                && !mHeadsupDisappearRunning
                && !mOnKeyguard;
                && !mOnKeyguard;
    }
    }