From e7d89deeb70b56cf2e616ac5142b482ed2fd53b3 Mon Sep 17 00:00:00 2001 From: Vaibhav Devmurari Date: Fri, 10 Mar 2023 13:32:54 +0000 Subject: Fix: Global DnD not working As part of global DnD feature we expect secondary touches to go to other windows and not get blocked by drag window. With the refactoring in InputDispatcher, we don't allow splitting touch if the current window has a pointer and has PREVENT_SPLITTING config even if that window has no touchable region. Removing PREVENT_SPLITTING config doesn't affect any behavior with focus, etc. Seems like legacy code that can be removed. Need extra work to make Esc key work to cancel DnD, which was already broken before this change. (To be handled in a separate CL) Test: manual Bug: 266705421 DD: go/global_drag_and_drop Change-Id: Id98b1687489bc29155a76d452a626b134189b576 --- services/core/java/com/android/server/wm/DragState.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java index 0b28ba2bb146..bc9efc88ecae 100644 --- a/services/core/java/com/android/server/wm/DragState.java +++ b/services/core/java/com/android/server/wm/DragState.java @@ -377,15 +377,10 @@ class DragState { mDragWindowHandle.ownerUid = MY_UID; mDragWindowHandle.scaleFactor = 1.0f; - // InputConfig.PREVENT_SPLITTING: To keep the default behavior of this window to be - // focusable, which allows the system to consume keys when dragging is active. This can - // also be used to modify the drag state on key press. For example, cancel drag on - // escape key. // InputConfig.TRUSTED_OVERLAY: To not block any touches while D&D ongoing and allowing // touches to pass through to windows underneath. This allows user to interact with the // UI to navigate while dragging. - mDragWindowHandle.inputConfig = - InputConfig.PREVENT_SPLITTING | InputConfig.TRUSTED_OVERLAY; + mDragWindowHandle.inputConfig = InputConfig.TRUSTED_OVERLAY; // The drag window cannot receive new touches. mDragWindowHandle.touchableRegion.setEmpty(); -- cgit v1.2.3-59-g8ed1b