InputDispatcher: Implement spy windows
We implement spy windows as outlined in go/spy-windows.
Bug: 162194035
Test: atest inputflinger_tests
Change-Id: Iea3404329184ab40492666f2a66396e9d8cb3594
diff --git a/libs/gui/WindowInfo.cpp b/libs/gui/WindowInfo.cpp
index 5f3a726..e92be01 100644
--- a/libs/gui/WindowInfo.cpp
+++ b/libs/gui/WindowInfo.cpp
@@ -43,6 +43,10 @@
return flags.test(Flag::SPLIT_TOUCH);
}
+bool WindowInfo::isSpy() const {
+ return inputFeatures.test(Feature::SPY);
+}
+
bool WindowInfo::overlaps(const WindowInfo* other) const {
return frameLeft < other->frameRight && frameRight > other->frameLeft &&
frameTop < other->frameBottom && frameBottom > other->frameTop;