Fix a bug in drop region.

isDescendantOf doesn't check equality, so add that

Bug: 154832406
Test: Put app in split-primary, open launcher search and drag
      app icon into top part of launcher
Change-Id: I737f4b2db88599e28ba8852341bbe37ae38c1239
This commit is contained in:
Evan Rosky
2020-06-23 09:42:39 -07:00
parent b19aa9888f
commit d036331f3b

View File

@@ -2934,7 +2934,7 @@ class Task extends WindowContainer<WindowContainer> {
final Task rootTask = getRootTask();
final Task topNonOrgTask =
rootTask.mCreatedByOrganizer ? rootTask.getTopMostTask() : rootTask;
if (isDescendantOf(topNonOrgTask)) {
if (this == topNonOrgTask || isDescendantOf(topNonOrgTask)) {
return false;
}
}