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

Commit 777a4d47 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

audio VTS: Fix call to IDevice::close in V6 tests

The result of RPC calls of HAL methods must be checked.
Added a check of result of calling IDevice::close added
for V6.

Bug: 114451103
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: Ib6276382f15f122b43f314cf64cac2c3242bb76c
parent e9956686
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -113,7 +113,11 @@ class DeviceManager : public InterfaceManager<DeviceManager, FactoryAndDevice, I
#elif MAJOR_VERSION >= 6
        {
            sp<IDevice> device = getExisting(std::make_tuple(factoryName, name));
            if (device != nullptr) device->close();
            if (device != nullptr) {
                auto ret = device->close();
                ALOGE_IF(!ret.isOk(), "Device %s::%s close failed: %s", factoryName.c_str(),
                         name.c_str(), ret.description().c_str());
            }
        }
        return InterfaceManager::reset(std::make_tuple(factoryName, name), false);
#endif