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

Commit d5f0b9ac authored by Tiger Huang's avatar Tiger Huang
Browse files

Sends the correct non-docked bounds to SystemUI

This CL fixes a bug that DisplayPolcy would send incorrect bounds to
SystemUI in the split-screen mode, because it would get the bounds from
the home stack, which is incorrect when the non-docked stack is not the
home stack.

Bug: 142390472
Test: Manually enter split-screen mode in landscape orientation, move
      the divider, and see if the icon color is correct.

Change-Id: Ic1a74ae814c677057085ad5de32bf3c8a7e19e86
parent 80e48cfc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -16,13 +16,12 @@

package com.android.server.wm;

import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.res.Configuration.UI_MODE_TYPE_CAR;
import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
import static android.view.Display.TYPE_BUILT_IN;
@@ -3129,10 +3128,11 @@ public class DisplayPolicy {
                mTopFullscreenOpaqueWindowState, mTopFullscreenOpaqueOrDimmingWindowState);
        final int dockedVisibility = updateLightStatusBarLw(0 /* vis */,
                mTopDockedOpaqueWindowState, mTopDockedOpaqueOrDimmingWindowState);
        mService.getStackBounds(
                WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_HOME, mNonDockedStackBounds);
        mService.getStackBounds(
                WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD, mDockedStackBounds);
        mService.getStackBounds(mDockedStackBounds.isEmpty()
                        ? WINDOWING_MODE_FULLSCREEN : WINDOWING_MODE_SPLIT_SCREEN_SECONDARY,
                ACTIVITY_TYPE_UNDEFINED, mNonDockedStackBounds);
        final Pair<Integer, Boolean> result =
                updateSystemBarsLw(win, mLastSystemUiFlags, tmpVisibility);
        final int visibility = result.first;