From d43f418ffdd4e43e42224b5578585cae98b8762b Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Fri, 4 Nov 2022 12:23:11 -0700 Subject: [PATCH] Fix an issue where the highlight for drag to split was incorrect 1. Have a fullscreen immersive app open 2. Swipe bottom of the screen to show the taskbar 3. Drag and app In 3 when you start dragging the app, the taskbar hides because you're in an immersive app, this causes the rect for the drag targets to be different, so we'd end up animating the drop zones to switch even though the type of the target was the same. Fix is to check that the target type is different before animating the switch. Bug: 255008704 Test: manual Change-Id: Ic8a7b23e79c54ba74aa6bebf528fb0b3894a8fa1 --- .../Shell/src/com/android/wm/shell/draganddrop/DragLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java index 497a6f696df89..55378a826385d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java @@ -311,7 +311,7 @@ public class DragLayout extends LinearLayout { animateSplitContainers(true, null /* animCompleteCallback */); animateHighlight(target); } - } else { + } else if (mCurrentTarget.type != target.type) { // Switching between targets mDropZoneView1.animateSwitch(); mDropZoneView2.animateSwitch();