Makes TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY as trusted overlay
A MotionEvent dispatched within the area of trusted overlay
would not referred as an obscured event even a trusted overlay
overlaps other windows.
If a MotionEvent is referred as obscured when clicking accessibility
settings dialog, it would stop users from switching on an accessibility
settings and show a warning toast.
This change could make magnification window as trusted overlay that
users able to switch on an accessibility setting by touching inside
the area of the magnification window.
Bug: 144075853
Test: Verified an a11y settings is abled to be switched on when
the MotionEevent is dispatched within the magnification overlay.
Change-Id: I83a6ce1f6e66c55c45746e5a16d0d988d1c1ae0b
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp
index 03ca459..28da8b4 100644
--- a/libs/input/InputWindow.cpp
+++ b/libs/input/InputWindow.cpp
@@ -43,7 +43,8 @@
}
bool InputWindowInfo::isTrustedOverlay() const {
- return layoutParamsType == TYPE_INPUT_METHOD
+ return layoutParamsType == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY
+ || layoutParamsType == TYPE_INPUT_METHOD
|| layoutParamsType == TYPE_INPUT_METHOD_DIALOG
|| layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
|| layoutParamsType == TYPE_STATUS_BAR