From 2e96c63c4ce37514728ad0fc36db0225d6ad97b9 Mon Sep 17 00:00:00 2001 From: Vladislav Kaznacheev Date: Tue, 13 Dec 2016 14:31:24 -0800 Subject: [PATCH] Fix InputMonitor.updateInputWindowsLw Drag and drop (as well as window positioning by drag) was broken by commit 6213caa. Drag-related window handles got wiped out by a call to clearInputWindowHandlesLw. Bug: 33499942 Test: cts-tradefed ... android.server.cts.CrossAppDragAndDropTests Change-Id: I2504b1b6623fc8551c8110606c06156e49bfc63d --- services/core/java/com/android/server/wm/InputMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 495be094c982f..0c85b986c6314 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -591,8 +591,6 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { private void updateInputWindows(boolean inDrag) { - clearInputWindowHandlesLw(); - // TODO: multi-display navInputConsumer = getInputConsumer(INPUT_CONSUMER_NAVIGATION, DEFAULT_DISPLAY); pipInputConsumer = getInputConsumer(INPUT_CONSUMER_PIP, DEFAULT_DISPLAY); @@ -614,6 +612,8 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { // Send windows to native code. mService.mInputManager.setInputWindows(mInputWindowHandles); + + clearInputWindowHandlesLw(); } @Override