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

Commit 97770cf3 authored by Yu Shan's avatar Yu Shan
Browse files

Fix property unavailable check logic.

Test: Presubmit
Bug: 322070490
Change-Id: Ifd97370a5dd71ace57791c0287bea0bb8c912c29
parent 6a2f3096
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -288,11 +288,8 @@ bool VtsHalAutomotiveVehicleTargetTest::isResultOkayWithValue(

bool VtsHalAutomotiveVehicleTargetTest::isUnavailable(
        const VhalClientResult<std::unique_ptr<IHalPropValue>>& result) {
    if (result.ok()) {
        return false;
    }
    if (result.error().code() == ErrorCode::NOT_AVAILABLE_FROM_VHAL) {
        return true;
    if (!result.ok()) {
        return result.error().code() == ErrorCode::NOT_AVAILABLE_FROM_VHAL;
    }
    if (result.value() != nullptr &&
        result.value()->getStatus() == VehiclePropertyStatus::UNAVAILABLE) {