@@ -43,8 +43,9 @@ interface IInputConstants
4343 const int INVALID_INPUT_DEVICE_ID = - 2 ;
4444
4545 /**
46- * The input event was injected from accessibility. Used in policyFlags for input event
47- * injection.
46+ * The input event was injected from some AccessibilityService, which may be either an
47+ * Accessibility Tool OR a service using that API for purposes other than assisting users with
48+ * disabilities. Used in policyFlags for input event injection.
4849 */
4950 const int POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY = 0x20000 ;
5051
@@ -54,18 +55,33 @@ interface IInputConstants
5455 */
5556 const int POLICY_FLAG_KEY_GESTURE_TRIGGERED = 0x40000 ;
5657
58+ /**
59+ * The input event was injected from an AccessibilityService with the
60+ * AccessibilityServiceInfo#isAccessibilityTool property set to true. These services (known as
61+ * "Accessibility Tools") are used to assist users with disabilities, so events from these
62+ * services should be able to reach all Views including Views which set
63+ * View#isAccessibilityDataSensitive to true. Used in policyFlags for input event injection.
64+ */
65+ const int POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL = 0x80000 ;
66+
5767 /**
5868 * Common input event flag used for both motion and key events for a gesture or pointer being
5969 * canceled.
6070 */
6171 const int INPUT_EVENT_FLAG_CANCELED = 0x20 ;
6272
6373 /**
64- * Common input event flag used for both motion and key events, indicating that the event
65- * was generated or modified by accessibility service .
74+ * Input event flag used for both motion and key events.
75+ * See POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY for more information .
6676 */
6777 const int INPUT_EVENT_FLAG_IS_ACCESSIBILITY_EVENT = 0x800 ;
6878
79+ /**
80+ * Input event flag used for motion events.
81+ * See POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL for more information.
82+ */
83+ const int INPUT_EVENT_FLAG_INJECTED_FROM_ACCESSIBILITY_TOOL = 0x1000 ;
84+
6985 /**
7086 * Common input event flag used for both motion and key events, indicating that the system has
7187 * detected this event may be inconsistent with the current event sequence or gesture, such as
0 commit comments