summaryrefslogtreecommitdiff
path: root/camera/device/3.2/default/CameraDeviceSession.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2017-05-24 15:05:56 -0700
committerEino-Ville Talvala <etalvala@google.com>2017-05-24 15:23:56 -0700
commit4ebf53f450227809f7fc04a828fd352afe25ec17 (patch)
tree940da5528d4448f0571c8fe23f6699b9dcbc5df3 /camera/device/3.2/default/CameraDeviceSession.cpp
parent4197ba02083a3e395e84e6e06baf6e40d330c1ca (diff)
camera.device@3.2 wrapper: Close release fence FDs
Freeing the native handle isn't enough; we need to close the fence FDs after sending them to the camera service, since that's the behavior that the legacy HAL interface requires. Test: Camera CTS continues to pass. Bug: 38482274 Change-Id: I879de566dcafecc1b899d79e68b38ea39b91a37e
Diffstat (limited to 'camera/device/3.2/default/CameraDeviceSession.cpp')
-rw-r--r--camera/device/3.2/default/CameraDeviceSession.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp
index 61be82dcaf..bad406f8cc 100644
--- a/camera/device/3.2/default/CameraDeviceSession.cpp
+++ b/camera/device/3.2/default/CameraDeviceSession.cpp
@@ -403,12 +403,14 @@ void CameraDeviceSession::ResultBatcher::freeReleaseFences(hidl_vec<CaptureResul
if (result.inputBuffer.releaseFence.getNativeHandle() != nullptr) {
native_handle_t* handle = const_cast<native_handle_t*>(
result.inputBuffer.releaseFence.getNativeHandle());
+ native_handle_close(handle);
native_handle_delete(handle);
}
for (auto& buf : result.outputBuffers) {
if (buf.releaseFence.getNativeHandle() != nullptr) {
native_handle_t* handle = const_cast<native_handle_t*>(
buf.releaseFence.getNativeHandle());
+ native_handle_close(handle);
native_handle_delete(handle);
}
}