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

Commit 239f9e35 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by android-build-merger
Browse files

Merge "libaudiohal: Call IDevice.close in HAL V6" am: 76d06d2d

am: 96d33c46

Change-Id: I242aebe71ffe7d348eca213252f1691fd444703e
parents 6f5587a4 96d33c46
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -100,8 +100,12 @@ DeviceHalHidl::DeviceHalHidl(const sp<IDevice>& device)

DeviceHalHidl::~DeviceHalHidl() {
    if (mDevice != 0) {
#if MAJOR_VERSION <= 5
        mDevice.clear();
        hardware::IPCThreadState::self()->flushCommands();
#elif MAJOR_VERSION >= 6
        mDevice->close();
#endif
    }
}