Switch from ScopedFd to unique_fd.
ScopedFd is being deprecated.
Bug: 35856819
Test: Still builds on nyc-iot-dev, now builds on master too.
Change-Id: Ibf131cbac218d581beee17e70f83042289382f17
diff --git a/modules/camera/3_4/v4l2_wrapper.cpp b/modules/camera/3_4/v4l2_wrapper.cpp
index 64115fb..3fafffd 100644
--- a/modules/camera/3_4/v4l2_wrapper.cpp
+++ b/modules/camera/3_4/v4l2_wrapper.cpp
@@ -19,6 +19,7 @@
#include <algorithm>
#include <array>
#include <limits>
+#include <mutex>
#include <vector>
#include <fcntl.h>
@@ -26,9 +27,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <mutex>
-
-#include <nativehelper/ScopedFd.h>
+#include <android-base/unique_fd.h>
#include "common.h"
#include "stream_format.h"
@@ -107,7 +106,7 @@
return;
}
- device_fd_.reset(); // Includes close().
+ device_fd_.reset(-1); // Includes close().
format_.reset();
buffers_.clear();
// Closing the device releases all queued buffers back to the user.