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

Commit 638dd788 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Fix bubble bar expanded view content bottom

I previously thought that the content position needs to be adjusted for
insets, but it turns out that the ime position was off. Now that ag/31234392 is submitted and the ime position is correct, we need to fix
the calculation on the bubbles side.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 377329425
Test: atest BubbleBarExpandedViewTest
Test: manual
       - have a bubble in the bar
       - expand it and request IME
       - verify expanded view is clipped correctly

Change-Id: I8adfcb8e1a8b028180c087448a37a43217a9edf2
parent 8f72d9d2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -290,11 +290,10 @@ class BubbleBarAnimationHelperTest {

        assertThat(semaphore.tryAcquire(5, TimeUnit.SECONDS)).isTrue()

        val bbevBottom = bbev.contentBottomOnScreen + bubblePositioner.insets.top
        activityScenario.onActivity {
            // notify that the IME top coordinate is greater than the bottom of the expanded view.
            // there's no overlap so it should not be clipped.
            animationHelper.onImeTopChanged(bbevBottom * 2)
            animationHelper.onImeTopChanged(bbev.contentBottomOnScreen * 2)
        }
        val outline = Outline()
        bbev.outlineProvider.getOutline(bbev, outline)
+1 −3
Original line number Diff line number Diff line
@@ -674,9 +674,7 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
        if (mTaskView != null) {
            mTaskView.getBoundsOnScreen(mTempBounds);
        }
        // return the bottom of the content rect, adjusted for insets so the result is in screen
        // coordinate
        return mTempBounds.bottom + mPositioner.getInsets().top;
        return mTempBounds.bottom;
    }

    /** Update the amount by which to clip the expanded view at the bottom. */