Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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 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 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 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 063ff53d0b Pass through availability of audio mic for input devices.
Bug: 15374820
Change-Id: Id2ca6da10165e3a887ebfbb18f663a3bf316ac79
2015-04-09 10:02:16 -07:00
Jeff Brown c9aa628d06 Cancel touch events when a low-level touch gesture occurs.
When the touch firmware or driver sends a key event that is triggered
by a low-level gesture such as a palm slap.  For this to work, the
touch device's .kl file must specify the "GESTURE" flag for each
key that is produced by a gesture.

Note that the "VIRTUAL" flag should also be specified for any such
keys for which we would like to generate haptic feedback.

eg. key 142   SLEEP   VIRTUAL GESTURE

Bug: 19264992
Change-Id: Ief494ec7e3ca66d2358a1001fdfae4f263ee1cd1
2015-02-12 11:27:24 -08:00
Michael Wright bcbf97ef8f Add logging for switch state
Bug: 17004602
Change-Id: I15c9feb7b28274183742936c20e34e7fb07e0b70
2014-08-29 14:31:32 -07:00
Michael Wright dcfcf5d0ae Add idc config option for handling key repeats
Bug: 13285870
Change-Id: I3c1cd5fb0a02dfb3432c1f04d0eef2d4970857ea
2014-03-20 01:14:06 +00:00
Jason Gerecke 71b16e81f9 Support unique calibration per orientation
Updates the format of the calibration XML to store the Surface rotation
that a specific calibration applies to. Also updates the API to require
a rotation value for get/set, and has the native framework supply this
according to the current rotation whenever it changes.

Change-Id: If38563ceba27c9d8a75f9fd7928c8d7c9d187afb
2014-03-10 16:25:49 -07:00
Jason Gerecke 489fda8d47 Add test for InputReader location calibration
This patch adds a test for the new native location calibration
code. The Java interface is not tested.

Change-Id: Id7496486f6b6e2ade12ada607b62d1594af488e8
2014-03-10 16:25:41 -07:00
Jason Gerecke 12d6baa9b8 Initialize mAffineTransform and update on modification
This patch causes the InputReader to update its mAffineTransform to reflect
the currently-set calibration on startup and whenever its value is changed
through the InputManagerService.

Change-Id: I4719122a28afa9833772040f0433780a84240b9d
2014-03-10 14:23:59 -07:00
Jason Gerecke af126fb538 Introduce mAffineCalibration for location calibration
The variable mAffineCalibration describes the affine transformation
that should be applied to the raw X/Y location in order to get it
into a calibrated state.

Change-Id: I68aa43420ffe7fcaa1ada4acd7390d37e6966a1f
2014-03-10 14:23:57 -07:00
Jeff Brown c5e2442e59 Add touch.wake IDC property to control wakeup.
Normally we do not wake the device when the internal touch screen is
touched.  This behavior can now be configured by setting a property
in the input device configuration file.  Add the following line to
the IDC file to enable an initial touch to wake the device from sleep.

  touch.wake = 1

Change-Id: Ifd6d4f51afacd30d85f475725a66e6fcccde9cbb
2014-02-26 18:49:36 -08:00
Michael Wright d02c5b6aac Move inputservice over to frameworks/native
Add all of the underlying input system pieces, minux PointerController and
SpriteController, to inputflinger. This is in preparation for moving input to
its own process and the addition of the input HAL.

Try 2.

Change-Id: I5f571fe86eb570885ae994e1f0552fb558930346
2014-02-11 10:47:14 -08:00
Michael Wright 1b1fe314c4 Revert "Move inputservice over to frameworks/native"
This reverts commit 2dceb67f1f.
2014-02-10 15:08:18 -08:00
Michael Wright 2dceb67f1f Move inputservice over to frameworks/native
Add all of the underlying input system pieces, minux PointerController and
SpriteController, to inputflinger. This is in preparation for moving input to
its own process and the addition of the input HAL.

Change-Id: I1419a740b38756bd0d54fef5f5ca337e6815b1b0
2014-02-10 14:12:49 -08:00