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

Commit d203cb92 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "libaudiohal: Call IDevice.close in HAL V6"

parents 4c34794d 3355e447
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
    }
}