commit | 31e5bf8d93178be8020cf8e6739cdd3d833460b2 | [log] [tgz] |
---|---|---|
author | Peng Xu <pengxu@google.com> | Thu Aug 03 14:53:35 2017 -0700 |
committer | Peng Xu <pengxu@google.com> | Thu Aug 03 22:23:02 2017 +0000 |
tree | 7151ab00b257043bc4511ad9dae2581c1bfa1d72 | |
parent | 029633dcd0cf6d95c2c7f37738392660c34dcd17 [diff] |
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
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp index 2cf4ef9..596e9c9 100644 --- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp +++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -1235,6 +1235,11 @@ SensorInfo sensor = defaultSensorByType(type); + if (!isValidType(sensor.type)) { + // no default sensor of this type + return; + } + if (!isDirectReportRateSupported(sensor, rate)) { return; }