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

Commit af0c82ea authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes dock side when rotating to seascape after drag to split"

parents 881a432d e8b052af
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -454,8 +454,11 @@ public class DockedStackDividerController {
                inputMethodManagerInternal.hideCurrentInputMethod();
                mImeHideRequested = true;
            }

            // If a primary stack was just created, it will not have access to display content at
            // this point so pass it from here to get a valid dock side.
            final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
            mOriginalDockedSide = stack.getDockSide();
            mOriginalDockedSide = stack.getDockSideForDisplay(mDisplayContent);
            return;
        }
        mOriginalDockedSide = DOCKED_INVALID;
+12 −4
Original line number Diff line number Diff line
@@ -1397,15 +1397,23 @@ public class TaskStack extends WindowContainer<Task> implements
        return getDockSide(getRawBounds());
    }

    int getDockSideForDisplay(DisplayContent dc) {
        return getDockSide(dc, getRawBounds());
    }

    private int getDockSide(Rect bounds) {
        if (!inSplitScreenWindowingMode()) {
        if (mDisplayContent == null) {
            return DOCKED_INVALID;
        }
        if (mDisplayContent == null) {
        return getDockSide(mDisplayContent, bounds);
    }

    private int getDockSide(DisplayContent dc, Rect bounds) {
        if (!inSplitScreenWindowingMode()) {
            return DOCKED_INVALID;
        }
        mDisplayContent.getBounds(mTmpRect);
        final int orientation = mDisplayContent.getConfiguration().orientation;
        dc.getBounds(mTmpRect);
        final int orientation = dc.getConfiguration().orientation;
        return getDockSideUnchecked(bounds, mTmpRect, orientation);
    }