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
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
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
Also applies formatter.
Bug: 116874058
Test: Compile and verify apps can receive the accuracy
field
Change-Id: I2535a5a9315ac3d343dcdf6010d3ae74288dfcd4
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
Implements the activate and batch functions for the default Sensors
2.0 implementation.
Bug: 111070257
Test: Builds
Change-Id: I5987ab722cdd97c7cd7ff466d6d989794171b851
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
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
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
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
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
Also applies formatter.
Bug: 116874058
Test: Compile and verify apps can receive the accuracy
field
Change-Id: I2535a5a9315ac3d343dcdf6010d3ae74288dfcd4
Extracts SensorsTestSharedMemory so that it can be used by other
versions of the sensors tests.
Bug: 111070257
Test: Build
Change-Id: I03df7462302d4ab0ea647e0d7688a46bf0e06dc1
Move SensorEventsChecker and derived classes into their own file.
Bug: 111070257
Test: Builds and passes VtsHalSensorsV1_0Target tests
Change-Id: I1d41c6edd71e6970ee0599ae21667c88dd5f1c4e
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
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
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
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
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
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
Replaces poll with the new initializeMessageQueues call in
ISensors::2.0.
Bug: 111070257
Test: Build succeeds
Change-Id: I99f951fe5f1d93d267bee6734534993b1088baeb
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
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)
Removing whenever I see these in code reviews.
Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
Removing whenever I see these in code reviews.
Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
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
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
rlimit rtprio is more specific and thus preferred.
Test: HubConnection thread get rtprio in sailfish
Bug: 37291237
Change-Id: I3c7a06cb2964dc3ccb4c3f6fcb4eb33561296af1
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
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
This CL avoids passing nullptr to underlying HAL and cause
SEGFAULT.
Bug: 37589989
Test: compiles and VTS passing
Change-Id: Ic44409e64466e54a3a3027721897c0755ba34fc7
Merged-In: Ic44409e64466e54a3a3027721897c0755ba34fc7
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
Add owners file for default sensors HAL implementation and the
functional VTS tests.
Test: Build compiles
Change-Id: I54f28cb131f344d779ca34cdce027881bab5f59d
Merged-In: I54f28cb131f344d779ca34cdce027881bab5f59d
Bug: 63995095
Test: no more wake lock acquire failures in QCOM and nanohub sensor
hal
Change-Id: I2a5c2e29ecb66869a408f53998b6074ed07b493a
Merged-In: I2a5c2e29ecb66869a408f53998b6074ed07b493a
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
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