Commit Graph

1699 Commits

Author SHA1 Message Date
Aravind Akella
a4864d61dc am 4904821b: Merge "Rename wakelock held internally by SensorService." into mnc-dev
* commit '4904821b212a3ee91f22a51295f86f6339cbcc8d':
  Rename wakelock held internally by SensorService.
2015-07-13 23:02:20 +00:00
Aravind Akella
8ef3c89eb2 Rename wakelock held internally by SensorService.
Bug: 22076400
Change-Id: I62129549b0681f200f40da01f53140245309ed88
2015-07-10 11:45:32 -07:00
Michael Wright
f37143d8a5 Merge "Cancel touches as well as pointer gestures." into mnc-dev 2015-07-09 21:56:21 +00:00
Michael Wright
fbbaf2efbb Cancel touches as well as pointer gestures.
Bug: 19264992
Change-Id: Idbe964a1a35c190a32f845e2a19542d54652d011
2015-07-09 12:43:21 -07:00
Dan Stoza
0eb2d39866 SF: Ignore PTS more than one second in the future
Some of this logic already existed, but when we optimized
SurfaceFlinger to avoid unnecessary wake-ups, we didn't carry the logic
over into the new readiness test. shouldPresentNow now returns true if
the timestamp is more than a second in the future (since it's likely a
bogus timestamp and should be ignored).

Bug: 21932760
Change-Id: Ib50970a4eb621588c0b60766c8d8d1a8bddf853b
2015-07-06 13:15:25 -07:00
Aravind Akella
841a5926fc Enable sensor data injection mode through adb.
Change-Id: I415cf8ff0871fa74babaf9b879c68f210298b472
2015-06-30 14:59:58 -07:00
Dan Stoza
49b2e13629 am 6a25a287: am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '6a25a2872852f23058268adcec61600460fcdfb6':
  sf: Initialize EventThread before creating HWC
2015-06-30 17:49:47 +00:00
Dan Stoza
6a25a28728 am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '806334aacd089d1c419ed77021a2b1bb4f7644ef':
  sf: Initialize EventThread before creating HWC
2015-06-30 17:38:41 +00: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
Dan Stoza
c08e7cb7b1 am 488986f4: am f413de05: Merge "libgui: Fix handling of rotated surface damage" into mnc-dev
* commit '488986f4ad7a92b04fdfd761ae07785019d2a9d3':
  libgui: Fix handling of rotated surface damage
2015-06-26 20:15:24 +00:00
Dan Stoza
488986f4ad am f413de05: Merge "libgui: Fix handling of rotated surface damage" into mnc-dev
* commit 'f413de05cfb9a1b84b73c8e6c306d4142130c5f7':
  libgui: Fix handling of rotated surface damage
2015-06-26 20:01:09 +00:00
Dan Stoza
db4850c01f libgui: Fix handling of rotated surface damage
Incoming surface damage was not aware that the EGL implementation was
rotating buffers in response to SurfaceFlinger's transform hint. This
didn't affect all cases because the effect was to apply a 90 degree
rotation instead of a 270 degree rotation. For full-screen updates,
things more or less worked, but in other cases this caused corruption.

This fixes that by correctly undoing the effect of rotated buffers on
the incoming surface damage, and then passing that damage down
untouched to HWC.

Bug: 22068334
Change-Id: I226ecfc7a91fe2e16edd2aa6d9149f0d26b529d6
2015-06-25 16:10:18 -07:00
Aravind Akella
12b26278df am e6045537: am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit 'e6045537bbce4c4f98e6a1149187bbcdaff57bcd':
  Fix crash in SensorService. Ignore devices with no sensors.
2015-06-24 16:08:13 +00:00
Aravind Akella
e6045537bb am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit '7a1b5d5dec10f05ec29e7251ada440b47a34c6aa':
  Fix crash in SensorService. Ignore devices with no sensors.
2015-06-24 15:56:29 +00:00
Aravind Akella
7a1b5d5dec Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev 2015-06-24 15:34:59 +00:00
Aravind Akella
ee155cadb2 Fix crash in SensorService. Ignore devices with no sensors.
Change-Id: I1491740baa6348f97c336b6883b11ad2ab93cf73
2015-06-24 08:32:56 -07:00
Dan Stoza
e2bfdfafae am c8c0992a: am 0638a4fa: Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev
* commit 'c8c0992ace7733c983e87e8e7154d844a54e5741':
  libgui/SF: Propagate SECURE Layer flag changes
2015-06-23 18:13:16 +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
Dan Stoza
c8c0992ace am 0638a4fa: Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev
* commit '0638a4fac7250e260c0102c770090cb7eefca936':
  libgui/SF: Propagate SECURE Layer flag changes
2015-06-23 18:07:31 +00:00
Michael Wright
7d3ad69530 Merge commit '71997c1a' into manualmerge
Change-Id: Ia68fbd20ce66571dfd33764e52c3a00e2285e648
2015-06-23 19:04:31 +01:00
Dan Stoza
0638a4fac7 Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev 2015-06-23 15:44:10 +00:00
Michael Wright
71997c1a92 Merge "Add new AINPUT_SOURCE_BLUETOOTH_STYLUS" into mnc-dev 2015-06-23 12:49:30 +00:00
Aravind Akella
645832b969 am 357e7d7d: am 94188464: Merge "More information in sensor bugreports." into mnc-dev
* commit '357e7d7dcdd579d979054daf0a28b0a348d7ee7a':
  More information in sensor bugreports.
2015-06-22 18:53:32 +00:00
Aravind Akella
357e7d7dcd am 94188464: Merge "More information in sensor bugreports." into mnc-dev
* commit '9418846431f494b53a5e9c617aed27693079c163':
  More information in sensor bugreports.
2015-06-22 18:40:18 +00:00
Dan Stoza
2311608667 libgui/SF: Propagate SECURE Layer flag changes
This allows changes to the SECURE flag to propagate down to
Layers in SurfaceFlinger so that WindowManager can change it on the fly
in response to device policy updates.

Bug: 20934462
Change-Id: I558f6d22c6273be373f1f480365e42536af18a33
2015-06-18 15:11:20 -07:00
Aravind Akella
18d6d51a00 More information in sensor bugreports.
i) Log last 20 activations/deactivations of sensors.
ii) Increase logging upto 50 events for accelerometer, step_counter and significant motion.

Change-Id: I3966ed0abda8b705f3d16e94a9370fa1b97baa57
2015-06-18 14:24:05 -07:00
Saurabh Shah
f948105810 sf: Initialize EventThread before creating HWC
Once HWC is created, it could use any of the provided hooks, which
could lead to a crash if the EventThread (handler) isn't initialized
prior to creating HWC.

Change-Id: I5ea35fe9bcb150fb74aae1295b798bd787ad6cee
2015-06-17 11:08:29 -07:00
Manoj Kumar AVM
f1bc814276 am 407f48c8: am e04e4edc: sf: Fix incorrect state reporting in dumpsys
* commit '407f48c825351e7b5cbf455a85aff2154c696fdd':
  sf: Fix incorrect state reporting in dumpsys
2015-06-12 17:44:06 +00:00
Manoj Kumar AVM
407f48c825 am e04e4edc: sf: Fix incorrect state reporting in dumpsys
* commit 'e04e4edcd1a852058775caa34cf73e2c20dc1066':
  sf: Fix incorrect state reporting in dumpsys
2015-06-12 17:31:23 +00:00
Manoj Kumar AVM
e04e4edcd1 sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
(cherry picked from commit e54506b81a)
2015-06-12 09:48:07 -07: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
Manoj Kumar AVM
e54506b81a sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
2015-06-11 18:21:18 -04:00
Tatenda Chipeperekwa
40da48bfdf sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: Ib32a7dc8378d3438df0dba1ecd608bbcfc837717
2015-06-11 12:28:41 -07:00
Tatenda Chipeperekwa
0abd853a68 am c1d4662f: am 23e16bb5: sf: Add a NULL check in getDisplayConfigs
* commit 'c1d4662f0e596021e0d8360cd1c5d213c3c8c4ba':
  sf: Add a NULL check in getDisplayConfigs
2015-06-11 19:09:30 +00:00
Tatenda Chipeperekwa
c1d4662f0e am 23e16bb5: sf: Add a NULL check in getDisplayConfigs
* commit '23e16bb5dae277cd20a739ca56553ae931c43ccf':
  sf: Add a NULL check in getDisplayConfigs
2015-06-11 18:57:28 +00:00
Tatenda Chipeperekwa
23e16bb5da sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: I1a12f43b7c375b9c01998dadd5b658275c733fb2
(cherry picked from commit ac71c26e9180d9d181be5ec9e45da72d39144a8b)
2015-06-11 10:40:21 -07:00
Aravind Akella
cd2e238ead am ce5af4b2: am 52720f45: Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev
* commit 'ce5af4b234ed6f5d6c39d47426d4e961bf3c2858':
  Use LOCATION_HARDWARE permission for data injection.
2015-06-11 02:35:26 +00:00
Aravind Akella
ce5af4b234 am 52720f45: Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev
* commit '52720f45098e9aed57c906e64a13e4a4a2173ce8':
  Use LOCATION_HARDWARE permission for data injection.
2015-06-11 02:08:19 +00:00
Aravind Akella
52720f4509 Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev 2015-06-10 22:56:27 +00:00
Aravind Akella
a8814ce478 Use LOCATION_HARDWARE permission for data injection.
Change-Id: Ie81cb0d5f537d5431f2127891cca1d39c969ee7b
2015-06-10 15:15:57 -07:00
Dan Stoza
d1adebc2da am 355950c1: am d177e044: Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev
* commit '355950c1fc19c35c75203ea761882168f0980181':
  SF: Swap w/h when capturing rotated screenshots
2015-06-10 18:08:31 +00:00
Dan Stoza
355950c1fc am d177e044: Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev
* commit 'd177e044d129bbecc3900a7fcd442b354de768df':
  SF: Swap w/h when capturing rotated screenshots
2015-06-10 17:52:50 +00: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
Dan Stoza
65dc7eeff0 SF: Swap w/h when capturing rotated screenshots
Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
(cherry picked from commit 3502416204)
2015-06-10 10:33:21 -07: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
Dan Stoza
d177e044d1 Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev 2015-06-10 17:28:33 +00:00
Michael Wright
043bd36b0d Merge "Only log dropped input when disabled for the first event." into mnc-dev 2015-06-10 17:08:03 +00:00