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

Commit 96b499c4 authored by András Kurucz's avatar András Kurucz
Browse files

[flexiglass] Verify that NSSL#mImeInset is not used

We needed the ImeInset to scroll to an activated RemoteInput, but it is
handled by the placeholder. This Cl verifies that it is not accessed,
and stops setting it with flexiglass.

Bug: 360091533
Test: run sysui with, and witout flexiglass
Flag: EXEMPT mechanical refactor
Change-Id: Icc598e0750393c7997a59fd1a2394b2a4bc8c4a2
parent 1d23cdba
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -678,8 +678,10 @@ public class NotificationStackScrollLayout
        mGroupMembershipManager = Dependency.get(GroupMembershipManager.class);
        mGroupExpansionManager = Dependency.get(GroupExpansionManager.class);
        setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
        if (!SceneContainerFlag.isEnabled()) {
            setWindowInsetsAnimationCallback(mInsetsCallback);
        }
    }

    /**
     * Set the overexpansion of the panel to be applied to the view.
@@ -2086,6 +2088,7 @@ public class NotificationStackScrollLayout
    }

    private void updateImeInset(WindowInsets windowInsets) {
        SceneContainerFlag.assertInLegacyMode();
        mImeInset = windowInsets.getInsets(WindowInsets.Type.ime()).bottom;

        if (mFooterView != null && mFooterView.getViewState() != null) {
@@ -2112,7 +2115,7 @@ public class NotificationStackScrollLayout
        if (cutout != null) {
            mWaterfallTopInset = cutout.getWaterfallInsets().top;
        }
        if (!mIsInsetAnimationRunning) {
        if (!SceneContainerFlag.isEnabled() && !mIsInsetAnimationRunning) {
            // update bottom inset e.g. after rotation
            updateImeInset(insets);
        }
@@ -2513,6 +2516,7 @@ public class NotificationStackScrollLayout
    }

    private int getImeInset() {
        SceneContainerFlag.assertInLegacyMode();
        // The NotificationStackScrollLayout does not extend all the way to the bottom of the
        // display. Therefore, subtract that space from the mImeInset, in order to only include
        // the portion of the bottom inset that actually overlaps the NotificationStackScrollLayout.
+1 −0
Original line number Diff line number Diff line
@@ -1206,6 +1206,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void testWindowInsetAnimationProgress_updatesBottomInset() {
        int imeInset = 100;
        WindowInsets windowInsets = new WindowInsets.Builder()