commit | c9c4ba222b68cc616444f39fdeada4877a4b8b9e | [log] [tgz] |
---|---|---|
author | Peng Xu <pengxu@google.com> | Thu Aug 03 14:53:35 2017 -0700 |
committer | Keun Soo Yim <yim@google.com> | Tue Jan 23 22:21:04 2018 +0000 |
tree | 82eba4dfcb72288d87868cb68426774f10fdc1cf | |
parent | a0b9b396476257595f60ea631dd5ccd13a1ee00d [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. Merged-In: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6 Change-Id: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6 (cherry picked from commit 31e5bf8d93178be8020cf8e6739cdd3d833460b2)
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp index 51d7645..e4736bc 100644 --- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp +++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -1236,6 +1236,11 @@ SensorInfo sensor = defaultSensorByType(type); + if (!isValidType(sensor.type)) { + // no default sensor of this type + return; + } + if (!isDirectReportRateSupported(sensor, rate)) { return; }