Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9c4ba22 authored by Peng Xu's avatar Peng Xu Committed by Keun Soo Yim
Browse files

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 31e5bf8d)
parent a0b9b396
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1236,6 +1236,11 @@ void SensorsHidlTest::testDirectReportOperation(

  SensorInfo sensor = defaultSensorByType(type);

  if (!isValidType(sensor.type)) {
    // no default sensor of this type
    return;
  }

  if (!isDirectReportRateSupported(sensor, rate)) {
    return;
  }