summaryrefslogtreecommitdiff
path: root/core/java/android/view/VerifiedKeyEvent.java
Commit message (Collapse)AuthorAgeFilesLines
* Add FLAG_IS_ACCESSIBILITY_EVENT to KeyEvent and MotionEventSiarhei Vishniakou2021-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This flag indicates that the event was modified or generated by an accessibility service. It allows apps to tell apart real hardware events, events that are injected (device id == -1), and events coming from accessibility (has flag is_accessibility_event). Events that have gone into accessibility, and got reinjected without being modified will not be distinguishable from real hardware events. In the next release, we will make FLAG_IS_ACCESSIBILITY_EVENT public api. Until then, applications will have to hard-code its value (0x800) to use it. The value is the same for both KeyEvents and MotionEvents for convenience. Bug: 175069843 Bug: 152399927 Test: atest VerifiedMotionEventTest VerifiedKeyEventTest Test: atest AccessibilityGestureDispatchTest Test: atest inputflinger_tests libinput_tests GamepadWithAccessibilityTest Change-Id: I38ac2ab8e19e32cad927742c623f14f43ea0c588
* Disregard annotation params for stale dataclass detectionEugene Susla2020-11-041-24/+10
| | | | | | | | | | | | Annotation processor seens annotation args with constants already inlined, making it challenging to compare to the souce-generated metadata that contains initial expressions. For now just ignoring args for all non-DataClass annotations to prevent false positives Test: . frameworks/base/tests/Codegen/runTest.sh Exempt-From-Owner-Approval: changing metadata on multiple files Change-Id: I640816ae0f20f36b1b828bc2161f53788c4a4dae
* New VerifiedInputEvent apiSiarhei Vishniakou2020-02-101-0/+414
The Verified{Input/Key/Motion}Event api are the same as {Input/Key/Motion}Event api. The VerifiedMotion class is the same as the MotionEvent class, but contains less information. It only contains the information that the system is able to verify. Same applies to VerifiedKeyEvent. The class VerifiedInputEvent contains common information applicable to both Key and Motion. Test: atest VerifiedKeyEventTest VerifiedMotionEventTest Bug: 134977432 Change-Id: I4770104eb4c025263da7efeea9c7a658dff74ac9