Loading automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <deque> #include <map> #include <mutex> #include <memory> #include <android/hardware/automotive/vehicle/2.0/types.h> Loading automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleUtils.h +6 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ #include <memory> #ifdef __ANDROID__ #include <hidl/HidlSupport.h> #endif #include <android/hardware/automotive/vehicle/2.0/types.h> Loading Loading @@ -69,6 +71,8 @@ size_t getVehicleRawValueVectorSize( void copyVehicleRawValue(VehiclePropValue::RawValue* dest, const VehiclePropValue::RawValue& src); #ifdef __ANDROID__ template<typename T> void shallowCopyHidlVec(hidl_vec<T>* dest, const hidl_vec<T>& src); Loading @@ -76,6 +80,8 @@ void shallowCopyHidlStr(hidl_string* dest, const hidl_string& src); void shallowCopy(VehiclePropValue* dest, const VehiclePropValue& src); #endif // __ANDROID__ } // namespace V2_0 } // namespace vehicle } // namespace automotive Loading automotive/vehicle/2.0/default/common/src/VehicleObjectPool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ void VehiclePropValuePool::InternalPool::recycle(VehiclePropValue* o) { ALOGE("Discarding value for prop 0x%x because it contains " "data that is not consistent with this pool. " "Expected type: %d, vector size: %zu", o->prop, mPropType, mVectorSize); o->prop, toInt(mPropType), mVectorSize); delete o; } else { ObjectPool<VehiclePropValue>::recycle(o); Loading automotive/vehicle/2.0/default/common/src/VehicleUtils.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ std::unique_ptr<VehiclePropValue> createVehiclePropValue( case VehiclePropertyType::MIXED: break; // Valid, but nothing to do. default: ALOGE("createVehiclePropValue: unknown type: %d", type); ALOGE("createVehiclePropValue: unknown type: %d", toInt(type)); val.reset(nullptr); } return val; Loading @@ -78,13 +78,6 @@ size_t getVehicleRawValueVectorSize( } } template<typename T> inline void copyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { for (size_t i = 0; i < std::min(dest->size(), src.size()); i++) { (*dest)[i] = src[i]; } } void copyVehicleRawValue(VehiclePropValue::RawValue* dest, const VehiclePropValue::RawValue& src) { dest->int32Values = src.int32Values; Loading @@ -94,6 +87,15 @@ void copyVehicleRawValue(VehiclePropValue::RawValue* dest, dest->stringValue = src.stringValue; } #ifdef __ANDROID__ template<typename T> inline void copyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { for (size_t i = 0; i < std::min(dest->size(), src.size()); i++) { (*dest)[i] = src[i]; } } template<typename T> void shallowCopyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { if (src.size() > 0) { Loading Loading @@ -123,6 +125,7 @@ void shallowCopy(VehiclePropValue* dest, const VehiclePropValue& src) { shallowCopyHidlStr(&dest->value.stringValue, src.value.stringValue); } #endif // __ANDROID__ //} // namespace utils Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +3 −2 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ #ifndef android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ #define android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ #include <android/hardware/automotive/vehicle/2.0/IVehicle.h> #include <android/hardware/automotive/vehicle/2.0/types.h> #include <vhal_v2_0/VehicleUtils.h> #include <map> namespace android { namespace hardware { namespace automotive { Loading Loading @@ -1017,7 +1019,6 @@ const ConfigDeclaration kVehicleProperties[]{ .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, }, }; } // impl Loading Loading
automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleObjectPool.h +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <deque> #include <map> #include <mutex> #include <memory> #include <android/hardware/automotive/vehicle/2.0/types.h> Loading
automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleUtils.h +6 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ #include <memory> #ifdef __ANDROID__ #include <hidl/HidlSupport.h> #endif #include <android/hardware/automotive/vehicle/2.0/types.h> Loading Loading @@ -69,6 +71,8 @@ size_t getVehicleRawValueVectorSize( void copyVehicleRawValue(VehiclePropValue::RawValue* dest, const VehiclePropValue::RawValue& src); #ifdef __ANDROID__ template<typename T> void shallowCopyHidlVec(hidl_vec<T>* dest, const hidl_vec<T>& src); Loading @@ -76,6 +80,8 @@ void shallowCopyHidlStr(hidl_string* dest, const hidl_string& src); void shallowCopy(VehiclePropValue* dest, const VehiclePropValue& src); #endif // __ANDROID__ } // namespace V2_0 } // namespace vehicle } // namespace automotive Loading
automotive/vehicle/2.0/default/common/src/VehicleObjectPool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ void VehiclePropValuePool::InternalPool::recycle(VehiclePropValue* o) { ALOGE("Discarding value for prop 0x%x because it contains " "data that is not consistent with this pool. " "Expected type: %d, vector size: %zu", o->prop, mPropType, mVectorSize); o->prop, toInt(mPropType), mVectorSize); delete o; } else { ObjectPool<VehiclePropValue>::recycle(o); Loading
automotive/vehicle/2.0/default/common/src/VehicleUtils.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ std::unique_ptr<VehiclePropValue> createVehiclePropValue( case VehiclePropertyType::MIXED: break; // Valid, but nothing to do. default: ALOGE("createVehiclePropValue: unknown type: %d", type); ALOGE("createVehiclePropValue: unknown type: %d", toInt(type)); val.reset(nullptr); } return val; Loading @@ -78,13 +78,6 @@ size_t getVehicleRawValueVectorSize( } } template<typename T> inline void copyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { for (size_t i = 0; i < std::min(dest->size(), src.size()); i++) { (*dest)[i] = src[i]; } } void copyVehicleRawValue(VehiclePropValue::RawValue* dest, const VehiclePropValue::RawValue& src) { dest->int32Values = src.int32Values; Loading @@ -94,6 +87,15 @@ void copyVehicleRawValue(VehiclePropValue::RawValue* dest, dest->stringValue = src.stringValue; } #ifdef __ANDROID__ template<typename T> inline void copyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { for (size_t i = 0; i < std::min(dest->size(), src.size()); i++) { (*dest)[i] = src[i]; } } template<typename T> void shallowCopyHidlVec(hidl_vec <T>* dest, const hidl_vec <T>& src) { if (src.size() > 0) { Loading Loading @@ -123,6 +125,7 @@ void shallowCopy(VehiclePropValue* dest, const VehiclePropValue& src) { shallowCopyHidlStr(&dest->value.stringValue, src.value.stringValue); } #endif // __ANDROID__ //} // namespace utils Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +3 −2 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ #ifndef android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ #define android_hardware_automotive_vehicle_V2_0_impl_DefaultConfig_H_ #include <android/hardware/automotive/vehicle/2.0/IVehicle.h> #include <android/hardware/automotive/vehicle/2.0/types.h> #include <vhal_v2_0/VehicleUtils.h> #include <map> namespace android { namespace hardware { namespace automotive { Loading Loading @@ -1017,7 +1019,6 @@ const ConfigDeclaration kVehicleProperties[]{ .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, }, }; } // impl Loading