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

Commit d956ce02 authored by Yining Liu's avatar Yining Liu
Browse files

Fix the expander regression with async inflation

Add an update of expand status to fix the issue that when we update a
group summary notification, the group header's expand status was
reset to not expanded.

Fix: 339868658
Test: manual, follow the steps under the bug
Flag: ACONFIG notification_async_group_header_inflation TRUNK_FOOD
Change-Id: I1f24b0292c3115d09f457466461177808f625e2b
parent 56bd6c65
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -590,7 +590,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            mMenuRow.setAppName(mAppName);
        }
        if (mIsSummaryWithChildren) {
            if (!AsyncGroupHeaderViewInflation.isEnabled()) {
            if (AsyncGroupHeaderViewInflation.isEnabled()) {
                mChildrenContainer.updateGroupHeaderExpandState();
            } else {
                // We create the header from the background thread instead
                mChildrenContainer.recreateNotificationHeader(mExpandClickListener,
                        isConversation());
+9 −0
Original line number Diff line number Diff line
@@ -439,6 +439,15 @@ public class NotificationChildrenContainer extends ViewGroup
        Trace.endSection();
    }

    /**
     * Update the expand state of the group header.
     */
    public void updateGroupHeaderExpandState() {
        if (mGroupHeaderWrapper != null) {
            mGroupHeaderWrapper.setExpanded(mChildrenExpanded);
        }
    }

    private void removeGroupHeader() {
        if (mGroupHeader == null) {
            return;