Correctly remove drag surface when perform drag failed

Currently DragDropController uses release to remove drag surface when performDrag fails, but release does not remove the surface from the screen.
This CL changes release to remove to correctly remove the drag surface.

Bug: 278663749
Test: DragDropControllerTests
Change-Id: I47f8c279fb49944e540078187437a4d7b153e721
This commit is contained in:
Saho Kobayashi
2023-05-02 15:51:19 +09:00
parent 7d7180e44e
commit 86a32d0d4e

View File

@@ -181,7 +181,11 @@ class DragDropController {
}
} finally {
if (surface != null) {
surface.release();
try (final SurfaceControl.Transaction transaction =
mService.mTransactionFactory.get()) {
transaction.remove(surface);
transaction.apply();
}
}
}
}