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

Commit ddda9bd8 authored by Louis Chang's avatar Louis Chang
Browse files

Requesting a new transition when user switches

Home task was moved to top while switching to a new user and
the home activity was started afterward. A new transition was
started while starting the home activity and the previous top
activity visibility changes were also collected. The transition
was somehow aborted since the launch result was DELIVERED_TO_TOP.
Therefore, the previous top activity remained visible in the
background.

Requesting a new transition when user switches, so that all the
hierarchy changes would be collected and the visibility would
be updated after transition completed.

Bug: 284458878
Test: verified by the repro steps on the bug
Change-Id: I27177ba4b0017f89701d82cb4ffbb3db106725ea
parent f82b9468
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
import static android.view.WindowManager.REMOVE_CONTENT_MODE_UNDEFINED;
import static android.view.WindowManager.TRANSIT_NONE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.fixScale;
import static android.view.WindowManagerGlobal.ADD_OKAY;
import static android.view.WindowManagerGlobal.RELAYOUT_RES_CANCEL_AND_REDRAW;
@@ -3591,6 +3592,7 @@ public class WindowManagerService extends IWindowManager.Stub

    public void setCurrentUser(@UserIdInt int newUserId) {
        synchronized (mGlobalLock) {
            mAtmService.getTransitionController().requestTransitionIfNeeded(TRANSIT_OPEN, null);
            mCurrentUserId = newUserId;
            mPolicy.setCurrentUserLw(newUserId);
            mKeyguardDisableHandler.setCurrentUser(newUserId);