Loading services/core/java/com/android/server/wm/WindowState.java +7 −0 Original line number Diff line number Diff line Loading @@ -5635,6 +5635,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return false; } // We don't need to set the window to be relatively above IME if the IME is not visible. // In case seeing the window is animating above the app transition layer because its // relative layer is above the IME container on the display area but actually not necessary. if (!getDisplayContent().getImeContainer().isVisible()) { return false; } if (isChildWindow()) { // If we are a child of the input method target we need this promotion. if (getParentWindow().isImeLayeringTarget()) { Loading services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -854,12 +854,13 @@ public class WindowStateTests extends WindowTestsBase { assertTrue(mAtm.mActiveUids.hasNonAppVisibleWindow(uid)); } @UseTestDisplay(addWindows = W_ACTIVITY) @UseTestDisplay(addWindows = {W_ACTIVITY, W_INPUT_METHOD}) @Test public void testNeedsRelativeLayeringToIme_notAttached() { WindowState sameTokenWindow = createWindow(null, TYPE_BASE_APPLICATION, mAppWindow.mToken, "SameTokenWindow"); mDisplayContent.setImeLayeringTarget(mAppWindow); makeWindowVisible(mImeWindow); sameTokenWindow.mActivityRecord.getRootTask().setWindowingMode(WINDOWING_MODE_MULTI_WINDOW); assertTrue(sameTokenWindow.needsRelativeLayeringToIme()); sameTokenWindow.removeImmediately(); Loading @@ -872,6 +873,7 @@ public class WindowStateTests extends WindowTestsBase { WindowState sameTokenWindow = createWindow(null, TYPE_APPLICATION_STARTING, mAppWindow.mToken, "SameTokenWindow"); mDisplayContent.setImeLayeringTarget(mAppWindow); makeWindowVisible(mImeWindow); sameTokenWindow.mActivityRecord.getRootTask().setWindowingMode(WINDOWING_MODE_MULTI_WINDOW); assertFalse(sameTokenWindow.needsRelativeLayeringToIme()); } Loading services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,7 @@ public class ZOrderingTests extends WindowTestsBase { "imeAppTargetChildBelowWindow"); mDisplayContent.setImeLayeringTarget(imeAppTarget); makeWindowVisible(mImeWindow); mDisplayContent.assignChildLayers(mTransaction); // Ime should be above all app windows except for child windows that are z-ordered above it Loading Loading @@ -599,6 +600,7 @@ public class ZOrderingTests extends WindowTestsBase { WINDOWING_MODE_MULTI_WINDOW); mDisplayContent.setImeLayeringTarget(mAppWindow); mDisplayContent.setImeInputTarget(mAppWindow); makeWindowVisible(mImeWindow); // Create a popupWindow assertWindowHigher(mImeWindow, mAppWindow); Loading Loading
services/core/java/com/android/server/wm/WindowState.java +7 −0 Original line number Diff line number Diff line Loading @@ -5635,6 +5635,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return false; } // We don't need to set the window to be relatively above IME if the IME is not visible. // In case seeing the window is animating above the app transition layer because its // relative layer is above the IME container on the display area but actually not necessary. if (!getDisplayContent().getImeContainer().isVisible()) { return false; } if (isChildWindow()) { // If we are a child of the input method target we need this promotion. if (getParentWindow().isImeLayeringTarget()) { Loading
services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -854,12 +854,13 @@ public class WindowStateTests extends WindowTestsBase { assertTrue(mAtm.mActiveUids.hasNonAppVisibleWindow(uid)); } @UseTestDisplay(addWindows = W_ACTIVITY) @UseTestDisplay(addWindows = {W_ACTIVITY, W_INPUT_METHOD}) @Test public void testNeedsRelativeLayeringToIme_notAttached() { WindowState sameTokenWindow = createWindow(null, TYPE_BASE_APPLICATION, mAppWindow.mToken, "SameTokenWindow"); mDisplayContent.setImeLayeringTarget(mAppWindow); makeWindowVisible(mImeWindow); sameTokenWindow.mActivityRecord.getRootTask().setWindowingMode(WINDOWING_MODE_MULTI_WINDOW); assertTrue(sameTokenWindow.needsRelativeLayeringToIme()); sameTokenWindow.removeImmediately(); Loading @@ -872,6 +873,7 @@ public class WindowStateTests extends WindowTestsBase { WindowState sameTokenWindow = createWindow(null, TYPE_APPLICATION_STARTING, mAppWindow.mToken, "SameTokenWindow"); mDisplayContent.setImeLayeringTarget(mAppWindow); makeWindowVisible(mImeWindow); sameTokenWindow.mActivityRecord.getRootTask().setWindowingMode(WINDOWING_MODE_MULTI_WINDOW); assertFalse(sameTokenWindow.needsRelativeLayeringToIme()); } Loading
services/tests/wmtests/src/com/android/server/wm/ZOrderingTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,7 @@ public class ZOrderingTests extends WindowTestsBase { "imeAppTargetChildBelowWindow"); mDisplayContent.setImeLayeringTarget(imeAppTarget); makeWindowVisible(mImeWindow); mDisplayContent.assignChildLayers(mTransaction); // Ime should be above all app windows except for child windows that are z-ordered above it Loading Loading @@ -599,6 +600,7 @@ public class ZOrderingTests extends WindowTestsBase { WINDOWING_MODE_MULTI_WINDOW); mDisplayContent.setImeLayeringTarget(mAppWindow); mDisplayContent.setImeInputTarget(mAppWindow); makeWindowVisible(mImeWindow); // Create a popupWindow assertWindowHigher(mImeWindow, mAppWindow); Loading