Merge "Fix issue with both shell and launcher updating drag surface" into tm-qpr-dev am: e7b3665873 am: de5e6c51f8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21492889

Change-Id: I7eaeaa02ee239fba67c9ae02ffd11645c387c9c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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 3ade1ed..bb6e391 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
@@ -369,7 +369,9 @@
 
         // Start animating the drop UI out with the drag surface
         hide(event, dropCompleteCallback);
-        hideDragSurface(dragSurface);
+        if (handledDrop) {
+            hideDragSurface(dragSurface);
+        }
         return handledDrop;
     }