Commit Graph

116 Commits

Author SHA1 Message Date
Siarhei Vishniakou b2cc7deac7 DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.

Bug: 31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Iebbb68231cbb76f87241201e7640a1fe3e188625
CVE-2017-0860
2017-11-10 18:08:28 +03:00
FPtje 3b418d69a3 Fixed stylus eraser being rejected by palm rejection
The stylus eraser appeared not to work, i.e. Android did not respond to
input from the eraser. It turned out that all input except stylus input
is rejected when palm rejection is activated. The problem was that the
eraser itself activates palm rejection when it hovers. The solution is
to allow the eraser during palm rejection. This solution makes sense
because the eraser input works in the exact same way as normal stylus
input.

Change-Id: I9c7451112ce7dbca14a1e1694eedca2d4ed041a1
2016-08-05 13:41:31 -05:00
Jessica Wagantall 508eb7749a Android 6.0.1 release 46
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAldVtQ8ACgkQ6K0/gZqxDnhIVgCfWRMpjlr3RQ8yoizXrd1JT2e8
 M6kAn2lFAPOBl7D6M28oTaPBQpLrZMdF
 =kdz+
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.1_r46' into HEAD

Android 6.0.1 release 46

# gpg: Signature made Mon 06 Jun 2016 10:38:23 AM PDT using DSA key ID 9AB10E78
# gpg: Can't check signature: public key not found
2016-06-07 10:10:09 -07:00
Michael Wright 03a53d1c77 Add new MotionEvent flag for partially obscured windows.
Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCURED has changed to
only be set when the point at which the window was touched is
obscured. Unfortunately, this doesn't prevent tapjacking attacks that
overlay the dialog's text, making a potentially dangerous operation
seem innocuous. To avoid this on particularly sensitive dialogs,
introduce a new flag that really does tell you when your window is
being even partially overlapped.

We aren't exposing this as API since we plan on making the original
flag more robust. This is really a workaround for system dialogs
since we generally know their layout and screen position, and that
they're unlikely to be overlapped by other applications.

Bug: 26677796
Change-Id: I9e336afe90f262ba22015876769a9c510048fd47
2016-04-21 19:11:18 -07:00
Steve Kondik 4951bcc16e Android 6.0.1 release 3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlZmBAkACgkQ6K0/gZqxDnhgbQCdFLtubCHWtlKUuIEKAVwzv2M3
 2jMAoI4UhN3nLb2Nf6BizcMSF3xo1pKO
 =NS5T
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/frameworks/native into cm-13.0

Android 6.0.1 release 3

Change-Id: I437aaf148d440a8144afe1454948980fc3b40cca
2015-12-07 17:07:16 -08:00
Ricardo Cerqueira 1cdd1b5ad2 Android 6.0.0 release 26
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlYxAgIACgkQ6K0/gZqxDnjCqACfbBT6VOiUFQvRn7w1SAa+4rjF
 1IwAn2rBUqWo0dOKVwF1DDfFmGZXc8SB
 =1BqV
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.0_r26' into HEAD

Android 6.0.0 release 26

Conflicts:
	include/android/input.h

Change-Id: Ifa374c6d3055be3b8a5d60967f8b4c0043da739b
2015-11-05 01:41:42 +00:00
Ethan Chen 846c7e9329 input: Disable debug again
Change-Id: I3adadd69b8b3a42bcb384cac7ccff98ef0ca9c65
2015-10-26 13:58:49 -07:00
Steve Kondik 6b6c0cde5b input: Add option to toggle pointer icon when using stylus(3/3)
* The visible pointer icon when hovering or drawing with the stylus is
  quite annoying when trying to actually draw with it. Turn it off by
  default and add an option to turn it on.

Forward Port from CM-11.0

Change-Id: Ie4e9e6bcc48803b195d1615d83d6e36d663cc33a
2015-10-17 14:03:23 -07:00
nadlabak 437e236427 Forward port 'Swap volume buttons' (2/3)
[mikeioannina]: Adjust for 5.0 changes

Change-Id: I5ed4ae2b7e69e2ada067ed1d3524b3d3fad30e2e
2015-10-17 13:58:48 -07:00
Christopher N. Hesse 00888b7eee inputflinger: disable touch input while using a stylus
Android 5.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Original commit by vbraun:
b9cb296130

Change-Id: I97f26369826e96c97461c8ae188f1c64dec1b4d3
2015-10-17 13:56:31 -07:00
Steve Kondik ac9d8404f1 inputflinger: Add gesture sensor support
Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2
2015-10-17 13:53:44 -07:00
Steve Kondik ccf7c200ce input: Adjust priority
* Bring into the desired group to get the best result.

Change-Id: I3bd031074cd7006994736b4c22d0294b6012f662
2015-10-17 13:51:11 -07:00
Dmitry Torokhov 0faaa0bd7a Inputflinger: hook up key event replacement processing
Add handling of "replacement" key events in InputReader and EventHub by
consulting device's character key map (if exists) for presence of
replacement key code for given get code and meta state combination,
before passing it to InputDispatcher.

This enables defining special keys, such as ESC, on keyboards lacking
enough physical keys, via combination of normal keys and modifiers, for
example AltR + 1 => ESC.

Bug: 24504154

Change-Id: I7e36104808bedcf724436c1fbb63d37c35cca8af
2015-09-29 13:27:16 -07:00
Michael Wright 8e81282601 DO NOT MERGE Cancel touches as well as pointer gestures.
Bug: 24302031
Change-Id: Idbe964a1a35c190a32f845e2a19542d54652d011
2015-09-22 22:05:53 +01:00
Michael Wright a16b98c64f DO NOT MERGE Revert "am f37143d8: Merge "Cancel touches as well as pointer gestures." into mnc-dev"
This reverts commit 9b70ab7a3cb260205e81e40ba181a86710d2eb95, reversing
changes made to 153008efb5a00ed3c18d588ce15f90d2442a9786.

Bug: 24302031

Change-Id: Ia746381b30be3b54cb646ed412b7271962c4b02a
2015-09-22 22:05:48 +01:00
Michael Wright a44766cf0e Cancel touches as well as pointer gestures.
Bug: 19264992
Change-Id: If48e0953b972c9d69f516906adf7c6faf67e3eb8
2015-07-13 09:44:02 +01:00
Michael Wright fbbaf2efbb Cancel touches as well as pointer gestures.
Bug: 19264992
Change-Id: Idbe964a1a35c190a32f845e2a19542d54652d011
2015-07-09 12:43:21 -07:00
Michael Wright 2e099b2425 am fd0fdaf7: am 3643c88f: Merge "Send cancelation events to monitors when injection fails." into mnc-dev
* commit 'fd0fdaf73b1e8fbf643152f532f500be70f11a26':
  Send cancelation events to monitors when injection fails.
2015-06-29 17:47:15 +00:00
Michael Wright fd0fdaf73b am 3643c88f: Merge "Send cancelation events to monitors when injection fails." into mnc-dev
* commit '3643c88f7b557e241d65c4857eaf49e28e7c03a2':
  Send cancelation events to monitors when injection fails.
2015-06-29 17:40:25 +00:00
Michael Wright 3643c88f7b Merge "Send cancelation events to monitors when injection fails." into mnc-dev 2015-06-29 17:10:46 +00:00
Michael Wright 39c32ecf37 am 7d3ad695: Merge commit \'71997c1a\' into manualmerge
* commit '7d3ad695304a1f24026227e630add6edd76fd0d6':
  Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
2015-06-23 18:13:15 +00:00
Michael Wright 7d3ad69530 Merge commit '71997c1a' into manualmerge
Change-Id: Ia68fbd20ce66571dfd33764e52c3a00e2285e648
2015-06-23 19:04:31 +01:00
Michael Wright 2f78b68cf1 Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
Bug: 21531826
Change-Id: I3792860ad3f6579ceb50ccaa212f8fbd471a9b6b
2015-06-12 15:25:08 +01:00
Michael Wright fa13dcf39f Send cancelation events to monitors when injection fails.
Bug: 20649729
Change-Id: I46cd14ac1f040d404c0b1581b38fa07a944e5fb9
2015-06-12 13:25:11 +01:00
Michael Wright a393c62f22 am f8b34319: am 043bd36b: Merge "Only log dropped input when disabled for the first event." into mnc-dev
* commit 'f8b34319a4c1ccce63b5a8e4732f162d228085cb':
  Only log dropped input when disabled for the first event.
2015-06-10 17:47:58 +00:00
Michael Wright f8b34319a4 am 043bd36b: Merge "Only log dropped input when disabled for the first event." into mnc-dev
* commit '043bd36b0d50efa81d010c64009317af160d5fec':
  Only log dropped input when disabled for the first event.
2015-06-10 17:32:41 +00:00
Michael Wright 3a98172289 Only log dropped input when disabled for the first event.
Bug: 19851495
Change-Id: I8cb8076723c1ca1732c3bc37f283d8eb48b7bee0
2015-06-10 15:26:13 +01:00
Tim Kilbourn c472986d4c Mock out more inputflinger host functions
Change-Id: I3de1e95930578410d8f7c1e77329c00f05b72325
2015-06-08 14:44:33 -07:00
Tim Kilbourn 3e38aad022 Basic implementation of input device properties.
The input host can load an idc file and pass the resulting property
map to a HAL module.

Change-Id: Ic8188c9eca193c78686ff67680cf37be91c47526
2015-06-01 10:54:47 -07:00
Michael Wright baaeb2b83f am 7c000280: Merge changes from topic \'button_actions\' into mnc-dev
* commit '7c000280a57f352c2485dcaea1d5bfe20f7bfe63':
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""
2015-05-14 19:29:01 +00:00
Michael Wright c01f5d2e19 am c921ce26: Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev
* commit 'c921ce268155e8e1d75bd423514bb5a3ee363440':
  Revert "Add new MotionEvent actions for button press and release."
2015-05-14 19:28:18 +00:00
Michael Wright 9897516aba am f27e6681: Merge "Add new MotionEvent actions for button press and release." into mnc-dev
* commit 'f27e6681048f3ee7a589ab824a1041667ff838e0':
  Add new MotionEvent actions for button press and release.
2015-05-14 19:28:10 +00:00
Michael Wright 7b159c9a4f Revert "Revert "Add new MotionEvent actions for button press and release.""
This reverts commit 70b41ef580.
2015-05-14 14:48:03 +01:00
Michael Wright 70b41ef580 Revert "Add new MotionEvent actions for button press and release."
This reverts commit 48a8a0e432.
2015-05-14 14:46:17 +01:00
Michael Wright 48a8a0e432 Add new MotionEvent actions for button press and release.
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
2015-05-14 13:25:41 +01:00
Michael Wright 9e40093346 am 4866f087: Merge "Use previous pressure value if the current fusion data is zero." into mnc-dev
* commit '4866f087181af02e870b2d2fc1d4be8d38c2f36e':
  Use previous pressure value if the current fusion data is zero.
2015-05-13 17:15:46 +00:00
Michael Wright eab5a1ed7c am 4eed0f8f: Merge "Synthesize events for pressure and button changes." into mnc-dev
* commit '4eed0f8f8dd3673e55a93c0b62b8b9ebefa135cf':
  Synthesize events for pressure and button changes.
2015-05-13 17:15:46 +00:00
Michael Wright 53dca3aadd Use previous pressure value if the current fusion data is zero.
Occasionally we'll receive the stylus up signal (pressure = 0) before
we receive the touch screen up signal. Rather than giving pointer a
pressure value of 0 (which is one of the signals of hovering) or
falling back to the touchscreen pressure values (which would make for
an inconsistent stream), use the previous pressure value which should
always be non-zero for a stream of fused data.

Bug: 20449776
Change-Id: I71eb97e7c4ea53e42b0eb54fc1f8ae7f89aad9d1
2015-05-12 14:17:42 +01:00
Michael Wright 43fd19fd1a Synthesize events for pressure and button changes.
Even when there isn't movement on the touchscreen we should produce
events for pressure and button state changes generated by external
stylii.

Change-Id: I9fd7ba85902d5d6bfb28d5e5ff5d8f340a94c2bf
2015-05-12 14:08:47 +01:00
Michael Wright 104e268c32 am 5da11106: am 7ecc8952: Merge "Check orientation range has been initialized first"
* commit '5da11106b3aa10d515d0f080c27f315d5830dc85':
  Check orientation range has been initialized first
2015-04-27 14:41:37 +00:00
Michael Wright e893dddb3f Merge "Default to TOOL_TYPE_STYLUS for external stylus events." 2015-04-21 21:46:32 +00:00
Michael Wright 5e17a5de88 Increase stylus data timeout.
Temporarily increase the stylus timeout while we figure out where the
delay in BT information is coming from.

Change-Id: I27ab5a4db4ad14358c6e6803961612420371fce9
2015-04-21 22:45:13 +01:00
Michael Wright 45ccacf937 Default to TOOL_TYPE_STYLUS for external stylus events.
Change-Id: Ife6a7c4802e8b1ec1ff8445e639f8a6d90a00592
2015-04-21 22:41:15 +01:00
Michael Wright e2434fecb9 Revert "Increase stylus data timeout."
This reverts commit 8b0673ce0c.
2015-04-21 22:37:02 +01:00
Michael Wright 8b0673ce0c Increase stylus data timeout.
Sometimes stylus data will be delayed by 30 - 40ms. By increasing the
timeout we pretty much always pick up stylus data and the touch
latency feels surprisingly small.

Change-Id: I39f5b9037ce0444b1e957149d3f1c3a3137804cb
2015-04-21 15:06:43 +01:00
Michael Wright 4af18b90c1 Always update external stylus state.
This prevents us from dropping any states (namely the pressure
transition from non-zero to zero) if we get the touch up before we
get the stylus data.

Change-Id: Ifc198628d35b7079dc5ec23d81f9681d122757a0
2015-04-20 22:03:54 +01:00
Michael Wright b85401d4ba Mark all InputReaderContext methods as pure virtual
Also, fix the build.

Change-Id: I45d3daa8c0710b2f9421e8ffd011d2d39c05e030
2015-04-17 18:35:15 +01:00
Michael Wright 842500e146 Fuse stylus and touch screen data.
TODO: Ensure we dispatch new pressure and button data when stylus
is stationary.

Change-Id: I10a665a9b81ff4b9acd01bf72f0fc2e0c2abc203
2015-04-17 16:37:16 +00:00
Tim Kilbourn e5364c8c02 Add method stubs for input device properties.
Change-Id: Icd785cb55ae2b225102fa249240837a91a41aae3
2015-04-16 11:12:49 -07:00
baik.han 18a81488f9 Check orientation range has been initialized first
To avoid nan or infinity when orientation value is used for
calculation without being initialized, check mOrientedRanges.haveOrientation
value before using mOrientedRanges.orientation.min or .max value.

Change-Id: I68ed9ab36819c5faa6422e9f061e1275aeed11e3
Signed-off-by: Baik Han <baik.han@lge.com>
2015-04-14 19:49:28 +09:00