Fix touch fails after drag and drop
The drag surface would reparent to null in the end of drag & drop.
But the deatched layer didn't dirty the input cause InputFlinger
would not receive the latest input windows.
- Dirty input when remove layer from current state.
Bug: 151171041
Test: atest DragDropTest CrossAppDragAndDropTests
Change-Id: I3cf9b063801260f276eb20b3aa474b4b3e692cfb
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 3765d0d..1b9246e 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -219,6 +219,9 @@
}
mFlinger->markLayerPendingRemovalLocked(this);
+ if (hasInput()) {
+ mFlinger->dirtyInput();
+ }
}
void Layer::onRemovedFromCurrentState() {