Commit Graph

29 Commits

Author SHA1 Message Date
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
Nick Kralevich 0370a03b6e resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7 am: 9ec978732f
am: 1b28b05d2e

* commit '1b28b05d2edf11f49717b53cd49a9161892f0388':
  DO NOT MERGE: fix build breakage
2015-10-23 04:15:24 +00:00
Nick Kralevich 1b28b05d2e resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7
am: 9ec978732f

* commit '9ec978732f8dd82e7adef3e37097eaca3fbd65f0':
  DO NOT MERGE: fix build breakage
2015-10-23 02:02:42 +00:00
Nick Kralevich fa632f6ad7 resolve merge conflicts of 834ac204ce to klp-modular-dev.
am: 7f1ea80d65

* commit '7f1ea80d65996ab687ff56a884da915535cdc176':
  DO NOT MERGE: fix build breakage
2015-10-23 01:44:26 +00:00
Nick Kralevich 7f1ea80d65 resolve merge conflicts of 834ac204ce to klp-modular-dev.
Bug: 23905002
Change-Id: Ic7262861af91a8fff27692c0f68761cb3ab12aa3
2015-10-22 17:26:28 -07:00
Flanker a82ace99f7 add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869 am: 90dc6dc825
am: 9830f11dc6

* commit '9830f11dc6b6aa4001c79147966fdb9eaa71c2f2':
  add number constraint for samples per MotionEvent
2015-10-22 22:28:01 +00:00
Nick Kralevich 834ac204ce DO NOT MERGE: fix build breakage
fix klp-dev only build breakage.

  frameworks/native/libs/input/Input.cpp: In member function 'android::status_t android::MotionEvent::readFromParcel(android::Parcel*)':
  frameworks/native/libs/input/Input.cpp:494:47: error: 'UINT16_MAX' was not declared in this scope

Bug: 23905002
Change-Id: I4b6b864ca64d39a8873d045a61e0ddaea2ab9109
2015-10-22 07:09:23 -07:00
Flanker 9830f11dc6 add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869
am: 90dc6dc825

* commit '90dc6dc825ebd1f0f4c9474fad887cd7eac8e9bd':
  add number constraint for samples per MotionEvent
2015-10-22 02:15:13 +00:00
Flanker 9964d83869 add number constraint for samples per MotionEvent am: 5d17838ade
am: 72c8ca4a01

* commit '72c8ca4a0191827fd3265c0820b685a6cf420be1':
  add number constraint for samples per MotionEvent
2015-10-22 02:04:55 +00:00
Flanker 72c8ca4a01 add number constraint for samples per MotionEvent
am: 5d17838ade

* commit '5d17838adef13062717322e79d4db0b9bb6b2395':
  add number constraint for samples per MotionEvent
2015-10-22 02:02:46 +00:00
Flanker 5d17838ade add number constraint for samples per MotionEvent
Bug:23905002

Signed-off-by: Adam Lesinski <adamlesinski@google.com>

(cherry picked from commit 552a8a5d8d)

Change-Id: I9b7ea859889b7697bee4165a2746602212120543
2015-10-20 12:28:15 -07:00
Michael Wright 21957b9c6d Add method to set action button on MotionEvent
Change-Id: I09f00fa1c2b793a88772f67fe195860ec436179d
2015-06-17 21:06:54 +01: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
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 8f6710fdeb Bump axis limit
Change-Id: I53d18646be2b884c5022f10c7c4ea8f6cda176c8
2014-06-09 18:56:43 -07:00
Narayan Kamath db1972bd8e am 26063a91: am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit '26063a9155ddd18d858cea7fac7c1ddf71e1bcb7':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:58:40 +00:00
Narayan Kamath 26063a9155 am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit 'f1dd859baa114995bcbcfb7119e939d0b4f45ed5':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:29:00 +00:00
Fengwei Yin 83e0e425c6 x86_64: Align uint64_t/int64_t structure member to 8 bytes
To make sure the stature which pass between 32/64bit process have
same memory layout for 32/64bit.

Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Co-Authored-by: Narayan Kamath <narayan@google.com> (Unit test only.)
Change-Id: I1bc2d12cce41ec0bc484adcaf968f274bec75c12
2014-05-30 14:13:29 +01:00
Michael Wright 872db4f11e Move key attribute information out of native.
Native doesn't ever actually care about the attributes of keys, so
move all of it up into the managed layer and move all of the key
names down so they're defined once.

Change-Id: Ic8ded13ce050b2b98744735ff50d11e8d882d7d5
2014-04-22 16:55:36 -07:00
Jeff Brown db19e463fe Remove unnecessary policy flags.
Bug: 13133142
Change-Id: Ib6c63ebad25d84f78623b4a46ccf83953d235fe7
2014-04-09 17:04:44 -07:00
Michael Wright d0bd391146 Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE
Bug: 11480300
Change-Id: I5a4096970c9e588d134f05dd0eb3a9c91c836b2f
2014-03-24 17:26:52 -07:00
Michael Wright 9b04f860f2 Add MAX_CONTROLLER_LEDS constant. DO NOT MERGE
Change-Id: Ie6dbce926280c748f39e3c54d2ed4accbdcf9e59
2014-03-11 14:19:33 -07:00
Michael Wright 962a108856 Parse LED mappings in keylayout files. DO NOT MERGE
Change-Id: I2b34939cc0df256e6b872502ea93f2884b4c8334
2014-03-03 13:59:35 -08:00
Jeff Brown ed4d28dd70 Add method to apply offset to PointerCoords. (DO NOT MERGE)
Change-Id: I3dc2ba22b026e5b8e1c3d90f7366ec09a59ce6b6
2014-02-11 14:43:19 -08:00
Jeff Brown 313eff7bb7 Completely remove skia dependency from libinput.
Including the tests...

Change-Id: I6ec8f1a5ae7e7514831d7e3b430b3b37b0841b92
2013-07-15 18:49:00 -07:00
Jeff Brown 5a2f68e5a5 Fix PDK build.
Quick hack to remove Skia dependency from libinput.

Change-Id: Ibaf2e312236f5e3f7251fa903ce381456a77467c
2013-07-15 17:31:13 -07:00
Jeff Brown 5912f95d26 Move input library code from frameworks/base.
Change-Id: I4983db61b53e28479fc90d9211fafff68f7f49a6
2013-07-01 20:11:26 -07:00