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

Commit 40bf15c6 authored by Evan Rosky's avatar Evan Rosky
Browse files

Use correct bounds when calculating systemui visibility

currently the organizer-created primary split root-task always
populates the split-screen primary stack reference, so
isSplitScreenModeActivated needs to be used, instead, to check
if we are in split-screen

Bug: 152462949
Test: used log-statements to verify that it thinks split is false
Change-Id: I3a762bfdb323c530d60bc15043a12cb3d456a722
parent 71a6d0bf
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -541,12 +541,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
        /** Unregister a system listener for touch events */
        void unregisterPointerEventListener(PointerEventListener listener, int displayId);

        /**
         * Retrieves the {@param outBounds} from the stack matching the {@param windowingMode} and
         * {@param activityType}.
         */
        void getStackBounds(int windowingMode, int activityType, Rect outBounds);

        /**
         * @return The currently active input method window.
         */
+8 −3
Original line number Diff line number Diff line
@@ -3246,9 +3246,14 @@ public class DisplayPolicy {
                mTopFullscreenOpaqueWindowState, mTopFullscreenOpaqueOrDimmingWindowState);
        final int dockedAppearance = updateLightStatusBarAppearanceLw(0 /* vis */,
                mTopDockedOpaqueWindowState, mTopDockedOpaqueOrDimmingWindowState);
        mService.getStackBounds(
                WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD, mDockedStackBounds);
        final boolean inSplitScreen = !mDockedStackBounds.isEmpty();
        final boolean inSplitScreen =
                mService.mRoot.getDefaultDisplay().mTaskContainers.isSplitScreenModeActivated();
        if (inSplitScreen) {
            mService.getStackBounds(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD,
                    mDockedStackBounds);
        } else {
            mDockedStackBounds.setEmpty();
        }
        mService.getStackBounds(inSplitScreen ? WINDOWING_MODE_SPLIT_SCREEN_SECONDARY
                        : WINDOWING_MODE_FULLSCREEN,
                ACTIVITY_TYPE_UNDEFINED, mNonDockedStackBounds);
+0 −1
Original line number Diff line number Diff line
@@ -2782,7 +2782,6 @@ public class WindowManagerService extends IWindowManager.Stub
                aspectRatio);
    }

    @Override
    public void getStackBounds(int windowingMode, int activityType, Rect bounds) {
        synchronized (mGlobalLock) {
            final ActivityStack stack = mRoot.getStack(windowingMode, activityType);