From 56e5567aaaa5c76f10de06e68903a894ebf9ae23 Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 13 Apr 2020 18:07:54 -0700 Subject: [PATCH] Duplicate setting when generate fake data If the statusCode is Ok, we generate the fake data twice which will break the test. Bug: 143234180 Test: atest VehicleHALTest Change-Id: I7754649fb4202239f9eca63a12bc8dd5f2a3d916 --- .../vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp index 84354c15f8..e99de60ca8 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp @@ -147,9 +147,7 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) { // here, since we never send the control signal back, the value of 'updateStatus' flag // does not matter here. auto status = mVehicleClient->setProperty(propValue, updateStatus); - if (status != StatusCode::OK) { - return status; - } + return status; } else if (mHvacPowerProps.count(propValue.prop)) { auto hvacPowerOn = mPropStore->readValueOrNull( toInt(VehicleProperty::HVAC_POWER_ON),