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

Commit 1ba0d5ee authored by Pavel Maltsev's avatar Pavel Maltsev
Browse files

Fix sensor event in vehicle HAL emulator

Test: verified events are now gets propagated to CarSensorManager
(toggle day/night mode in Emulator UI)

Change-Id: Ifc4a755c5f6d31f41ab26ebc873c66c43d9e234a
Fix: b/35926101
parent 3a3dc8fe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ void DefaultVehicleHal::doSetProperty(emulator::EmulatorMessage& rxMsg,

    val.prop = protoVal.prop();
    val.areaId = protoVal.area_id();
    val.timestamp = elapsedRealtimeNano();

    // Copy value data if it is set.  This automatically handles complex data types if needed.
    if (protoVal.has_string_value()) {
@@ -453,7 +454,7 @@ StatusCode DefaultVehicleHal::updateProperty(const VehiclePropValue& propValue)
        VehiclePropValue* internalPropValue = getVehiclePropValueLocked(propId, areaId);
        if (internalPropValue != nullptr) {
            internalPropValue->value = propValue.value;
            internalPropValue->timestamp = elapsedRealtimeNano();
            internalPropValue->timestamp = propValue.timestamp;
            status = StatusCode::OK;
        }
    }