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

Commit f81ef54b authored by Pavel Maltsev's avatar Pavel Maltsev Committed by Android (Google) Code Review
Browse files

Merge "Add driving status to default vehicle HAL"

parents ea97e033 b5e51092
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;
    }