Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 240b8119 authored by Sean McCreary's avatar Sean McCreary Committed by Jan Altensen
Browse files

Use the original device ID when the injected event is unchanged

* This is a partial revert of 0d8ed6e8
  a.k.a. Change-Id I9a61a99cf5f8ca1a27e4526dd6feedf2c1beec0f
  which forced all injected events to appear to be from virtual keyboard
  ID.

* Fixes some cases described in
  https://issuetracker.google.com/issues/163120692
  There may be accessibility apps that modify events in such a way that
  they do not appear equivalent to the original event and therefore
  continue to have their originated device ID being overridden to the
  virtual keyboard ID.  Fixing this fully needs API enhancements between
  system server and accessibility filters to allow conveying the changes
  the filter wishes to make.

* Add native MotionEvent::equals helper that's used by fw/b
  InputManagerService to determine whether or not an input filter
  modified a MotionEvent.  All fields except mDownTime are checked
  for precise equality.  There are two issues with mDowntime:
  - native uses ns, system service uses ms so there is a loss of
    precision during inputflinger -> system server -> inputflinger
    round trip.
  - the magnify accessibility helper modifies this field with
    MotionEvent.setDownTime()

Change-Id: Ib980ead9005934ebab65eece1a20cba0e2866b9a
parent ed222820
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment