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

Commit 38c97d4f authored by Brian Stack's avatar Brian Stack
Browse files

Introduce ASensor_getHandle API to Sensors NDK

Adds the ASensor_getHandle API to the Sensors NDK which returns a
sensors internal sensor handle.

Bug: 122366555
Test: Builds, verified function returns correct handle
Change-Id: I1358528d2e7ee2918d5f5c2195d51adaa2cc3661
parent bc4bfd6a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -342,3 +342,8 @@ int ASensor_getHighestDirectReportRateLevel(ASensor const *sensor) {
    RETURN_IF_SENSOR_IS_NULL(ASENSOR_DIRECT_RATE_STOP);
    return static_cast<Sensor const *>(sensor)->getHighestDirectReportRateLevel();
}

int ASensor_getHandle(ASensor const* sensor) {
    RETURN_IF_SENSOR_IS_NULL(ASENSOR_INVALID);
    return static_cast<Sensor const*>(sensor)->getHandle();
}