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

Commit dce6a3c8 authored by Shawn Lee's avatar Shawn Lee
Browse files

[flexiglass] Use intrinsicHeight for HUN placeholder and update translation

Fixes two issues: the HUN not being translated correctly while being dragged, and the placeholder not updating its height correctly when the HUN is expanded/collapsed after being dragged and expanded during shade expansion.

Bug: 357661886
Test: manually verified HUN is no longer clipped behind QQS tiles when shade is expanded via dragging on a HUN
Test: manually verified HUN placeholder height is correctly updated to match pinned notif height in shade
Flag: com.android.systemui.scene_container
Change-Id: Ic7e9460f3f87f6315c232709747cdb062f98340e
parent 9c7d4ea7
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -1721,6 +1721,19 @@ public class NotificationStackScrollLayout
        if (mTopHeadsUpRow == null) {
            return 0;
        }
        ExpandableNotificationRow row = getTopHeadsUpRow();
        return row.getPinnedHeadsUpHeight();
    }

    private int getTopHeadsUpIntrinsicHeight() {
        if (mTopHeadsUpRow == null) {
            return 0;
        }
        ExpandableNotificationRow row = getTopHeadsUpRow();
        return row.getIntrinsicHeight();
    }

    private ExpandableNotificationRow getTopHeadsUpRow() {
        ExpandableNotificationRow row = mTopHeadsUpRow;
        if (row.isChildInGroup()) {
            final NotificationEntry groupSummary =
@@ -1729,7 +1742,7 @@ public class NotificationStackScrollLayout
                row = groupSummary.getRow();
            }
        }
        return row.getPinnedHeadsUpHeight();
        return row;
    }

    /**
@@ -2511,7 +2524,7 @@ public class NotificationStackScrollLayout

    @Override
    public int getTopHeadsUpHeight() {
        return getTopHeadsUpPinnedHeight();
        return getTopHeadsUpIntrinsicHeight();
    }

    /**