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

Commit 96d33c46 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

Change-Id: Ibee0b868e9d7a1b76effe3a45d97f8385e03b645
parents e7ac2536 76d06d2d
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
    }
}