From b197862d974a9265abeca0b4d83944eb4288f2ee Mon Sep 17 00:00:00 2001 From: 1 Date: Fri, 12 Mar 2021 16:03:52 +0800 Subject: [PATCH] Make sure to hide IME adjust dims when exiting split mode If the IME is showing while exiting split mode, the IME-adjust dims won't be changed to hidden. This makes sure to hide the IME-adjust dims when leaving split mode. This phases in fix of ag/12683264 to R. Bug: 168505685 Fix: 181781489 Test: atest WMShellUnitTests Test: manual check switching user while showing IME in split mode, there won't have overlapping dim remains on the screen. Merged-In: I778df71616827c01f415231d8bbc20b037181d10 Change-Id: Ib7b843effd6c58e2d2546c8845a629701d87a521 --- .../systemui/stackdivider/DividerView.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java index be4009838fcc4..e59dca9d98c72 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java @@ -845,15 +845,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, } void enterSplitMode(boolean isHomeStackResizable) { - post(() -> { - final SurfaceControl sc = getWindowSurfaceControl(); - if (sc == null) { - return; - } - Transaction t = mTiles.getTransaction(); - t.show(sc).apply(); - mTiles.releaseTransaction(t); - }); + setHidden(false); SnapTarget miniMid = mSplitLayout.getMinimizedSnapAlgorithm(isHomeStackResizable).getMiddleTarget(); @@ -880,14 +872,17 @@ public class DividerView extends FrameLayout implements OnTouchListener, } void exitSplitMode() { - // Reset tile bounds final SurfaceControl sc = getWindowSurfaceControl(); if (sc == null) { return; } Transaction t = mTiles.getTransaction(); - t.hide(sc).apply(); + t.hide(sc); + mImeController.setDimsHidden(t, true); + t.apply(); mTiles.releaseTransaction(t); + + // Reset tile bounds int midPos = mSplitLayout.getSnapAlgorithm().getMiddleTarget().position; mWindowManagerProxy.applyResizeSplits(midPos, mSplitLayout); }