diff options
| author | 2024-08-26 16:20:50 +0800 | |
|---|---|---|
| committer | 2024-08-27 02:23:38 +0000 | |
| commit | 220d1bdaf524e24ffb30c7e2d626f68a9494f37b (patch) | |
| tree | e9ae435f19357298842d8cef39e455b030ff6076 | |
| parent | 4cc6b39fa5fe44f5b4c71b1447b49b84d745ec6d (diff) | |
Clean up doNotSkipImeByTargetVisibility flag
The bugfix flag was enabled over one month.
Bug: 339375944
Flag: EXEMPT remove dead code for launched flag
Test: WindowContainerTraversalTests#testTraverseImeRegardlessOfImeTarget
Change-Id: Ide148322b410c1a84b7d885633f1d2396dbd809a
4 files changed, 0 insertions, 69 deletions
diff --git a/core/java/android/window/flags/windowing_frontend.aconfig b/core/java/android/window/flags/windowing_frontend.aconfig index be744fde96dd..67fc27042ff8 100644 --- a/core/java/android/window/flags/windowing_frontend.aconfig +++ b/core/java/android/window/flags/windowing_frontend.aconfig @@ -19,16 +19,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" description: "Make pip activity lifecyle change with windowing mode" diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 81bce186f99e..a16303bacb6f 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -4667,17 +4667,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); } diff --git a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java index 1e8c3b27b12e..6f7d0dced484 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java @@ -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; @@ -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); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java index 22def515a98e..72935cb546d9 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java @@ -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() { |