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

Commit 09d84fe1 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where the clipping would be wrong when collapsing

When collapsing the shade, our clipping logic was wrongly assuming
that the full actualHeight lead to the visible background bottom
which is not accurate. For groups, we also set the clipBottomAmount
that impacts its position and that should be taken into account
when clipping, otherwise it would lead to holes.

Fixes: 422119449
Tests: atest SystemUITests
Flag: com.android.systemui.physical_notification_movement
Change-Id: Ibfad00f99518b80316ace4fc00bb958ab426321c
parent 28b24cbd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -101,4 +101,13 @@ class ActivatableNotificationViewTest : SysuiTestCase() {
        assertThat(mView.topRoundness).isEqualTo(1f)
        assertThat(mView.roundableState.hashCode()).isEqualTo(roundableState.hashCode())
    }

    @Test
    fun getBackgroundBottom_respects_clipBottomAmount() {
        mView.actualHeight = 100
        assertThat(mView.backgroundBottom).isEqualTo(100)

        mView.clipBottomAmount = 10
        assertThat(mView.backgroundBottom).isEqualTo(90)
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public abstract class ExpandableOutlineView extends ExpandableView {
        if (mCustomOutline) {
            return mOutlineRect.bottom;
        }
        return getActualHeight();
        return getActualHeight() - getClipBottomAmount();
    }

    protected Path getClipPath(boolean ignoreTranslation) {