commit | d203cb92c9c9628b3bead45ec08f826544c1d649 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Thu Nov 21 17:55:36 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Nov 21 17:55:36 2019 +0000 |
tree | d6dd5d6d8d9b7ed956655802241700b5218d1ee1 | |
parent | 4c34794de4f0ef1e7fe3d7fbb50ae0c9ac977fac [diff] | |
parent | 3355e447a7c3ced0fedf5977f9d9e125feab9fcf [diff] |
Merge "libaudiohal: Call IDevice.close in HAL V6"
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp index 3d3a5eb..409a220 100644 --- a/media/libaudiohal/impl/DeviceHalHidl.cpp +++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -100,8 +100,12 @@ DeviceHalHidl::~DeviceHalHidl() { if (mDevice != 0) { +#if MAJOR_VERSION <= 5 mDevice.clear(); hardware::IPCThreadState::self()->flushCommands(); +#elif MAJOR_VERSION >= 6 + mDevice->close(); +#endif } }