diff options
author | Peng Xu | 2017-08-03 16:53:35 -0500 |
---|---|---|
committer | Peng Xu | 2017-09-19 14:26:35 -0500 |
commit | 7728f0ce5c7f7da067a446531b80d199bcd5c849 (patch) | |
tree | 8ad63364fd47dbca3c81ba5f14b3760192faf6e9 /sensors | |
parent | 5b036a21a4865d3d486e3018fa7341200438d148 (diff) | |
download | platform-hardware-interfaces-7728f0ce5c7f7da067a446531b80d199bcd5c849.tar.gz platform-hardware-interfaces-7728f0ce5c7f7da067a446531b80d199bcd5c849.tar.xz platform-hardware-interfaces-7728f0ce5c7f7da067a446531b80d199bcd5c849.zip |
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
Diffstat (limited to 'sensors')
-rw-r--r-- | sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp index b375a204..ca3d3e4f 100644 --- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp +++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp | |||
@@ -1294,6 +1294,11 @@ void SensorsHidlTest::testDirectReportOperation( | |||
1294 | 1294 | ||
1295 | SensorInfo sensor = defaultSensorByType(type); | 1295 | SensorInfo sensor = defaultSensorByType(type); |
1296 | 1296 | ||
1297 | if (!isValidType(sensor.type)) { | ||
1298 | // no default sensor of this type | ||
1299 | return; | ||
1300 | } | ||
1301 | |||
1297 | if (!isDirectReportRateSupported(sensor, rate)) { | 1302 | if (!isDirectReportRateSupported(sensor, rate)) { |
1298 | return; | 1303 | return; |
1299 | } | 1304 | } |