Commit graph

308 commits

Author SHA1 Message Date
Brian Stack
9c1867eec8 Update member variables to use mNamingConvention
Bug: 115969174
Test: Builds
Change-Id: Id4334d9060a3110d13debcfaf1bebc9dddd321c5
2018-11-07 17:26:01 -08:00
Brian Stack
40525b145e Implement activate tests for Sensors HAL 2.0
Implements new VTS tests to verify that Sensors HAL 2.0 activate
function behaves as expected and returns the correct values.

Bug: 115969174
Test: Tests pass against default implementation
Change-Id: I3dbc86b0c9df3958f11bae4eff925d1869319738
2018-11-07 17:26:01 -08:00
Brian Stack
0a20036927 Implement batch test for Sensors 2.0
Verify that the batch function is correctly implemented for Sensors
HAL 2.0. This test ensures that the interface is properly implemented,
not that sensors generate events at the requested rate.

Bug: 115969174
Test: Builds, new test passes against default implementation
Change-Id: I607ff18f59d1ba73aa972ed46b04332892772355
2018-11-07 13:48:20 -08:00
Brian Stack
1fdd1bb4db Implement VTS tests for Sensors 2.0 flush
Bug: 115969174
Test: Tests pass against default implementation
Change-Id: Icb8c3d7776b8460d502bfec251ded061f978bec9
2018-11-07 13:36:11 -08:00
TreeHugger Robot
a29f60d68a Merge "Only save newly received events during testing" 2018-11-06 03:54:28 +00:00
Arthur Ishiguro
e8f98ff983 Merge "Updates EventPayload documentation for (Geomag)-RV" am: 79189993ec am: d60adf2dd9
am: f81482a5f6

Change-Id: I8e3668e3da2c73b5265dfd4d8927692854f94216
2018-11-05 17:57:47 -08:00
Arthur Ishiguro
79189993ec Merge "Updates EventPayload documentation for (Geomag)-RV" 2018-11-06 01:28:23 +00:00
Arthur Ishiguro
d3881ea7fa Updates EventPayload documentation for (Geomag)-RV
The former HAL documentation incorrectly documented (Geomag)-RV
sensor data as Vec4, although an accuracy field is expected according
to the Android sensor docs. Former default HAL implementation has set
the accuracy value to zero, preventing apps from getting this value.

This change guides OEMs to use the Vec4 + accuracy when converting
(Geomag)-RV sensor events. The default HAL implementation passes
this extra data now (ag/5224072), but clients of the former
implementation will still get the data it needs if assuming
the Vec4 sensor data format.

Bug: 116874058
Test: Compile only
Change-Id: I6a5c8a48dd372c3d4682ed5329f7f87862746cb9
2018-11-05 11:01:57 -08:00
Arthur Ishiguro
fa2fcddb09 Adds conversion for quaternion data with accuracy
Also applies formatter.

Bug: 116874058
Test: Compile and verify apps can receive the accuracy
      field

Change-Id: I2535a5a9315ac3d343dcdf6010d3ae74288dfcd4
2018-11-01 17:33:22 -07:00
Brian Stack
9920e212f8 Only save newly received events during testing
All events in the temporary event buffer were being saved during
testing. This caused some events to be saved multiple times. This
patch ensures that only new events are saved.

Bug: 115969174
Test: Verified duplicate events are not received
Change-Id: Ia2c7df7273456700e0da2ddd927f7daf42e69334
2018-10-30 12:04:33 -07:00
Brian Stack
e4f74c77b1 Default flush implementation for Sensors 2.0
Bug: 111070257
Test: Builds, passes corresponding VTS tests
Change-Id: I5b46232ffb0dd2c85bccd9dad34dd04d29a5677d
2018-10-30 12:02:52 -07:00
TreeHugger Robot
4c1e30cebd Merge "Register default accelerometer sensor" 2018-10-27 02:02:19 +00:00
TreeHugger Robot
c7aa50238e Merge "Generate events for default Sensors 2.0" 2018-10-27 00:10:19 +00:00
TreeHugger Robot
cad117641a Merge "Add CallInitializeTwice Test" 2018-10-26 23:55:24 +00:00
Brian Stack
2927ab7ed7 Register default accelerometer sensor
Registers a default accelerometer with the Sensors HAL.

Bug: 111070257
Test: Builds, a_sns_test receives accel events
Change-Id: I2f016eb74b9b729854e771264f4c2f1adf025c09
2018-10-24 16:33:34 -07:00
Brian Stack
237abc6cf8 Generate events for default Sensors 2.0
Adds the ability for default Sensors 2.0 implementation to generate
sensor events.

Bug: 111070257
Test: Builds
Change-Id: I98f04dbac5370cc6fc3be43468ba43b6476b4515
2018-10-24 16:33:34 -07:00
Brian Stack
897528dd53 Implement activate and batch functions
Implements the activate and batch functions for the default Sensors
2.0 implementation.

Bug: 111070257
Test: Builds
Change-Id: I5987ab722cdd97c7cd7ff466d6d989794171b851
2018-10-24 16:33:26 -07:00
Brian Stack
9a407f23a6 Implement default functions for direct channel
Implements default functions for a Sensors 2.0 HAL that does not
support direct channel operation.

Although Sensors 2.0 supports direct channel operation, it is not a
requirement unless a device supports High Fidelity Sensors. A direct
channel implementation is vendor-specific, and therefore, the default
implementation does not provide a reference implementation.

A default implementation is able to be found in Sensors 1.0 since
direct channel operation has not changed between Sensors 1.0 and 2.0.

Bug: 111070257
Test: Builds
Change-Id: I1c4ef0cd9d4bd4b7ae3212358f9493c28c2798f4
2018-10-24 16:26:33 -07:00
Brian Stack
475d4d4d5e Default implementation for initialize()
Implements the default initialize() function for Sensors HAL 2.0

Bug: 111070257
Test: Builds
Change-Id: I1d1f0d732d931adaf12ae40167eea484887fb140
2018-10-24 16:26:27 -07:00
Brian Stack
60fcdcf635 Create Sensors HAL 2.0 Default Implementation
Auto-generated default implementation for Sensors HAL 2.0 via
hidl-gen and cleaned up formatting.

Modifies Android.bp for binderized HAL implementation which includes:
- Adding service.cpp
- Adding android.hardware.sensors@2.0-service.rc

android.hardware.sensors@2.0-service.rc was copied and updated from
the sensors@1.0 default implementation.

Bug: 111070257
Test: Builds
Change-Id: I6a939511ff6b4011cfe95bd26c3093ad18f26f5a
2018-10-24 16:15:59 -07:00
Brian Stack
1d329e633a Add CallInitializeTwice Test
Adds a test to Sensors 2.0 to ensure that if the initialize function
is called twice, then the FMQs used in the second call receive events.

Bug: 115969174
Test: New test passes (SensorsHidlTest#CallInitializeTwice)
Change-Id: I21a9307397eca1f2be93a826db89d24002e848c0
2018-10-19 15:18:28 -07:00
Brian Stack
85c8b31945 Initialize Sensors Test Environment
Properly initialize the test environment for Sensors HAL 2.0 by
constructing and reading from FMQs.

Bug: 115969174
Test: Builds, VTS tests run (some pass) against locally modified
      sensors HAL
Change-Id: Id959e50c18b643d2693c90bac15710ed6f34b1b4
2018-10-17 16:49:46 -07:00
Brian Stack
b6962f6e7d Copy Sensors VTS 1.0 into 2.0
Copy the VTS tests for Sensors 1.0 into the 2.0 directory to provide a
starting point for 2.0 tests. Updates references to 2.0 from 1.0 where
necessary.

Bug: 115969174
Test: Builds
Change-Id: Ia385552c208087175272627c65b9096cdb8f4afa
2018-10-15 15:19:03 -07:00
TreeHugger Robot
6624eeeff5 Merge "Adds conversion for quaternion data with accuracy" 2018-10-10 23:54:25 +00:00
Arthur Ishiguro
41c5b89b24 Adds conversion for quaternion data with accuracy
Also applies formatter.

Bug: 116874058
Test: Compile and verify apps can receive the accuracy
      field

Change-Id: I2535a5a9315ac3d343dcdf6010d3ae74288dfcd4
2018-10-10 15:31:59 -07:00
Brian Stack
085f505014 Extract SensorsHidlTestBase and reformat
Bug: 111070257
Test: Builds
Change-Id: I35956b9dab56e97d716aa6605dab328cdd5446d3
2018-10-09 11:44:10 -07:00
Brian Stack
0c102a998f Refactor SensorsTestSharedMemory
Extracts SensorsTestSharedMemory so that it can be used by other
versions of the sensors tests.

Bug: 111070257
Test: Build
Change-Id: I03df7462302d4ab0ea647e0d7688a46bf0e06dc1
2018-10-09 11:43:24 -07:00
TreeHugger Robot
18f3701543 Merge changes I1d41c6ed,I1e04e734,I4c2a968a
* changes:
  Refactor SensorEventsChecker
  Create SensorsHidlEnvironmentBase
  Extract SensorsHidlEnvironment
2018-10-09 17:40:43 +00:00
TreeHugger Robot
d126a2fb42 Merge "Move GrallocWrapper to common directory" 2018-10-08 17:27:35 +00:00
Brian Stack
a60a6ae08f Refactor SensorEventsChecker
Move SensorEventsChecker and derived classes into their own file.

Bug: 111070257
Test: Builds and passes VtsHalSensorsV1_0Target tests
Change-Id: I1d41c6edd71e6970ee0599ae21667c88dd5f1c4e
2018-10-05 10:03:43 -07:00
Brian Stack
bc5a39bd24 Create SensorsHidlEnvironmentBase
Move common parts of SensorsHidlEnvironment into a base class so they
can be reused with other versions of sensors tests.

Bug: 111070257
Test: Builds
Change-Id: I1e04e734d00308adff35b9c16de1499573a84b03
2018-10-05 10:03:43 -07:00
Brian Stack
f0dbf813b2 Extract SensorsHidlEnvironment
Extract SensorsHidlEnvironment from VtsHalSensorsV1_0TargetTest to
allow it to be used with multiple versions of testing

Bug: 111070257
Test: Builds and passes VtsHalSensorsV1_0Target tests
Change-Id: I4c2a968a7817d2a9783c358abe4066574add4e72
2018-10-05 10:03:43 -07:00
Brian Stack
eb755f55bb Move GrallocWrapper to common directory
Moves GrallocWrapper to a common directory so that it is able to be
used by different versions of Sensors HAL VTS testing.

Bug: 111070257
Test: Builds
Change-Id: I3b110a8b45a870d762c9ed09063115afa31e6ce3
2018-10-05 10:03:32 -07:00
Brian Stack
7ff9564b20 Require consistent getSensorsList
Require that the values returned from getSensorsList do not change
before the entire system reboots. The values must be stable even
across Sensors HAL restarts. This allows for the framework to
automatically re-establish connections if the Sensors HAL crashes.

Bug: 111070257
Test: Compiles
Change-Id: I0e4b7d6ef8f89f6780c6a14d67465fd3692cd482
2018-10-02 21:29:53 +00:00
Brian Stack
78aa4fc9dd Define the ISensorsCallback
The ISensorsCallback will be used to push notifications into the
sensors framework, such as when dynamic sensors are connected.

Bug: 111070257
Test: Compiles
Change-Id: I681e6de341a80016983a3ab7fa45284ee9104918
2018-09-24 21:33:11 +00:00
Brian Stack
1f0c5ea652 Define EventQueueFlagBits
The EventQueueFlagBits is used to notify the other end of an FMQ when
an action should be taken. For instance, the read end of the queue is
able to wait on a particular mask bit to be set by the write end of
the queue before reading events.

This is necessary because the number of events to read must be
specified when calling the FMQ's read() or readBlocking() functions.
read() will fail if the specified number of events is not available.
readBlocking() will not perform a partial read, so if the number of
events to read is not known ahead of time, the function may block for
an extended period of time until enough events are queued up. By
utilizing the EventFlag, the reading of events is able to wait until
events are ready to be read, and then the availableToRead() function
provides the number of events to read when calling read() or
readBlocking().

Bug: 111070257
Test: Compiles
Change-Id: I20e9e566efc58196e27e50dae3fc13518ce605fc
2018-09-20 13:11:46 -07:00
Brian Stack
28c675fd86 Replace poll with initializeMessageQueues
Replaces poll with the new initializeMessageQueues call in
ISensors::2.0.

Bug: 111070257
Test: Build succeeds
Change-Id: I99f951fe5f1d93d267bee6734534993b1088baeb
2018-09-13 14:18:50 -07:00
Brian Stack
ee3f720115 Copy ISensors 1.0 into 2.0 directory
Copy the current version of the Sensors HAL into the 2.0 directory to
provide a starting point to replace the polling function. Update
version and headers. Import types from version 1.0 of Sensors HAL.

Bug: 111070257
Test: Build succeeds
Change-Id: Ibd00d83016dedc06e583579a0d76c7baa8fbcd05
2018-09-13 11:02:27 -07:00
Brian Duddie
70c148b739 Update sensors OWNERS files
Reflect changes in team membership.

Fixes: 74439746
Test: n/a
Change-Id: I936b9dd9229024989bc6100a4fe396e822d53369
2018-08-09 19:56:18 +00:00
Peng Xu
f183230f46 Merge "Ignore meta sensor events when checking values" into oreo-vts-dev am: d09fdd6ca1 am: bfc5b817e7
am: 5b2f3f3c7c

Change-Id: Ic1d04b1a252274715b4f9a7168ffaf141e305c5b
2018-04-10 14:41:34 -07:00
Peng Xu
bfc5b817e7 Merge "Ignore meta sensor events when checking values" into oreo-vts-dev
am: d09fdd6ca1

Change-Id: I4623dce53e1cc5102d943c21944820c108466157
2018-04-10 14:21:57 -07:00
Peng Xu
23c91a2b54 Ignore meta sensor events when checking values
Bug: 68729931
Test: verified by vendor, see b/68729931#comment5
Change-Id: I0f729c33409e409f0a64d9d4f609215cffde71f5
2018-03-21 17:58:41 -07:00
Zhuoyao Zhang
b6371e782d Merge "Convert sensors HAL test to use VtsHalHidlTargetTestEnvBase" am: edf1e2f589 am: a4b6a6da27
am: 2ec4182501

Change-Id: I339d8312c2321a56e263d8b9a6836639762c58ad
2018-01-24 23:00:08 +00:00
Zhuoyao Zhang
733ee1654e Convert sensors HAL test to use VtsHalHidlTargetTestEnvBase
Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalSensorsV1_0Target

Change-Id: I1f7e3a8adf58bbeeb0928185a61f16610dd76223
2018-01-24 09:35:55 -08:00
Peng Xu
c9c4ba222b 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.

Merged-In: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
Change-Id: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
(cherry picked from commit 31e5bf8d93)
2018-01-23 22:21:04 +00:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Steven Moreland
d28c1bdf62 Merge "Automatic mk -> bp." am: e5fd969f19 am: 72c720a4e3
am: 26013bf6ac

Change-Id: Id936fb4806d122045c771c951220361efeef10c6
2017-11-07 21:24:49 +00:00
Steven Moreland
26013bf6ac Merge "Automatic mk -> bp." am: e5fd969f19
am: 72c720a4e3

Change-Id: Icfc8b46117e94461906806023852836a0ace3a55
2017-11-07 21:21:40 +00:00
Steven Moreland
90e3a50f03 Automatic mk -> bp.
Automatic mk -> bp conversion for all modules here
which can be converted and built automatically.

Test: Soong resolves all dependencies
Bug: 37512442
Change-Id: Ib789212cb88d55731397c600d132e7c672c0d8be
2017-11-03 16:30:28 +00:00
Peng Xu
25e47b1747 Fix flakiness of sensor VTS test cases
* Correction of testBatchingOperation wait logic.
* Enlarge buffer size for direct report testing.

Original cl links: ag/3053316 and ag/2759224

Bug: 64732324
Bug: 63529148
Bug: 67439052
Test: testBatchingOperation passes consistently
Test: direct report tests pass on 2016 pixel device

Merged-In: Id4e8075e249f3658f5683d53d6dc8403ee32bc4a
Merged-In: Ibe1d076c24dc2cfe61dfd19aa5055c9075aa9e14
Change-Id: Id4e8075e249f3658f5683d53d6dc8403ee32bc4a
2017-10-13 21:06:42 +00:00
Peng Xu
213c36d71d Enlarge buffer size for direct report testing am: 3c01fef56c
am: b0fe06a06b

Change-Id: I06edfcd55eaa52c962f5ff6bda4060d3df9c4efe
2017-10-12 17:05:02 +00:00
Peng Xu
b0fe06a06b Enlarge buffer size for direct report testing
am: 3c01fef56c

Change-Id: I9fce07b88a1ddb12a91554b823d9290c2571eaef
2017-10-12 17:04:03 +00:00
Peng Xu
3c01fef56c Enlarge buffer size for direct report testing
This change is part of "Sensor direct report test - gralloc support".

Bug: 67439052
Test: vts test no longer fail on sailfish device
Change-Id: Id67a2a181b2d8847e2b1b9dbe46f5186e97e8563
Merged-In: Ibe1d076c24dc2cfe61dfd19aa5055c9075aa9e14
2017-10-12 00:26:12 +00:00
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Peng Xu
6e05d03f9a Merge "Replace sys_nice capability with rlimit rtprio" am: b74728a92e am: 6d1326ed8a am: a959fb8a7b
am: 2739a3e614

Change-Id: Ib2120ac0b645e175dcf8a7d0926d53c5216d45af
2017-10-06 20:43:31 +00:00
Peng Xu
2739a3e614 Merge "Replace sys_nice capability with rlimit rtprio" am: b74728a92e am: 6d1326ed8a
am: a959fb8a7b

Change-Id: I1cbd518bf3179b71790ce40b2d1f2bf299cfdecf
2017-10-06 20:37:30 +00:00
Peng Xu
b74728a92e Merge "Replace sys_nice capability with rlimit rtprio" 2017-10-06 20:13:35 +00:00
Peng Xu
db1ad9a8a9 Replace sys_nice capability with rlimit rtprio
rlimit rtprio is more specific and thus preferred.

Test: HubConnection thread get rtprio in sailfish
Bug: 37291237
Change-Id: I3c7a06cb2964dc3ccb4c3f6fcb4eb33561296af1
2017-10-05 15:03:56 -07:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Peng Xu
a10ba7868a Augment HotSwitchOperation to test slow to fast case am: 44256a7fbd am: 9c0f6da04d
am: 7a93acc52d

Change-Id: I6f784ed202793f5726804ddac4d7e59156e6d739
2017-09-26 12:11:03 +00:00
Peng Xu
9c0f6da04d Augment HotSwitchOperation to test slow to fast case
am: 44256a7fbd

Change-Id: Ieef5a22c97b06735f73a3d4534ad1418491c3cbd
2017-09-25 23:03:35 +00:00
Peng Xu
a17021b069 Sensor VTS testBatchingOperation flakiness fix
am: 2aef4b48f0

Change-Id: I90a13d698c69768d8e52e3f48e18b5e29f3f080e
2017-09-25 23:01:27 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Peng Xu
7728f0ce5c 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
Merged-In: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
2017-09-19 12:26:35 -07:00
Peng Xu
5b036a21a4 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
Merged-In: I5d7e736623c892b6e6c9b8ddc5d0f53fa8aaba77
2017-09-19 12:20:45 -07:00
Peng Xu
ce6e742eb6 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
Merged-In: Ic44409e64466e54a3a3027721897c0755ba34fc7
2017-09-19 12:16:26 -07:00
Peng Xu
44256a7fbd Augment HotSwitchOperation to test slow to fast case
Originally, SamplingRateHotSwitchOperation only tests the case
in which requested sensor sampling rate goes from fast to slow.
Recent regression demonstrates that it is also worthwhile to test
transition in the other direction, i.e. from slow to fast. This
CL add the slow to fast transition test.

Bug: 65138983
Test: sailfish failed the test before being patched.
Test: sailfish passed after being patched (ag/2824590)
Change-Id: If02509c75f74145544f0a2ce5d2aaec24e7326b8
Merged-In: If02509c75f74145544f0a2ce5d2aaec24e7326b8
2017-09-19 12:12:42 -07:00
Peng Xu
2aef4b48f0 Sensor VTS testBatchingOperation flakiness fix
This CL is cherry-picked from internal branch oc-dev.

Bug: 64732324
Bug: 63529148
Test: testBatchingOperation passes consistently
Merged-In: Id4e8075e249f3658f5683d53d6dc8403ee32bc4a
Change-Id: Id4e8075e249f3658f5683d53d6dc8403ee32bc4a
2017-09-19 12:08:48 -07:00
Peng Xu
c1aa066b96 Merge "Add capability for sensor hal to use wakelock" am: 2adf343f57 am: b3698f066c am: 6d7dfdbe63
am: 2183769559

Change-Id: Ib0c2b8f3cb6bbc7d43625ba188760a1d9fe39e42
2017-09-18 18:59:34 +00:00
Peng Xu
2183769559 Merge "Add capability for sensor hal to use wakelock" am: 2adf343f57 am: b3698f066c
am: 6d7dfdbe63

Change-Id: I41b55798061e97756b760fed99f4a5dfeb112173
2017-09-18 18:31:31 +00:00
Peng Xu
6d7dfdbe63 Merge "Add capability for sensor hal to use wakelock" am: 2adf343f57
am: b3698f066c

Change-Id: I1d6efc60465540add24fe8808a779a77d665e7af
2017-09-18 18:19:41 +00:00
Peng Xu
b3698f066c Merge "Add capability for sensor hal to use wakelock"
am: 2adf343f57

Change-Id: I67c4c90fcba7d2f6a4ee5ea293aabc19b696e484
2017-09-18 18:18:10 +00:00
Peng Xu
2adf343f57 Merge "Add capability for sensor hal to use wakelock" 2017-09-18 18:11:58 +00:00
Peng Xu
3332fc44de Merge "Add OWNERS file for sensors" am: 9887905762 am: 9717286cde
am: 667a77715c

Change-Id: I5cabd65e8fda9e217526e98f5a0c0900dc00838d
2017-09-15 18:14:15 +00:00
Peng Xu
667a77715c Merge "Add OWNERS file for sensors" am: 9887905762
am: 9717286cde

Change-Id: I9e4538ef2ea5ce827cc9160e86b374af904ef1d2
2017-09-15 18:10:14 +00:00
Peng Xu
9717286cde Merge "Add OWNERS file for sensors"
am: 9887905762

Change-Id: I487595f1b9eade05bc8bbcb2591db2f1d2d4c0a6
2017-09-15 18:08:13 +00:00
Peng Xu
9887905762 Merge "Add OWNERS file for sensors" 2017-09-15 18:04:34 +00:00
Ashutosh Joshi
45f8871796 Add OWNERS file for sensors
Add owners file for default sensors HAL implementation and the
functional VTS tests.

Test: Build compiles
Change-Id: I54f28cb131f344d779ca34cdce027881bab5f59d
Merged-In: I54f28cb131f344d779ca34cdce027881bab5f59d
2017-09-15 18:04:12 +00:00
Peng Xu
f923c8230a Add capability for sensor hal to use wakelock
Bug: 63995095
Test: no more wake lock acquire failures in QCOM and nanohub sensor
      hal
Change-Id: I2a5c2e29ecb66869a408f53998b6074ed07b493a
Merged-In: I2a5c2e29ecb66869a408f53998b6074ed07b493a
2017-09-14 23:15:34 +00:00
Peng Xu
f2279b67f3 Add capability for sensor hal to use wakelock
Bug: 63995095
Test: no more wake lock acquire failures in QCOM and nanohub sensor
      hal
Change-Id: I2a5c2e29ecb66869a408f53998b6074ed07b493a
2017-09-14 20:58:45 +00:00
Peng Xu
26db75df1b Merge "Sensor direct report test - gralloc support" am: b7841f02e2 am: 4ff424ce6c
am: 4fb2a83d2c

Change-Id: I1d00e2b7df13c71dfec62d420b0ceed3195ff774
2017-09-12 22:22:20 +00:00
Peng Xu
4fb2a83d2c Merge "Sensor direct report test - gralloc support" am: b7841f02e2
am: 4ff424ce6c

Change-Id: If9a7d6b4f11d0ccefde26246747e40192db908bc
2017-09-12 20:19:50 +00:00
Peng Xu
4ff424ce6c Merge "Sensor direct report test - gralloc support"
am: b7841f02e2

Change-Id: I815c61af5b807fd9a8ebd9d7ccf2842a60f1a1f6
2017-09-12 20:09:59 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Peng Xu
c1fcb010d7 Sensor direct report test - gralloc support
Bug: 37794556
Test: sensor vts passes on 2016 and 2017 devices
Change-Id: Ibe1d076c24dc2cfe61dfd19aa5055c9075aa9e14
Merged-In: Ibe1d076c24dc2cfe61dfd19aa5055c9075aa9e14
2017-09-06 21:38:37 +00:00
TreeHugger Robot
dfbd66358a Merge "Augment HotSwitchOperation to test slow to fast case" 2017-09-02 00:38:58 +00:00
Peng Xu
9444475f5f Augment HotSwitchOperation to test slow to fast case
Originally, SamplingRateHotSwitchOperation only tests the case
in which requested sensor sampling rate goes from fast to slow.
Recent regression demonstrates that it is also worthwhile to test
transition in the other direction, i.e. from slow to fast. This
CL add the slow to fast transition test.

Bug: 65138983
Test: sailfish failed the test before being patched.
Test: sailfish passed after being patched (ag/2824590)
Change-Id: If02509c75f74145544f0a2ce5d2aaec24e7326b8
2017-09-01 18:57:05 +00:00