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

Commit 4dae54d7 authored by Evan Rosky's avatar Evan Rosky
Browse files

Keep ime information up-to-date even when divider invisible

Otherwise, it can accidentally put the divider into ime
mode when there isn't an ime.

Bug: 159380790
Test: with minimized primary, open ime in launcher then expand
      primary to leave split mode. Re-enter min primary and
      rotate device. Open an app in secondary and make sure
      it doesn't dim the primary.
Change-Id: I68a9b56073b247e0a63c6670a9e1b330014bebc8
parent 254dcfd5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -126,16 +126,16 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
    @Override
    public void onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
            boolean imeShouldShow, SurfaceControl.Transaction t) {
        mHiddenTop = hiddenTop;
        mShownTop = shownTop;
        mTargetShown = imeShouldShow;
        if (!isDividerVisible()) {
            return;
        }
        final boolean splitIsVisible = !getView().isHidden();
        mSecondaryHasFocus = getSecondaryHasFocus(displayId);
        final boolean targetAdjusted = splitIsVisible && imeShouldShow && mSecondaryHasFocus
                && !getLayout().mDisplayLayout.isLandscape();
        mHiddenTop = hiddenTop;
        mShownTop = shownTop;
        mTargetShown = imeShouldShow;
                && !getLayout().mDisplayLayout.isLandscape() && !mSplits.mDivider.isMinimized();
        if (mLastAdjustTop < 0) {
            mLastAdjustTop = imeShouldShow ? hiddenTop : shownTop;
        } else if (mLastAdjustTop != (imeShouldShow ? mShownTop : mHiddenTop)) {