From dda8850a7e12443aed6036ad4b389876de31d035 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Wed, 14 Jul 2021 17:28:30 +0800 Subject: [PATCH] Fix main stage full screen after lock phone We will set main stage to full screen when it visible but side stage not visible, but we should not do it when phone unlock. Add isSleeping check to avoid such problem. Fix: 193605614 Test: pick any 2 apps to stage split then lock and unlock phone. Change-Id: I0fd99960ca0c5a10ac33b23f92f01d9b48877379 --- .../src/com/android/wm/shell/splitscreen/StageCoordinator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index 67b5ab390042a..a89ce9ae76f20 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -526,9 +526,10 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, // visible. mMainStage.updateConfiguration( WINDOWING_MODE_MULTI_WINDOW, getMainStageBounds(), wct); - } else { + } else if (!mSideStage.mRootTaskInfo.isSleeping) { // We want the main stage configuration to be fullscreen when the side stage isn't // visible. + // We should not do it when side stage are not visible due to sleeping display too. mMainStage.updateConfiguration(WINDOWING_MODE_FULLSCREEN, null, wct); } // TODO: Change to `mSyncQueue.queue(wct)` once BLAST is stable.