summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author Daniel Norman <danielnorman@google.com> 2025-01-29 14:01:48 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-29 14:01:48 -0800
commitf491aa50ada8b44a9d0f54f0e5dd85207f4b0b5d (patch)
tree0950cf863c533eb25519c5705d65aa9afc2cc8da /include
parent32cf36e168f0a990c2c5d881729258393c912bc2 (diff)
parent8a1be9125beb41e22d59e55ce64627be1a2c2880 (diff)
Merge "Tracks whether an injected MotionEvent came from an accessibility tool." into main
Diffstat (limited to 'include')
-rw-r--r--include/input/Input.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/input/Input.h b/include/input/Input.h
index 2cabd56204..e84023e5e5 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -92,11 +92,23 @@ enum {
static_cast<int32_t>(android::os::MotionEventFlag::NO_FOCUS_CHANGE),
/**
- * This event was generated or modified by accessibility service.
+ * This event was injected from some AccessibilityService, which may be either an
+ * Accessibility Tool OR a service using that API for purposes other than assisting users
+ * with disabilities.
*/
AMOTION_EVENT_FLAG_IS_ACCESSIBILITY_EVENT =
static_cast<int32_t>(android::os::MotionEventFlag::IS_ACCESSIBILITY_EVENT),
+ /**
+ * This event was injected from an AccessibilityService with the
+ * AccessibilityServiceInfo#isAccessibilityTool property set to true. These services (known as
+ * "Accessibility Tools") are used to assist users with disabilities, so events from these
+ * services should be able to reach all Views including Views which set
+ * View#isAccessibilityDataSensitive to true.
+ */
+ AMOTION_EVENT_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL =
+ static_cast<int32_t>(android::os::MotionEventFlag::INJECTED_FROM_ACCESSIBILITY_TOOL),
+
AMOTION_EVENT_FLAG_TARGET_ACCESSIBILITY_FOCUS =
static_cast<int32_t>(android::os::MotionEventFlag::TARGET_ACCESSIBILITY_FOCUS),
@@ -347,6 +359,9 @@ enum {
POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY =
android::os::IInputConstants::POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY,
+ POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL =
+ android::os::IInputConstants::POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL,
+
/* These flags are set by the input dispatcher. */
// Indicates that the input event was injected.