Fix issue with drags sometimes not being handled in tests

- ACTION_DRAG_ENTERED does not actually have location data, and
  ACTION_DRAG_LOCATION may not always be sent, which results in no
  target being computed prior to the DROP.  Since the DROP event
  also has location data, we should update in that case as well.

Bug: 234653212
Test: atest TaplTestsTaskbar
Change-Id: I1f7657a95a4f124d98fc0da78b8a3ac2237f91f6
This commit is contained in:
Winson Chung
2022-09-08 20:20:36 +00:00
parent 0accc2090c
commit 92c998a9fa

View File

@@ -258,12 +258,12 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
break;
case ACTION_DRAG_ENTERED:
pd.dragLayout.show();
pd.dragLayout.update(event);
break;
case ACTION_DRAG_LOCATION:
pd.dragLayout.update(event);
break;
case ACTION_DROP: {
pd.dragLayout.update(event);
return handleDrop(event, pd);
}
case ACTION_DRAG_EXITED: {