Loading services/core/java/com/android/server/wm/WindowManagerService.java +18 −5 Original line number Diff line number Diff line Loading @@ -7472,6 +7472,18 @@ public class WindowManagerService extends IWindowManager.Stub @Override public boolean injectInputAfterTransactionsApplied(InputEvent ev, int mode) { boolean shouldWaitForAnimComplete = false; if (ev instanceof KeyEvent) { KeyEvent keyEvent = (KeyEvent) ev; shouldWaitForAnimComplete = keyEvent.getSource() == InputDevice.SOURCE_MOUSE || keyEvent.getAction() == KeyEvent.ACTION_DOWN; } else if (ev instanceof MotionEvent) { MotionEvent motionEvent = (MotionEvent) ev; shouldWaitForAnimComplete = motionEvent.getSource() == InputDevice.SOURCE_MOUSE || motionEvent.getAction() == MotionEvent.ACTION_DOWN; } if (shouldWaitForAnimComplete) { waitForAnimationsToComplete(); synchronized (mGlobalLock) { Loading @@ -7479,6 +7491,7 @@ public class WindowManagerService extends IWindowManager.Stub } new SurfaceControl.Transaction().syncInputWindows().apply(true); } return LocalServices.getService(InputManagerInternal.class).injectInputEvent(ev, mode); } Loading Loading
services/core/java/com/android/server/wm/WindowManagerService.java +18 −5 Original line number Diff line number Diff line Loading @@ -7472,6 +7472,18 @@ public class WindowManagerService extends IWindowManager.Stub @Override public boolean injectInputAfterTransactionsApplied(InputEvent ev, int mode) { boolean shouldWaitForAnimComplete = false; if (ev instanceof KeyEvent) { KeyEvent keyEvent = (KeyEvent) ev; shouldWaitForAnimComplete = keyEvent.getSource() == InputDevice.SOURCE_MOUSE || keyEvent.getAction() == KeyEvent.ACTION_DOWN; } else if (ev instanceof MotionEvent) { MotionEvent motionEvent = (MotionEvent) ev; shouldWaitForAnimComplete = motionEvent.getSource() == InputDevice.SOURCE_MOUSE || motionEvent.getAction() == MotionEvent.ACTION_DOWN; } if (shouldWaitForAnimComplete) { waitForAnimationsToComplete(); synchronized (mGlobalLock) { Loading @@ -7479,6 +7491,7 @@ public class WindowManagerService extends IWindowManager.Stub } new SurfaceControl.Transaction().syncInputWindows().apply(true); } return LocalServices.getService(InputManagerInternal.class).injectInputEvent(ev, mode); } Loading