diff options
| author | 2022-06-22 11:26:00 +0000 | |
|---|---|---|
| committer | 2022-06-22 11:26:00 +0000 | |
| commit | f045091e58bd40fe00444b2cc5982d8c7e7fcce7 (patch) | |
| tree | 31463a4b85b25c39f29fd9d9fcfc8e9a49424b8e | |
| parent | be6a5af2a7408796fc424bc8e4c8f10d64c2d52d (diff) | |
| parent | bb7ab5864837765a41e02bf1f0c11eb20893bb46 (diff) | |
Merge "Make drag window a trusted overlay"
| -rw-r--r-- | services/core/java/com/android/server/wm/DragState.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java index f2d4d5427291..475dd17ef727 100644 --- a/services/core/java/com/android/server/wm/DragState.java +++ b/services/core/java/com/android/server/wm/DragState.java @@ -367,10 +367,15 @@ class DragState { mDragWindowHandle.ownerUid = MY_UID; mDragWindowHandle.scaleFactor = 1.0f; - // 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. - mDragWindowHandle.inputConfig = InputConfig.PREVENT_SPLITTING; + // 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; // The drag window cannot receive new touches. mDragWindowHandle.touchableRegion.setEmpty(); |