Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +4 −3 Original line number Diff line number Diff line Loading @@ -754,8 +754,7 @@ public class RecentsAnimationController implements DeathRecipient { // Only apply the input consumer if it is enabled, it is not the target (home/recents) // being revealed with the transition, and we are actively animating the app as a part of // the animation return mInputConsumerEnabled && mTargetActivityRecord != activity && isAnimatingApp(activity); return mInputConsumerEnabled && !isTargetApp(activity) && isAnimatingApp(activity); } boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle, Loading Loading @@ -810,7 +809,9 @@ public class RecentsAnimationController implements DeathRecipient { PooledLambda.__(ActivityRecord.class)); boolean isAnimatingApp = task.forAllActivities(f); f.recycle(); return isAnimatingApp; if (isAnimatingApp) { return true; } } return false; } Loading services/core/java/com/android/server/wm/WindowState.java +5 −5 Original line number Diff line number Diff line Loading @@ -2691,18 +2691,18 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mActivityRecord.getTask().getTaskStack().shouldIgnoreInput() || !mActivityRecord.mVisibleRequested || isAnimatingToRecents(); || isRecentsAnimationConsumingAppInput(); } /** * Returns {@code true} if the window is animating to home as part of the recents animation. * Returns {@code true} if the window is animating to home as part of the recents animation and * it is consuming input from the app. */ private boolean isAnimatingToRecents() { private boolean isRecentsAnimationConsumingAppInput() { final RecentsAnimationController recentsAnimationController = mWmService.getRecentsAnimationController(); return recentsAnimationController != null && recentsAnimationController.isAnimatingTask(getTask()) && !recentsAnimationController.isTargetApp(mActivityRecord); && recentsAnimationController.shouldApplyInputConsumer(mActivityRecord); } @Override Loading services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -596,7 +596,7 @@ public class WindowStateTests extends WindowTestsBase { // Mock active recents animation RecentsAnimationController recentsController = mock(RecentsAnimationController.class); when(recentsController.isAnimatingTask(win0.mActivityRecord.getTask())).thenReturn(true); when(recentsController.shouldApplyInputConsumer(win0.mActivityRecord)).thenReturn(true); mWm.setRecentsAnimationController(recentsController); assertTrue(win0.cantReceiveTouchInput()); } Loading Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +4 −3 Original line number Diff line number Diff line Loading @@ -754,8 +754,7 @@ public class RecentsAnimationController implements DeathRecipient { // Only apply the input consumer if it is enabled, it is not the target (home/recents) // being revealed with the transition, and we are actively animating the app as a part of // the animation return mInputConsumerEnabled && mTargetActivityRecord != activity && isAnimatingApp(activity); return mInputConsumerEnabled && !isTargetApp(activity) && isAnimatingApp(activity); } boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle, Loading Loading @@ -810,7 +809,9 @@ public class RecentsAnimationController implements DeathRecipient { PooledLambda.__(ActivityRecord.class)); boolean isAnimatingApp = task.forAllActivities(f); f.recycle(); return isAnimatingApp; if (isAnimatingApp) { return true; } } return false; } Loading
services/core/java/com/android/server/wm/WindowState.java +5 −5 Original line number Diff line number Diff line Loading @@ -2691,18 +2691,18 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mActivityRecord.getTask().getTaskStack().shouldIgnoreInput() || !mActivityRecord.mVisibleRequested || isAnimatingToRecents(); || isRecentsAnimationConsumingAppInput(); } /** * Returns {@code true} if the window is animating to home as part of the recents animation. * Returns {@code true} if the window is animating to home as part of the recents animation and * it is consuming input from the app. */ private boolean isAnimatingToRecents() { private boolean isRecentsAnimationConsumingAppInput() { final RecentsAnimationController recentsAnimationController = mWmService.getRecentsAnimationController(); return recentsAnimationController != null && recentsAnimationController.isAnimatingTask(getTask()) && !recentsAnimationController.isTargetApp(mActivityRecord); && recentsAnimationController.shouldApplyInputConsumer(mActivityRecord); } @Override Loading
services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -596,7 +596,7 @@ public class WindowStateTests extends WindowTestsBase { // Mock active recents animation RecentsAnimationController recentsController = mock(RecentsAnimationController.class); when(recentsController.isAnimatingTask(win0.mActivityRecord.getTask())).thenReturn(true); when(recentsController.shouldApplyInputConsumer(win0.mActivityRecord)).thenReturn(true); mWm.setRecentsAnimationController(recentsController); assertTrue(win0.cantReceiveTouchInput()); } Loading