Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -18,16 +18,6 @@ flag { } } flag { name: "do_not_skip_ime_by_target_visibility" namespace: "windowing_frontend" description: "Avoid window traversal missing IME" bug: "339375944" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "apply_lifecycle_on_pip_change" namespace: "windowing_frontend" Loading services/core/java/com/android/server/wm/WindowState.java +0 −11 Original line number Diff line number Diff line Loading @@ -4666,17 +4666,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP if (!isImeLayeringTarget()) { return false; } if (!com.android.window.flags.Flags.doNotSkipImeByTargetVisibility()) { // Note that we don't process IME window if the IME input target is not on the screen. // In case some unexpected IME visibility cases happen like starting the remote // animation on the keyguard but seeing the IME window that originally on the app // which behinds the keyguard. final WindowState imeInputTarget = getImeInputTarget(); if (imeInputTarget != null && !(imeInputTarget.isDrawn() || imeInputTarget.isVisibleRequested())) { return false; } } return mDisplayContent.forAllImeWindows(callback, traverseTopToBottom); } Loading services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +0 −46 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.when; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMATION; import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.fail; import static org.junit.Assert.assertEquals; Loading Loading @@ -728,51 +727,6 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } } @android.platform.test.annotations.RequiresFlagsDisabled( com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY) @SetupWindows(addWindows = W_INPUT_METHOD) @Test public void testLaunchRemoteAnimationWithoutImeBehind() { final WindowState win1 = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin1"); final WindowState win2 = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin2"); // Simulating win1 has shown IME and being IME layering/input target mDisplayContent.setImeLayeringTarget(win1); mDisplayContent.setImeInputTarget(win1); mImeWindow.mWinAnimator.hide(mDisplayContent.getPendingTransaction(), "test"); spyOn(mDisplayContent); mImeWindow.mWinAnimator.mSurfaceControl = mock(SurfaceControl.class); makeWindowVisibleAndDrawn(mImeWindow); assertTrue(mImeWindow.isOnScreen()); assertFalse(mImeWindow.isParentWindowHidden()); try { // Simulating now win1 is being covered by the lockscreen which has no surface, // and then launching an activity win2 with the remote animation win1.mHasSurface = false; win1.mActivityRecord.setVisibility(false); mDisplayContent.mOpeningApps.add(win2.mActivityRecord); final AnimationAdapter adapter = mController.createRemoteAnimationRecord( win2.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null, false).mAdapter; adapter.startAnimation(mMockLeash, mMockTransaction, ANIMATION_TYPE_APP_TRANSITION, mFinishedCallback); mDisplayContent.applySurfaceChangesTransaction(); mController.goodToGo(TRANSIT_OLD_TASK_OPEN); mWm.mAnimator.executeAfterPrepareSurfacesRunnables(); verify(mMockRunner).onAnimationStart(eq(TRANSIT_OLD_TASK_OPEN), any(), any(), any(), any()); // Verify the IME window won't apply surface change transaction with forAllImeWindows verify(mDisplayContent, never()).forAllImeWindows(any(), eq(true)); } catch (Exception e) { // no-op } finally { mDisplayContent.mOpeningApps.clear(); } } private AnimationAdapter setupForNonAppTargetNavBar(int transit, boolean shouldAttachNavBar) { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); mDisplayContent.mOpeningApps.add(win.mActivityRecord); Loading services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java +0 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,6 @@ public class WindowContainerTraversalTests extends WindowTestsBase { verify(c).accept(eq(mImeWindow)); } @android.platform.test.annotations.RequiresFlagsEnabled( com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY) @SetupWindows(addWindows = { W_ACTIVITY, W_INPUT_METHOD }) @Test public void testTraverseImeRegardlessOfImeTarget() { Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -18,16 +18,6 @@ flag { } } flag { name: "do_not_skip_ime_by_target_visibility" namespace: "windowing_frontend" description: "Avoid window traversal missing IME" bug: "339375944" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "apply_lifecycle_on_pip_change" namespace: "windowing_frontend" Loading
services/core/java/com/android/server/wm/WindowState.java +0 −11 Original line number Diff line number Diff line Loading @@ -4666,17 +4666,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP if (!isImeLayeringTarget()) { return false; } if (!com.android.window.flags.Flags.doNotSkipImeByTargetVisibility()) { // Note that we don't process IME window if the IME input target is not on the screen. // In case some unexpected IME visibility cases happen like starting the remote // animation on the keyguard but seeing the IME window that originally on the app // which behinds the keyguard. final WindowState imeInputTarget = getImeInputTarget(); if (imeInputTarget != null && !(imeInputTarget.isDrawn() || imeInputTarget.isVisibleRequested())) { return false; } } return mDisplayContent.forAllImeWindows(callback, traverseTopToBottom); } Loading
services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +0 −46 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.when; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMATION; import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.fail; import static org.junit.Assert.assertEquals; Loading Loading @@ -728,51 +727,6 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } } @android.platform.test.annotations.RequiresFlagsDisabled( com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY) @SetupWindows(addWindows = W_INPUT_METHOD) @Test public void testLaunchRemoteAnimationWithoutImeBehind() { final WindowState win1 = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin1"); final WindowState win2 = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin2"); // Simulating win1 has shown IME and being IME layering/input target mDisplayContent.setImeLayeringTarget(win1); mDisplayContent.setImeInputTarget(win1); mImeWindow.mWinAnimator.hide(mDisplayContent.getPendingTransaction(), "test"); spyOn(mDisplayContent); mImeWindow.mWinAnimator.mSurfaceControl = mock(SurfaceControl.class); makeWindowVisibleAndDrawn(mImeWindow); assertTrue(mImeWindow.isOnScreen()); assertFalse(mImeWindow.isParentWindowHidden()); try { // Simulating now win1 is being covered by the lockscreen which has no surface, // and then launching an activity win2 with the remote animation win1.mHasSurface = false; win1.mActivityRecord.setVisibility(false); mDisplayContent.mOpeningApps.add(win2.mActivityRecord); final AnimationAdapter adapter = mController.createRemoteAnimationRecord( win2.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null, false).mAdapter; adapter.startAnimation(mMockLeash, mMockTransaction, ANIMATION_TYPE_APP_TRANSITION, mFinishedCallback); mDisplayContent.applySurfaceChangesTransaction(); mController.goodToGo(TRANSIT_OLD_TASK_OPEN); mWm.mAnimator.executeAfterPrepareSurfacesRunnables(); verify(mMockRunner).onAnimationStart(eq(TRANSIT_OLD_TASK_OPEN), any(), any(), any(), any()); // Verify the IME window won't apply surface change transaction with forAllImeWindows verify(mDisplayContent, never()).forAllImeWindows(any(), eq(true)); } catch (Exception e) { // no-op } finally { mDisplayContent.mOpeningApps.clear(); } } private AnimationAdapter setupForNonAppTargetNavBar(int transit, boolean shouldAttachNavBar) { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); mDisplayContent.mOpeningApps.add(win.mActivityRecord); Loading
services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java +0 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,6 @@ public class WindowContainerTraversalTests extends WindowTestsBase { verify(c).accept(eq(mImeWindow)); } @android.platform.test.annotations.RequiresFlagsEnabled( com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY) @SetupWindows(addWindows = { W_ACTIVITY, W_INPUT_METHOD }) @Test public void testTraverseImeRegardlessOfImeTarget() { Loading