Introduce new portal window which transports touch to another display
It enables the user to directly touch on a window of a display
embedded on another one. The embedded displays can be nested.
The monitoring channels of the embedded display can also receive touch
events.
Bug: 120675821
Test: Manual test with ActivityViewTest
Test: atest -a inputflinger_tests
Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest
Change-Id: I773c7efb1b048080020aadd45156261a10095fcb
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp
index aa1371f..5c5613d 100644
--- a/libs/input/InputWindow.cpp
+++ b/libs/input/InputWindow.cpp
@@ -95,6 +95,7 @@
output.writeInt32(ownerUid);
output.writeInt32(inputFeatures);
output.writeInt32(displayId);
+ output.writeInt32(portalToDisplayId);
applicationInfo.write(output);
output.write(touchableRegion);
@@ -136,6 +137,7 @@
ret.ownerUid = from.readInt32();
ret.inputFeatures = from.readInt32();
ret.displayId = from.readInt32();
+ ret.portalToDisplayId = from.readInt32();
ret.applicationInfo = InputApplicationInfo::read(from);
from.read(ret.touchableRegion);