Commit graph

202 commits

Author SHA1 Message Date
Peng Xu
f3d3f9d629 Sensor direct report test - gralloc support
Bug: 37794556
Test: sensor vts passes on 2016 and 2017 devices
Change-Id: Ibe1d076c24dc2cfe61dfd19aa5055c9075aa9e14
2017-08-31 22:04:56 +00:00
Tri Vo
77e261cbc9 VTS tests now static link to HAL def libs. am: b65c5ceff2
am: ba6d6e5767

Change-Id: Ia59f7cf88fdcf5f02b63029b598407abafb6d9c8
2017-08-28 19:29:38 +00:00
Tri Vo
ba6d6e5767 VTS tests now static link to HAL def libs.
am: b65c5ceff2

Change-Id: I393284c12ca5cb79926c4891ffcfd332408a5b9f
2017-08-28 19:23:36 +00:00
Peng Xu
d311bbd207 Merge "Sensor VTS testBatchingOperation flakiness fix" into oc-dev am: 751953859c am: b8197386f9 am: 089ada15f0
am: 4e1b2a74f7

Change-Id: I5057d2360895deeea84c0f0150f04a2e9ff55ad9
2017-08-25 22:53:18 +00:00
Peng Xu
d29c44a3b3 Merge "Sensor VTS testBatchingOperation flakiness fix" into oc-dev am: 751953859c
am: b8197386f9

Change-Id: Iad2c8e4004ea92d1d8c3b0483161ea0b8c8cbc11
2017-08-25 22:23:40 +00:00
Peng Xu
089ada15f0 Merge "Sensor VTS testBatchingOperation flakiness fix" into oc-dev am: 751953859c
am: b8197386f9

Change-Id: Id6470f4a31469da02a8b3d4b4b258e863a9bb234
2017-08-25 22:23:40 +00:00
Peng Xu
b8197386f9 Merge "Sensor VTS testBatchingOperation flakiness fix" into oc-dev
am: 751953859c

Change-Id: I8800d11d6b137488674f3159941135bce374d3a6
2017-08-25 22:21:41 +00:00
TreeHugger Robot
751953859c Merge "Sensor VTS testBatchingOperation flakiness fix" into oc-dev 2017-08-25 22:12:24 +00:00
Tri Vo
b65c5ceff2 VTS tests now static link to HAL def libs.
And use VtsHalTargetTestDefaults.
This is a partial cherry-pick of ag/2657080.

Bug: 64040096
Test: compiles, works fine in internal master
Merged-In: I8f6995e9536a9aefe283ee3effec9f5a7f03b620
Change-Id: I76d47d8546416b57055841851a9d343026cd3210
2017-08-25 11:48:10 -07:00
Peng Xu
f75f596289 Sensor VTS testBatchingOperation flakiness fix
Bug: 64732324
Bug: 63529148
Test: testBatchingOperation passes consistently
Change-Id: Id4e8075e249f3658f5683d53d6dc8403ee32bc4a
2017-08-18 18:12:20 -07:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Ashutosh Joshi
8416814335 Add OWNERS file for sensors
Add owners file for default sensors HAL implementation and the
functional VTS tests.

Test: Build compiles
Change-Id: I54f28cb131f344d779ca34cdce027881bab5f59d
2017-08-11 00:27:08 +00:00
Tri Vo
2883486706 Merge "VTS tests now static link to HAL def libs. #2" into oc-mr1-dev 2017-08-10 17:45:07 +00:00
Tri Vo
0c2ce357b1 VTS tests now static link to HAL def libs. #2
And use VtsHalTargetTestDefaults.

Bug: 64040096
Test: crop out all non-affected tests from vts-hal-hidl.xml and run
vts-tradefed run commandAndExit vts-hal-hidl --skip-all-system-status-check 
--skip-preconditions
2 failures, same as without this change:
GatekeeperHidlTest.DeleteAllUsersTest
GatekeeperHidlTest.DeleteUserTest

Change-Id: I8f6995e9536a9aefe283ee3effec9f5a7f03b620
2017-08-10 17:44:57 +00:00
Peng Xu
0d4252fa91 Merge "Skip direct report test if sensor is not available" into oc-dev am: 63524f9fcc
am: 7bea962c9c

Change-Id: I99d4eb05d1348e24910c5ebe2e87b6b334138b31
2017-08-09 17:15:44 +00:00
Peng Xu
7bea962c9c Merge "Skip direct report test if sensor is not available" into oc-dev
am: 63524f9fcc

Change-Id: Iffe683356ed925142ef877ecb5289463d8d4ac1e
2017-08-09 17:04:32 +00:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Peng Xu
31e5bf8d93 Skip direct report test if sensor is not available
Skip SensorsHidlTest.*AshmemDirectReportOperation* tests if sensor
is not available on device.

Bug: 64230704
Test: compiles and test pass for a pixel device with mag sensor
      masked in hal.

Change-Id: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
2017-08-03 22:23:02 +00:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Peng Xu
eb5a4b228e Merge "Relax accelerometer events norm check" into oc-dr1-dev am: f2cb94e011
am: 09ded5132e

Change-Id: I770005087c733e94e043cacf8dce6eda95b91eca
2017-07-07 00:19:41 +00:00
Peng Xu
b6eab79b76 Relax accelerometer events norm check
Current accelerometer norm check threshold is tight and cause
unnecessary test flakiness in test environment with small
inevitable vibration (e.g. from people walking by testing
lab).

This CL relax the threshold from 0.5m/s^2 to 1m/s^2.

Test: vts pass
Bug: 62811045
Change-Id: I5d7e736623c892b6e6c9b8ddc5d0f53fa8aaba77
2017-07-05 11:24:19 -07:00
Yifan Hong
f809d60858 a.h.sensors@1.0-convert export libhardware headers
Test: m libsensorndkbridge -j
Test: BOARD_VNDK_VERSION=current m libsensorndkbridge -j

Bug: 33241851
Change-Id: I23f77e36d2a5ccf5b349c7ae5430b509771f71ba
2017-06-30 17:04:04 -07:00
Peng Xu
4be0fc16c8 Zero uninitialized field in conversion and fix vts bug
am: 36665b1b3d

Change-Id: Ib9c7e171da1b1acae16cb550dc1ed7d1cc635c77
2017-06-20 00:09:11 +00:00
Peng Xu
967de22a44 Zero uninitialized field in conversion and fix vts bug
am: 36665b1b3d

Change-Id: I9c3aa0350b90f52abb12b4c88f10ab43e82ab65b
2017-06-20 00:08:44 +00:00
Peng Xu
36665b1b3d Zero uninitialized field in conversion and fix vts bug
Zero uninitialized sensor event field to zero to avoid undefined
value being passed to framework.

Correct sensor report type check bug in vts.

Bug: 37793558
Bug: 37710268
Test: sensor vts passes
Change-Id: I5042975fea8fe28ae130367ba083a4e4f4e5657e
2017-06-19 20:39:48 +00:00
Chih-Hung Hsieh
d3bc681f26 Remove unused lambda capture
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
(cherry picked from commit 7eb57b60ab)
2017-06-07 12:57:20 -07:00
Peng Xu
2d2257faae Merge "Increase poll max size, avoid performance issue when batching" into oc-dev
am: 538fa39cf8

Change-Id: I834c6e72498963bbe48299903e12f79b29a7479b
2017-05-23 20:48:21 +00:00
Peng Xu
538fa39cf8 Merge "Increase poll max size, avoid performance issue when batching" into oc-dev 2017-05-23 20:33:29 +00:00
Peng Xu
3f576cd1fd Increase poll max size, avoid performance issue when batching
Vts polls sensor events with max size of 1, which can cause
performance issue when batching. Increase it to 64 to help eliminate
potential performance issue.

Note this CL has no change in behavior of test.

Test: VTS target test pass on several devices
Bug: 62027156
Change-Id: I04a6791f407ec0a54eb6cd8df4d4ef41e8a89c12
Merged-In: I04a6791f407ec0a54eb6cd8df4d4ef41e8a89c12
(cherry picked from commit e337dfe3d2)
2017-05-23 18:32:41 +00:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Chih-Hung Hsieh
7eb57b60ab Remove unused lambda capture
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
2017-05-15 14:02:45 -07:00
Steven Moreland
d09cf863da Update makefiles for c++-sources and c++-headers. (2/2) am: bc71124120
am: a32ebce372

Change-Id: Ic1dd8f98e72656bc12a6e5224e541f75afb79daa
2017-05-11 01:38:14 +00:00
Martijn Coenen
ab97cef29e Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev am: 6c062f77c1
am: b05e4c9414

Change-Id: I9fa6d2b4283ca50506ffcc6a665e6a2e46c4c2f9
2017-05-11 01:36:26 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Martijn Coenen
b05e4c9414 Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev
am: 6c062f77c1

Change-Id: I921160390dc9f90e7872729194ed1d1240ce68b7
2017-05-11 00:47:30 +00:00
Steven Moreland
4be51a8512 Merge changes from topic 'fix-hidl-generate' into oc-dev
* changes:
  Update makefiles for c++-sources and c++-headers.
  Update makefiles for c++-sources and c++-headers. (2/2)
2017-05-10 20:02:40 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Martijn Coenen
f9b3fb49df Start processes that need real-time with CAP_SYS_NICE.
Bug: 37293077
Test: verified CAP_SYS_NICE granted in /proc/pid/status
Change-Id: If404450cbeb077d331b231bda1af2d6eae774b75
2017-05-09 09:57:00 -07:00
TreeHugger Robot
a9f7478f95 Merge "Increase poll max size, avoid performance issue when batching" 2017-05-08 19:29:35 +00:00
Peng Xu
fb6f02bd23 Only convert valid SharedMemInfo
This CL avoids passing nullptr to underlying HAL and cause
SEGFAULT.

Bug: 37589989
Test: compiles and VTS passing
Change-Id: Ic44409e64466e54a3a3027721897c0755ba34fc7
2017-05-04 17:14:42 -07:00
Peng Xu
e337dfe3d2 Increase poll max size, avoid performance issue when batching
Vts polls sensor events with max size of 1, which can cause
performance issue when batching. Increase it to 64 to help eliminate
potential performance issue.

Note this CL has no change in behavior of test.

Test: VTS target test pass on several devices
Change-Id: I04a6791f407ec0a54eb6cd8df4d4ef41e8a89c12
2017-05-04 17:07:34 -07:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
Steven Moreland
b3a42f4ff7 Sensors: IWYU
Missing dependency that was being transitively included
from MQDescriptor.h.

Test: links
Bug: 37791060
Change-Id: I5afca1596c83801a49ee0aead85499a5241608e0
(cherry picked from commit 5b42945e6a)
2017-05-02 19:03:58 +00:00
Steven Moreland
2cd0d42d72 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 10:17:28 -07:00
Steven Moreland
5b42945e6a Sensors: IWYU
Missing dependency that was being transitively included
from MQDescriptor.h.

Test: links
Bug: 37791060
Change-Id: I5afca1596c83801a49ee0aead85499a5241608e0
2017-05-01 13:21:35 -07:00
Ashutosh Joshi
3699476c0c Move sensor hal service to class 'hal' from main.
Moving sensor hal service to hal class.

Bug: 36576271
Test: Ensure that sensors still stream.
Change-Id: I1ab984063c48401ee535b9be4df75d554d91578f
(cherry picked from commit 5d0b2e7c37)
2017-04-27 19:28:40 +00:00
Hung-ying Tyan
346599da33 Merge "Remove dependency of libhardware_legacy from HAL services" into oc-dev am: 206e38a4e8
am: 6ca5662350

Change-Id: Ie676841b6d88abfc65cb9ce64777e9daf11c855b
2017-04-18 01:19:35 +00:00
TreeHugger Robot
206e38a4e8 Merge "Remove dependency of libhardware_legacy from HAL services" into oc-dev 2017-04-18 00:26:33 +00:00
Hung-ying Tyan
4f1bbf7074 Remove dependency of libhardware_legacy from HAL services
It is not used by these services.

Bug: 33241851
Bug: 37305530
Test: built and tested on sailfish
Change-Id: I1f3f51981d7dfcf27e18d9495c747b7662867d31
2017-04-15 10:17:16 +08:00
Andreas Huber
6fa374ad30 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:23:46 -07:00
Andreas Huber
e6e54801c1 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 14:28:05 -07:00
Steven Moreland
b1d57b349b Merge "Mark as vendor_available" into oc-dev am: b5213bb7f9
am: 726213e55e

Change-Id: I225d4567fccad67a4d958060fbaf3b668c78ea87
2017-04-13 04:30:42 +00:00
TreeHugger Robot
b5213bb7f9 Merge "Mark as vendor_available" into oc-dev 2017-04-13 04:12:15 +00:00
Steven Moreland
8f7229efd7 Mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: m -j android.hardware.sensors@1.0-convert
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I0a4e8a658b5b33bd7a6668242f98a4f6cda2a94f
2017-04-13 01:37:56 +00:00
Steven Moreland
d5bf55bd5a Merge changes from topic 'hidl-vendor-available' into oc-dev am: 17f0c0dde7
am: fce6b7f0d9

Change-Id: Ic95bee140e0bbbf094e89dcc7d0d99c30966786c
2017-04-12 22:54:17 +00:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
TreeHugger Robot
04b10ccc41 Merge "Fix transitive includes." 2017-04-06 23:36:13 +00:00
Steven Moreland
4e7a307730 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 22:04:05 +00:00
Steven Moreland
3eb7df74b8 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 15:01:59 -07:00
Scott Randolph
796507cf83 Merge "Use explicit .c_str() for hidl_string" into oc-dev am: f059ae420d
am: 0070a334b0

Change-Id: I13e2e0d1ad1fd596bb5ebf6694816b41332840d8
2017-04-06 20:09:56 +00:00
Ashutosh Joshi
5d0b2e7c37 Move sensor hal service to class 'hal' from main.
Moving sensor hal service to hal class.

Bug: 36576271
Test: Ensure that sensors still stream.
Change-Id: I1ab984063c48401ee535b9be4df75d554d91578f
2017-04-05 03:31:49 -07:00
Scott Randolph
8997880087 Use explicit .c_str() for hidl_string
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class.  It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug:  36532780
Test:  Build the tree
Change-Id: I265590c7c18f425e44863df062a56b67519a932a
2017-04-04 10:53:26 -07:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Ben Fennema
1445e3633a Merge "Add missing LOW_LATENCY_OFFBODY_DETECT handling" 2017-03-28 04:29:32 +00:00
Ben Fennema
b2969d4eaa Add missing LOW_LATENCY_OFFBODY_DETECT handling
Bug: 36580454
Test: unlock watch with LLOB sensor and verify no SensorService crash
Change-Id: Ib1d086efd80e829bb844521fa39325f095b1c2c9
Signed-off-by: Ben Fennema <fennema@google.com>
2017-03-24 19:23:51 -07:00
Steven Moreland
c8e2b3f7c5 Remove viral readproc group dependency.
This has been copy pasted and isn't actually required.

Test: all hals manually tested to work on internal marlin (which have them binderized).
  Note: tv hals not tested (and they never have been). Filed b/36562029
  Note: for thermal hal, could only run VTS/check logs for errors.
Test: lshal outputs proper stuff
Fixes: 31928447
Change-Id: Id1be584dc0fa2d70e9189b922335146bf6d1382d
2017-03-23 19:49:37 +00:00
Peng Xu
591f885f4e Merge "Avoid calling non-exist set_mode hal function" 2017-03-21 17:26:27 +00:00
Peng Xu
20c7ece356 Avoid calling non-exist set_mode hal function
Add gating condition before calling the hal function pointers for
set_mode and inject_sensor_data.

Bug: 36073404
Test: compiles
Change-Id: I9c194c1a286fb64304b4329f43c3de2a3d6ae939
2017-03-17 11:05:49 -07:00
Peng Xu
1655a640fb Fix issues in sensor target test
* Less suceptible to lingering sensor activation before system
    restarts.
  * Covers injectSensorEvent and setOperationMode API
  * More test cases to test various operation conditions.

Bug: 32022776
Bug: 33618936
Test:  vts-tradefed run commandAndExit vts --module VtsHalSensorsV1_0Target

Change-Id: I75f585a373880e831f511784a856d322077c07c0
2017-03-15 18:29:00 -07:00
Ashutosh Joshi
dfeb5973ac Merge "Do not crash fatally when recovering from system server restart." 2017-03-10 23:15:37 +00:00
Yuexi Ma
ed2bb4e8f8 Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I95f10ad7a66f261c9030357edd411fe6d94150e8
2017-03-10 21:14:48 +00:00
Ashutosh Joshi
2af9dacc3a Do not crash fatally when recovering from system server restart.
Log(FATAL) is creating lots of nuisance bugs.

Test: Sensor service continues to recover from a system server
      restart and sensors are available.
      No crash log is created.
Bug: 36094522
Bug: 36115683

Change-Id: Idc2d086709dc2132c98aab806aa44728fbdaa189
2017-03-10 12:53:31 -08:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Steven Moreland
c615951317 Sensors: fix warnings in VTS test.
Test: pass
Change-Id: I514ef2750a96e356d7b100a6e132a65c2b157d84
2017-03-08 19:31:52 -08:00
Ashutosh Joshi
7b2384a585 Merge "Prevent framework from stucking at communicating with HIDL HAL" 2017-03-03 00:18:25 +00:00
Peng Xu
ab7884fcbd Prevent framework from stucking at communicating with HIDL HAL
Sensor hidl service has two threads quota. One is used for sending
commands down to hardware, and the other for retrieving sensor events
from hardware. The second is usually blocked on poll().

When system server quits abnormaly, the poll thread may still be
blocked in HAL implementation and holding that thread. There won't be
enough available threads for framework sensor service to function
correctly when system service restarts, resulting in a deadlock at
enableSensor() or getService() until the hidl service is restarted.

This fix detects a second connection from framework sensor service
and kills the hidl service in case that happens. The system will restart
the hidl service with clean state and return system to normal operation.

Bug: 35727090
Bug: 35843387
Bug: 35702298
Bug: 35919167
Bug: 35848670
Bug: 35903635

Test: Restart device works in normal case.
      Restart also works with the following scenario (reproducing error)
      "adb root && adb shell dumpsys sensorservice restrict random &&
       adb shell stop && adb shell start"

Change-Id: Ibffa87d93b2d24af2803be9281e7141d0a221e3e
2017-03-02 16:14:57 -08:00
Yifan Hong
3268291060 Merge "Revert "Revert "Revert "Protect against null strings in hal wrapper implementation."""" 2017-03-02 02:21:56 +00:00
Yuexi Ma
50d7e27b3c change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
2017-02-28 22:27:28 +00:00
Steven Moreland
5f81564de2 Revert "Revert "Revert "Protect against null strings in hal wrapper implementation."""
This reverts commit 8dbdf39b9a.

Bug: 35421240

Change-Id: I4dc6934d79b1822d500cffaf91f9812387413707
2017-02-28 18:33:48 +00:00
Steven Moreland
06635d1537 Merge "Revert "Revert "Protect against null strings in hal wrapper implementation.""" 2017-02-28 17:54:54 +00:00
Steven Moreland
8dbdf39b9a Revert "Revert "Protect against null strings in hal wrapper implementation.""
This reverts commit 4cc22a0bc8.

Reason for revert: Accidental +2, still waiting on: aosp 345923

Change-Id: I57e062b267ad54632c6d7fcd464c7a0dd773de33
2017-02-28 17:53:43 +00:00
TreeHugger Robot
f71070d4a6 Merge "Revert "Protect against null strings in hal wrapper implementation."" 2017-02-28 17:50:28 +00:00
Steven Moreland
4cc22a0bc8 Revert "Protect against null strings in hal wrapper implementation."
This reverts commit 6909bfd8ee.

Updated sense null strings are now allowed in hidl as of Iada25da5407c3eccdd28704d993ffdee8b15c5fe.

Bug: 35421240

Change-Id: Ied1745ba7169b2e4bc0a20000503e47172538f08
2017-02-28 16:57:17 +00:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Tri Vo
d94a7d2df9 Remove .vts spec files
Test: mmma hardware/interfaces
Change-Id: Idae97ce60a6368cfa685ae6b2d71b9ad163e8605
2017-02-22 12:53:52 -08:00
Zhuoyao Zhang
8422f6aa04 Update the test binary and source file name on master.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: I845da64085253cd02480465479618308045a52ed
2017-02-21 20:47:18 -08:00
Ashutosh Joshi
6909bfd8ee Protect against null strings in hal wrapper implementation.
Some HALs may provide null pointers in lieu of empty strings.
Avoid simple copies of these strings.

Bug: 35384551
Test: Verify affected device (Pixel-C) boots and auto-rotate works.
Change-Id: I37ab6e781d6dfdcc1667bcc0467690f7c2c9a557
2017-02-15 17:29:19 -08:00
Ashutosh Joshi
da270a09f4 Fix shim layer bugs for Sensors HIDL wrapper.
i) Increase the number of default threads to 2.
ii) Handle the flush complete event correctly.

Bug: 35189074
Bug: 35067266

Test: Test that sensors work in both binderized and passthrough modes.
      Ensure that camera photosphere works.

Change-Id: Ic8dadf03395b4e96092ae962cf790c93d65a1c8d
2017-02-14 11:36:40 -08:00
Zhuoyao Zhang
f008f8fdc4 Merge "Update .vts files on master based on the latest .hal file and hidl-gen" 2017-02-14 18:51:27 +00:00
Zhuoyao Zhang
3bef939f94 Update .vts files on master based on the latest .hal file and hidl-gen
Test: mma
Change-Id: I9558f300505db83e26f7c241c5cf729cd005a07b
2017-02-13 18:03:06 -08:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20:45 -08:00
Ashutosh Joshi
b072973166 Merge "Revert "Add a second thread for sensor service."" 2017-02-09 22:28:17 +00:00
Ashutosh Joshi
9441d62f2c Revert "Add a second thread for sensor service."
This reverts commit 0da2531b9f.

Change-Id: Id356ab9e0b7cf6b2275afc5855e648d322e3bf60
2017-02-09 21:43:34 +00:00
Ashutosh Joshi
71b3bafa59 Merge "Add a second thread for sensor service." 2017-02-09 04:31:38 +00:00