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

Commit b5e51092 authored by Pavel Maltsev's avatar Pavel Maltsev
Browse files

Add driving status to default vehicle HAL

Test: manually - activities are not blocking now.

Fix: b/33084442

Change-Id: I090f42b99974727900d1866bdfbee18ca05e3da2
parent 7b7a0d7e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -127,6 +127,13 @@ const VehiclePropConfig kVehicleProperties[] = {
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
    },

    {
        .prop = VehicleProperty::DRIVING_STATUS,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
    },

    {
        .prop = VehicleProperty::GEAR_SELECTION,
        .access = VehiclePropertyAccess::READ,
+3 −0
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ VehicleHal::VehiclePropValuePtr DefaultVehicleHal::get(
        case VehicleProperty::GEAR_SELECTION:
            v = pool.obtainInt32(toInt(VehicleGear::GEAR_PARK));
            break;
        case VehicleProperty::DRIVING_STATUS:
            v = pool.obtainInt32(toInt(VehicleDrivingStatus::UNRESTRICTED));
            break;
        default:
            *outStatus = StatusCode::INVALID_ARG;
    }