mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
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
This commit is contained in:
@@ -1294,6 +1294,11 @@ void SensorsHidlTest::testDirectReportOperation(
|
||||
|
||||
SensorInfo sensor = defaultSensorByType(type);
|
||||
|
||||
if (!isValidType(sensor.type)) {
|
||||
// no default sensor of this type
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isDirectReportRateSupported(sensor, rate)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user