Loading automotive/vehicle/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ cc_defaults { cc_defaults { name: "VehicleHalInterfaceDefaults", static_libs: [ "android.hardware.automotive.vehicle-V3-ndk", "android.hardware.automotive.vehicle-V4-ndk", "android.hardware.automotive.vehicle.property-V4-ndk", ], } Loading @@ -45,7 +45,7 @@ rust_defaults { aidl_interface_defaults { name: "android.hardware.automotive.vehicle-latest-defaults", imports: [ "android.hardware.automotive.vehicle-V3", "android.hardware.automotive.vehicle-V4", "android.hardware.automotive.vehicle.property-V4", ], } automotive/vehicle/aidl/aidl_test/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ android_test { ":IVehicleGeneratedJavaFiles-V4", ], static_libs: [ "android.hardware.automotive.vehicle-V3-java", "android.hardware.automotive.vehicle-V4-java", "android.hardware.automotive.vehicle.property-V4-java", "androidx.test.runner", "truth", Loading automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h +12 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,18 @@ class DefaultVehicleHal final : public aidlvhal::BnVehicle { const std::vector<int32_t>& propIds) override; ndk::ScopedAStatus returnSharedMemory(const CallbackType& callback, int64_t sharedMemoryId) override; ndk::ScopedAStatus getSupportedValuesLists( const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds, aidlvhal::SupportedValuesListResults* supportedValuesListResults) override; ndk::ScopedAStatus getMinMaxSupportedValue( const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds, aidlvhal::MinMaxSupportedValueResults* minMaxSupportedValueResults) override; ndk::ScopedAStatus registerSupportedValueChangeCallback( const std::shared_ptr<aidlvhal::IVehicleCallback>& callback, const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override; ndk::ScopedAStatus unregisterSupportedValueChangeCallback( const std::shared_ptr<aidlvhal::IVehicleCallback>& callback, const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override; binder_status_t dump(int fd, const char** args, uint32_t numArgs) override; IVehicleHardware* getHardware(); Loading automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -49,12 +49,15 @@ using ::aidl::android::hardware::automotive::vehicle::GetValueRequest; using ::aidl::android::hardware::automotive::vehicle::GetValueRequests; using ::aidl::android::hardware::automotive::vehicle::GetValueResult; using ::aidl::android::hardware::automotive::vehicle::GetValueResults; using ::aidl::android::hardware::automotive::vehicle::IVehicleCallback; using ::aidl::android::hardware::automotive::vehicle::MinMaxSupportedValueResults; using ::aidl::android::hardware::automotive::vehicle::SetValueRequest; using ::aidl::android::hardware::automotive::vehicle::SetValueRequests; using ::aidl::android::hardware::automotive::vehicle::SetValueResult; using ::aidl::android::hardware::automotive::vehicle::SetValueResults; using ::aidl::android::hardware::automotive::vehicle::StatusCode; using ::aidl::android::hardware::automotive::vehicle::SubscribeOptions; using ::aidl::android::hardware::automotive::vehicle::SupportedValuesListResults; using ::aidl::android::hardware::automotive::vehicle::VehicleAreaConfig; using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig; using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfigs; Loading Loading @@ -961,6 +964,34 @@ ScopedAStatus DefaultVehicleHal::returnSharedMemory(const CallbackType&, int64_t return ScopedAStatus::ok(); } ScopedAStatus DefaultVehicleHal::getSupportedValuesLists( const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&, SupportedValuesListResults*) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::getMinMaxSupportedValue( const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&, MinMaxSupportedValueResults*) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::registerSupportedValueChangeCallback( const std::shared_ptr<IVehicleCallback>&, const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::unregisterSupportedValueChangeCallback( const std::shared_ptr<IVehicleCallback>&, const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } IVehicleHardware* DefaultVehicleHal::getHardware() { return mVehicleHardware.get(); } Loading automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ namespace vehicle { namespace { using ::aidl::android::hardware::automotive::vehicle::GetValueResults; using ::aidl::android::hardware::automotive::vehicle::PropIdAreaId; using ::aidl::android::hardware::automotive::vehicle::SetValueResults; using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors; using ::aidl::android::hardware::automotive::vehicle::VehiclePropValues; Loading Loading @@ -91,6 +92,11 @@ ScopedAStatus MockVehicleCallback::onPropertySetError(const VehiclePropErrors& r return result; } ScopedAStatus MockVehicleCallback::onSupportedValueChange(const std::vector<PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } std::optional<GetValueResults> MockVehicleCallback::nextGetValueResults() { std::scoped_lock<std::mutex> lockGuard(mLock); return pop(mGetValueResults); Loading Loading
automotive/vehicle/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ cc_defaults { cc_defaults { name: "VehicleHalInterfaceDefaults", static_libs: [ "android.hardware.automotive.vehicle-V3-ndk", "android.hardware.automotive.vehicle-V4-ndk", "android.hardware.automotive.vehicle.property-V4-ndk", ], } Loading @@ -45,7 +45,7 @@ rust_defaults { aidl_interface_defaults { name: "android.hardware.automotive.vehicle-latest-defaults", imports: [ "android.hardware.automotive.vehicle-V3", "android.hardware.automotive.vehicle-V4", "android.hardware.automotive.vehicle.property-V4", ], }
automotive/vehicle/aidl/aidl_test/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ android_test { ":IVehicleGeneratedJavaFiles-V4", ], static_libs: [ "android.hardware.automotive.vehicle-V3-java", "android.hardware.automotive.vehicle-V4-java", "android.hardware.automotive.vehicle.property-V4-java", "androidx.test.runner", "truth", Loading
automotive/vehicle/aidl/impl/current/vhal/include/DefaultVehicleHal.h +12 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,18 @@ class DefaultVehicleHal final : public aidlvhal::BnVehicle { const std::vector<int32_t>& propIds) override; ndk::ScopedAStatus returnSharedMemory(const CallbackType& callback, int64_t sharedMemoryId) override; ndk::ScopedAStatus getSupportedValuesLists( const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds, aidlvhal::SupportedValuesListResults* supportedValuesListResults) override; ndk::ScopedAStatus getMinMaxSupportedValue( const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds, aidlvhal::MinMaxSupportedValueResults* minMaxSupportedValueResults) override; ndk::ScopedAStatus registerSupportedValueChangeCallback( const std::shared_ptr<aidlvhal::IVehicleCallback>& callback, const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override; ndk::ScopedAStatus unregisterSupportedValueChangeCallback( const std::shared_ptr<aidlvhal::IVehicleCallback>& callback, const std::vector<aidlvhal::PropIdAreaId>& propIdAreaIds) override; binder_status_t dump(int fd, const char** args, uint32_t numArgs) override; IVehicleHardware* getHardware(); Loading
automotive/vehicle/aidl/impl/current/vhal/src/DefaultVehicleHal.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -49,12 +49,15 @@ using ::aidl::android::hardware::automotive::vehicle::GetValueRequest; using ::aidl::android::hardware::automotive::vehicle::GetValueRequests; using ::aidl::android::hardware::automotive::vehicle::GetValueResult; using ::aidl::android::hardware::automotive::vehicle::GetValueResults; using ::aidl::android::hardware::automotive::vehicle::IVehicleCallback; using ::aidl::android::hardware::automotive::vehicle::MinMaxSupportedValueResults; using ::aidl::android::hardware::automotive::vehicle::SetValueRequest; using ::aidl::android::hardware::automotive::vehicle::SetValueRequests; using ::aidl::android::hardware::automotive::vehicle::SetValueResult; using ::aidl::android::hardware::automotive::vehicle::SetValueResults; using ::aidl::android::hardware::automotive::vehicle::StatusCode; using ::aidl::android::hardware::automotive::vehicle::SubscribeOptions; using ::aidl::android::hardware::automotive::vehicle::SupportedValuesListResults; using ::aidl::android::hardware::automotive::vehicle::VehicleAreaConfig; using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig; using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfigs; Loading Loading @@ -961,6 +964,34 @@ ScopedAStatus DefaultVehicleHal::returnSharedMemory(const CallbackType&, int64_t return ScopedAStatus::ok(); } ScopedAStatus DefaultVehicleHal::getSupportedValuesLists( const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&, SupportedValuesListResults*) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::getMinMaxSupportedValue( const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&, MinMaxSupportedValueResults*) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::registerSupportedValueChangeCallback( const std::shared_ptr<IVehicleCallback>&, const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } ScopedAStatus DefaultVehicleHal::unregisterSupportedValueChangeCallback( const std::shared_ptr<IVehicleCallback>&, const std::vector<::aidl::android::hardware::automotive::vehicle::PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } IVehicleHardware* DefaultVehicleHal::getHardware() { return mVehicleHardware.get(); } Loading
automotive/vehicle/aidl/impl/current/vhal/test/MockVehicleCallback.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ namespace vehicle { namespace { using ::aidl::android::hardware::automotive::vehicle::GetValueResults; using ::aidl::android::hardware::automotive::vehicle::PropIdAreaId; using ::aidl::android::hardware::automotive::vehicle::SetValueResults; using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors; using ::aidl::android::hardware::automotive::vehicle::VehiclePropValues; Loading Loading @@ -91,6 +92,11 @@ ScopedAStatus MockVehicleCallback::onPropertySetError(const VehiclePropErrors& r return result; } ScopedAStatus MockVehicleCallback::onSupportedValueChange(const std::vector<PropIdAreaId>&) { // TODO(b/381020465): Add relevant implementation. return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } std::optional<GetValueResults> MockVehicleCallback::nextGetValueResults() { std::scoped_lock<std::mutex> lockGuard(mLock); return pop(mGetValueResults); Loading