summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-01-10 00:39:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-01-10 00:39:43 +0000
commit9dae907ea07692118698a242fe4a7427283bd10a (patch)
tree6c575c5b8cd9a5e9ac4192d65bb5e933fb0de055
parent3664a25aa7d68bd80c13282e4cfb6fb6589a81f8 (diff)
parentb8f073fb8a188eacc9a7268cbed349456d9a6e5f (diff)
downloadlibhardware-9dae907ea07692118698a242fe4a7427283bd10a.tar.gz
Merge "camera: remove redundant and unnecessary includes"
-rw-r--r--modules/camera/3_4/arc/cached_frame.cpp5
-rw-r--r--modules/camera/3_4/arc/cached_frame.h1
-rw-r--r--modules/camera/3_4/arc/exif_utils.cpp1
-rw-r--r--modules/camera/3_4/arc/frame_buffer.cpp3
-rw-r--r--modules/camera/3_4/arc/frame_buffer.h5
-rw-r--r--modules/camera/3_4/arc/image_processor.cpp8
-rw-r--r--modules/camera/3_4/arc/image_processor.h4
-rw-r--r--modules/camera/3_4/arc/jpeg_compressor.cpp2
-rw-r--r--modules/camera/3_4/arc/jpeg_compressor.h1
-rw-r--r--modules/camera/3_4/camera.cpp12
-rw-r--r--modules/camera/3_4/capture_request.cpp2
-rw-r--r--modules/camera/3_4/format_metadata_factory.cpp4
-rw-r--r--modules/camera/3_4/format_metadata_factory.h3
-rw-r--r--modules/camera/3_4/format_metadata_factory_test.cpp3
-rw-r--r--modules/camera/3_4/function_thread.h2
-rw-r--r--modules/camera/3_4/metadata/boottime_state_delegate.cpp8
-rw-r--r--modules/camera/3_4/metadata/boottime_state_delegate.h3
-rw-r--r--modules/camera/3_4/metadata/control.h1
-rw-r--r--modules/camera/3_4/metadata/control_delegate_interface_mock.h4
-rw-r--r--modules/camera/3_4/metadata/control_options_interface_mock.h4
-rw-r--r--modules/camera/3_4/metadata/converter_interface.h2
-rw-r--r--modules/camera/3_4/metadata/converter_interface_mock.h4
-rw-r--r--modules/camera/3_4/metadata/default_option_delegate.h2
-rw-r--r--modules/camera/3_4/metadata/default_option_delegate_mock.h4
-rw-r--r--modules/camera/3_4/metadata/enum_converter.cpp4
-rw-r--r--modules/camera/3_4/metadata/enum_converter.h1
-rw-r--r--modules/camera/3_4/metadata/enum_converter_test.cpp1
-rw-r--r--modules/camera/3_4/metadata/map_converter.h5
-rw-r--r--modules/camera/3_4/metadata/menu_control_options.h4
-rw-r--r--modules/camera/3_4/metadata/menu_control_options_test.cpp1
-rw-r--r--modules/camera/3_4/metadata/metadata.cpp4
-rw-r--r--modules/camera/3_4/metadata/metadata.h3
-rw-r--r--modules/camera/3_4/metadata/metadata_common.h2
-rw-r--r--modules/camera/3_4/metadata/metadata_reader.h2
-rw-r--r--modules/camera/3_4/metadata/metadata_reader_mock.h4
-rw-r--r--modules/camera/3_4/metadata/metadata_reader_test.cpp4
-rw-r--r--modules/camera/3_4/metadata/metadata_test.cpp1
-rw-r--r--modules/camera/3_4/metadata/partial_metadata_factory.h2
-rw-r--r--modules/camera/3_4/metadata/partial_metadata_factory_test.cpp5
-rw-r--r--modules/camera/3_4/metadata/partial_metadata_interface.h4
-rw-r--r--modules/camera/3_4/metadata/partial_metadata_interface_mock.h4
-rw-r--r--modules/camera/3_4/metadata/property.h1
-rw-r--r--modules/camera/3_4/metadata/property_test.cpp6
-rw-r--r--modules/camera/3_4/metadata/ranged_converter.h2
-rw-r--r--modules/camera/3_4/metadata/scaling_converter.h2
-rw-r--r--modules/camera/3_4/metadata/slider_control_options.h5
-rw-r--r--modules/camera/3_4/metadata/slider_control_options_test.cpp1
-rw-r--r--modules/camera/3_4/metadata/state.h2
-rw-r--r--modules/camera/3_4/metadata/state_delegate_interface_mock.h4
-rw-r--r--modules/camera/3_4/metadata/test_common.h1
-rw-r--r--modules/camera/3_4/metadata/v4l2_control_delegate.h2
-rw-r--r--modules/camera/3_4/metadata/v4l2_control_delegate_test.cpp3
-rw-r--r--modules/camera/3_4/request_tracker.h3
-rw-r--r--modules/camera/3_4/request_tracker_test.cpp6
-rw-r--r--modules/camera/3_4/static_properties.h1
-rw-r--r--modules/camera/3_4/stream_format.cpp3
-rw-r--r--modules/camera/3_4/stream_format.h4
-rw-r--r--modules/camera/3_4/v4l2_camera.cpp10
-rw-r--r--modules/camera/3_4/v4l2_camera.h2
-rw-r--r--modules/camera/3_4/v4l2_metadata_factory.cpp2
-rw-r--r--modules/camera/3_4/v4l2_wrapper.cpp9
-rw-r--r--modules/camera/3_4/v4l2_wrapper.h1
-rw-r--r--modules/camera/3_4/v4l2_wrapper_mock.h4
63 files changed, 69 insertions, 144 deletions
diff --git a/modules/camera/3_4/arc/cached_frame.cpp b/modules/camera/3_4/arc/cached_frame.cpp
index 71375053..1c33d852 100644
--- a/modules/camera/3_4/arc/cached_frame.cpp
+++ b/modules/camera/3_4/arc/cached_frame.cpp
@@ -5,11 +5,10 @@
#include "arc/cached_frame.h"
-#include <errno.h>
-#include <libyuv.h>
+#include <cerrno>
+#include <libyuv.h>
#include "arc/common.h"
-#include "arc/common_types.h"
namespace arc {
diff --git a/modules/camera/3_4/arc/cached_frame.h b/modules/camera/3_4/arc/cached_frame.h
index fbfcb76b..a16c2a68 100644
--- a/modules/camera/3_4/arc/cached_frame.h
+++ b/modules/camera/3_4/arc/cached_frame.h
@@ -9,7 +9,6 @@
#include <memory>
#include <camera/CameraMetadata.h>
-
#include "arc/image_processor.h"
namespace arc {
diff --git a/modules/camera/3_4/arc/exif_utils.cpp b/modules/camera/3_4/arc/exif_utils.cpp
index aec53c54..5e8c7561 100644
--- a/modules/camera/3_4/arc/exif_utils.cpp
+++ b/modules/camera/3_4/arc/exif_utils.cpp
@@ -10,7 +10,6 @@
#include <ctime>
#include <libyuv.h>
-
#include "arc/common.h"
namespace std {
diff --git a/modules/camera/3_4/arc/frame_buffer.cpp b/modules/camera/3_4/arc/frame_buffer.cpp
index 4ae0fe39..51a73205 100644
--- a/modules/camera/3_4/arc/frame_buffer.cpp
+++ b/modules/camera/3_4/arc/frame_buffer.cpp
@@ -5,10 +5,9 @@
#include "arc/frame_buffer.h"
-#include <sys/mman.h>
-
#include <utility>
+#include <sys/mman.h>
#include "arc/common.h"
#include "arc/image_processor.h"
diff --git a/modules/camera/3_4/arc/frame_buffer.h b/modules/camera/3_4/arc/frame_buffer.h
index 3efeb3ba..6a90feb0 100644
--- a/modules/camera/3_4/arc/frame_buffer.h
+++ b/modules/camera/3_4/arc/frame_buffer.h
@@ -6,14 +6,11 @@
#ifndef HAL_USB_FRAME_BUFFER_H_
#define HAL_USB_FRAME_BUFFER_H_
-#include <stdint.h>
-
+#include <cstdint>
#include <memory>
-#include <string>
#include <base/files/scoped_file.h>
#include <base/synchronization/lock.h>
-
#include <hardware/gralloc.h>
namespace arc {
diff --git a/modules/camera/3_4/arc/image_processor.cpp b/modules/camera/3_4/arc/image_processor.cpp
index 7fb62194..ee28c0b6 100644
--- a/modules/camera/3_4/arc/image_processor.cpp
+++ b/modules/camera/3_4/arc/image_processor.cpp
@@ -5,12 +5,12 @@
#include "arc/image_processor.h"
-#include <errno.h>
-#include <libyuv.h>
-#include <time.h>
+#include <cerrno>
+#include <ctime>
+#include <string>
+#include <libyuv.h>
#include "arc/common.h"
-#include "arc/common_types.h"
#include "arc/exif_utils.h"
#include "arc/jpeg_compressor.h"
diff --git a/modules/camera/3_4/arc/image_processor.h b/modules/camera/3_4/arc/image_processor.h
index 323680ab..46bb7b42 100644
--- a/modules/camera/3_4/arc/image_processor.h
+++ b/modules/camera/3_4/arc/image_processor.h
@@ -6,14 +6,12 @@
#ifndef HAL_USB_IMAGE_PROCESSOR_H_
#define HAL_USB_IMAGE_PROCESSOR_H_
-#include <string>
-
+#include <camera/CameraMetadata.h>
// FourCC pixel formats (defined as V4L2_PIX_FMT_*).
#include <linux/videodev2.h>
// Declarations of HAL_PIXEL_FORMAT_XXX.
#include <system/graphics.h>
-#include <camera/CameraMetadata.h>
#include "frame_buffer.h"
namespace arc {
diff --git a/modules/camera/3_4/arc/jpeg_compressor.cpp b/modules/camera/3_4/arc/jpeg_compressor.cpp
index 7c61b404..0a7b20bd 100644
--- a/modules/camera/3_4/arc/jpeg_compressor.cpp
+++ b/modules/camera/3_4/arc/jpeg_compressor.cpp
@@ -8,8 +8,6 @@
#include <memory>
-#include <errno.h>
-
#include "arc/common.h"
namespace arc {
diff --git a/modules/camera/3_4/arc/jpeg_compressor.h b/modules/camera/3_4/arc/jpeg_compressor.h
index 378f3cda..499b9aaf 100644
--- a/modules/camera/3_4/arc/jpeg_compressor.h
+++ b/modules/camera/3_4/arc/jpeg_compressor.h
@@ -9,7 +9,6 @@
// We must include cstdio before jpeglib.h. It is a requirement of libjpeg.
#include <cstdio>
-#include <string>
#include <vector>
extern "C" {
diff --git a/modules/camera/3_4/camera.cpp b/modules/camera/3_4/camera.cpp
index 387134f9..c1b7b64b 100644
--- a/modules/camera/3_4/camera.cpp
+++ b/modules/camera/3_4/camera.cpp
@@ -19,25 +19,21 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "Camera"
+#include "camera.h"
+
#include <cstdlib>
#include <memory>
-#include <vector>
-#include <stdio.h>
+
#include <hardware/camera3.h>
#include <sync/sync.h>
#include <system/camera_metadata.h>
#include <system/graphics.h>
-#include <utils/Mutex.h>
-
#include "metadata/metadata_common.h"
-
-#include <cutils/log.h>
+#include "static_properties.h"
#define ATRACE_TAG (ATRACE_TAG_CAMERA | ATRACE_TAG_HAL)
#include <utils/Trace.h>
-#include "camera.h"
-
#define CAMERA_SYNC_TIMEOUT 5000 // in msecs
namespace default_camera_hal {
diff --git a/modules/camera/3_4/capture_request.cpp b/modules/camera/3_4/capture_request.cpp
index 00b20cde..beef72f8 100644
--- a/modules/camera/3_4/capture_request.cpp
+++ b/modules/camera/3_4/capture_request.cpp
@@ -16,8 +16,6 @@
#include "capture_request.h"
-#include <set>
-
namespace default_camera_hal {
CaptureRequest::CaptureRequest() : CaptureRequest(nullptr) {}
diff --git a/modules/camera/3_4/format_metadata_factory.cpp b/modules/camera/3_4/format_metadata_factory.cpp
index 5eed134e..3469b069 100644
--- a/modules/camera/3_4/format_metadata_factory.cpp
+++ b/modules/camera/3_4/format_metadata_factory.cpp
@@ -19,7 +19,11 @@
#include "format_metadata_factory.h"
+#include <algorithm>
+#include <set>
+
#include "arc/image_processor.h"
+#include "common.h"
#include "metadata/array_vector.h"
#include "metadata/partial_metadata_factory.h"
#include "metadata/property.h"
diff --git a/modules/camera/3_4/format_metadata_factory.h b/modules/camera/3_4/format_metadata_factory.h
index 23c1777b..cd25f9c2 100644
--- a/modules/camera/3_4/format_metadata_factory.h
+++ b/modules/camera/3_4/format_metadata_factory.h
@@ -17,12 +17,9 @@
#ifndef V4L2_CAMERA_HAL_FORMAT_METADATA_FACTORY_H_
#define V4L2_CAMERA_HAL_FORMAT_METADATA_FACTORY_H_
-#include <algorithm>
#include <iterator>
#include <memory>
-#include <set>
-#include "common.h"
#include "metadata/metadata_common.h"
#include "v4l2_wrapper.h"
diff --git a/modules/camera/3_4/format_metadata_factory_test.cpp b/modules/camera/3_4/format_metadata_factory_test.cpp
index fe5d67f5..65d44158 100644
--- a/modules/camera/3_4/format_metadata_factory_test.cpp
+++ b/modules/camera/3_4/format_metadata_factory_test.cpp
@@ -14,11 +14,12 @@
* limitations under the License.
*/
+#include "format_metadata_factory.h"
+
#include <camera/CameraMetadata.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include "format_metadata_factory.h"
#include "metadata/test_common.h"
#include "v4l2_wrapper_mock.h"
diff --git a/modules/camera/3_4/function_thread.h b/modules/camera/3_4/function_thread.h
index 7a7b1e31..44bf0618 100644
--- a/modules/camera/3_4/function_thread.h
+++ b/modules/camera/3_4/function_thread.h
@@ -21,8 +21,6 @@
#include <utils/Thread.h>
-#include "common.h"
-
namespace v4l2_camera_hal {
class FunctionThread : public android::Thread {
diff --git a/modules/camera/3_4/metadata/boottime_state_delegate.cpp b/modules/camera/3_4/metadata/boottime_state_delegate.cpp
index 3508e852..4ea68180 100644
--- a/modules/camera/3_4/metadata/boottime_state_delegate.cpp
+++ b/modules/camera/3_4/metadata/boottime_state_delegate.cpp
@@ -17,11 +17,13 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "BoottimeStateDelegate"
-#include <errno.h>
-#include <string.h>
-
#include "boottime_state_delegate.h"
+#include <cerrno>
+#include <cstring>
+
+#include "common.h"
+
namespace v4l2_camera_hal {
int BoottimeStateDelegate::GetValue(int64_t* value) {
diff --git a/modules/camera/3_4/metadata/boottime_state_delegate.h b/modules/camera/3_4/metadata/boottime_state_delegate.h
index 0a5c4b99..e31e12f9 100644
--- a/modules/camera/3_4/metadata/boottime_state_delegate.h
+++ b/modules/camera/3_4/metadata/boottime_state_delegate.h
@@ -17,7 +17,8 @@
#ifndef V4L2_CAMERA_HAL_METADATA_BOOTTIME_STATE_DELEGATE_H_
#define V4L2_CAMERA_HAL_METADATA_BOOTTIME_STATE_DELEGATE_H_
-#include "../common.h"
+#include <cstdint>
+
#include "state_delegate_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/control.h b/modules/camera/3_4/metadata/control.h
index 902a60c0..35f4d042 100644
--- a/modules/camera/3_4/metadata/control.h
+++ b/modules/camera/3_4/metadata/control.h
@@ -21,7 +21,6 @@
#include <android-base/macros.h>
#include <system/camera_metadata.h>
-
#include "metadata_common.h"
#include "partial_metadata_interface.h"
#include "tagged_control_delegate.h"
diff --git a/modules/camera/3_4/metadata/control_delegate_interface_mock.h b/modules/camera/3_4/metadata/control_delegate_interface_mock.h
index 7ed05ede..9a0ca044 100644
--- a/modules/camera/3_4/metadata/control_delegate_interface_mock.h
+++ b/modules/camera/3_4/metadata/control_delegate_interface_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_CONTROL_DELEGATE_INTERFACE_MOCK_H_
#define V4L2_CAMERA_HAL_METADATA_CONTROL_DELEGATE_INTERFACE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "control_delegate_interface.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
template <typename T>
diff --git a/modules/camera/3_4/metadata/control_options_interface_mock.h b/modules/camera/3_4/metadata/control_options_interface_mock.h
index ab8f6ee4..2492880c 100644
--- a/modules/camera/3_4/metadata/control_options_interface_mock.h
+++ b/modules/camera/3_4/metadata/control_options_interface_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_CONTROL_OPTIONS_INTERFACE_MOCK_H_
#define V4L2_CAMERA_HAL_METADATA_CONTROL_OPTIONS_INTERFACE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "control_options_interface.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
template <typename T>
diff --git a/modules/camera/3_4/metadata/converter_interface.h b/modules/camera/3_4/metadata/converter_interface.h
index ca6a0f2b..fa960e91 100644
--- a/modules/camera/3_4/metadata/converter_interface.h
+++ b/modules/camera/3_4/metadata/converter_interface.h
@@ -17,8 +17,6 @@
#ifndef V4L2_CAMERA_HAL_METADATA_CONVERTER_INTERFACE_H_
#define V4L2_CAMERA_HAL_METADATA_CONVERTER_INTERFACE_H_
-#include "../common.h"
-
namespace v4l2_camera_hal {
// A ConverterInterface converts metadata values to V4L2 values vice-versa.
diff --git a/modules/camera/3_4/metadata/converter_interface_mock.h b/modules/camera/3_4/metadata/converter_interface_mock.h
index 3f7e6f7b..19d618ad 100644
--- a/modules/camera/3_4/metadata/converter_interface_mock.h
+++ b/modules/camera/3_4/metadata/converter_interface_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_CONVERTER_INTERFACE_MOCK_H_
#define V4L2_CAMERA_HAL_METADATA_CONVERTER_INTERFACE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "converter_interface.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
template <typename TMetadata, typename TV4L2>
diff --git a/modules/camera/3_4/metadata/default_option_delegate.h b/modules/camera/3_4/metadata/default_option_delegate.h
index f2903184..d3d66c5c 100644
--- a/modules/camera/3_4/metadata/default_option_delegate.h
+++ b/modules/camera/3_4/metadata/default_option_delegate.h
@@ -17,8 +17,6 @@
#ifndef V4L2_CAMERA_HAL_METADATA_DEFAULT_OPTION_DELEGATE_H_
#define V4L2_CAMERA_HAL_METADATA_DEFAULT_OPTION_DELEGATE_H_
-#include <errno.h>
-
#include <map>
#include <hardware/camera3.h>
diff --git a/modules/camera/3_4/metadata/default_option_delegate_mock.h b/modules/camera/3_4/metadata/default_option_delegate_mock.h
index 84ec740e..6b800718 100644
--- a/modules/camera/3_4/metadata/default_option_delegate_mock.h
+++ b/modules/camera/3_4/metadata/default_option_delegate_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_DEFAULT_OPTION_DELEGATE_MOCK_H_
#define V4L2_CAMERA_HAL_METADATA_DEFAULT_OPTION_DELEGATE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "default_option_delegate.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
template <typename T>
diff --git a/modules/camera/3_4/metadata/enum_converter.cpp b/modules/camera/3_4/metadata/enum_converter.cpp
index 14da006d..580e7e1a 100644
--- a/modules/camera/3_4/metadata/enum_converter.cpp
+++ b/modules/camera/3_4/metadata/enum_converter.cpp
@@ -19,9 +19,9 @@
#include "enum_converter.h"
-#include <errno.h>
+#include <cerrno>
-#include "../common.h"
+#include "common.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/enum_converter.h b/modules/camera/3_4/metadata/enum_converter.h
index 83f4daae..855f4306 100644
--- a/modules/camera/3_4/metadata/enum_converter.h
+++ b/modules/camera/3_4/metadata/enum_converter.h
@@ -20,7 +20,6 @@
#include <map>
#include <android-base/macros.h>
-
#include "converter_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/enum_converter_test.cpp b/modules/camera/3_4/metadata/enum_converter_test.cpp
index 9ba7ffc8..1f27884b 100644
--- a/modules/camera/3_4/metadata/enum_converter_test.cpp
+++ b/modules/camera/3_4/metadata/enum_converter_test.cpp
@@ -16,7 +16,6 @@
#include "enum_converter.h"
-#include <gmock/gmock.h>
#include <gtest/gtest.h>
using testing::Test;
diff --git a/modules/camera/3_4/metadata/map_converter.h b/modules/camera/3_4/metadata/map_converter.h
index 2324d744..aa119818 100644
--- a/modules/camera/3_4/metadata/map_converter.h
+++ b/modules/camera/3_4/metadata/map_converter.h
@@ -17,13 +17,12 @@
#ifndef V4L2_CAMERA_HAL_METADATA_MAP_CONVERTER_H_
#define V4L2_CAMERA_HAL_METADATA_MAP_CONVERTER_H_
-#include <errno.h>
-
+#include <cerrno>
#include <map>
#include <memory>
#include <android-base/macros.h>
-
+#include "common.h"
#include "converter_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/menu_control_options.h b/modules/camera/3_4/metadata/menu_control_options.h
index c972dc6e..cc7f30d2 100644
--- a/modules/camera/3_4/metadata/menu_control_options.h
+++ b/modules/camera/3_4/metadata/menu_control_options.h
@@ -17,9 +17,9 @@
#ifndef V4L2_CAMERA_HAL_METADATA_MENU_CONTROL_OPTIONS_H_
#define V4L2_CAMERA_HAL_METADATA_MENU_CONTROL_OPTIONS_H_
-#include <errno.h>
+#include <cerrno>
-#include "../common.h"
+#include "common.h"
#include "control_options_interface.h"
#include "default_option_delegate.h"
diff --git a/modules/camera/3_4/metadata/menu_control_options_test.cpp b/modules/camera/3_4/metadata/menu_control_options_test.cpp
index 1a6ce6e8..b8eea74a 100644
--- a/modules/camera/3_4/metadata/menu_control_options_test.cpp
+++ b/modules/camera/3_4/metadata/menu_control_options_test.cpp
@@ -21,7 +21,6 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <hardware/camera3.h>
-
#include "default_option_delegate_mock.h"
using testing::Return;
diff --git a/modules/camera/3_4/metadata/metadata.cpp b/modules/camera/3_4/metadata/metadata.cpp
index c5106c71..682d78d9 100644
--- a/modules/camera/3_4/metadata/metadata.cpp
+++ b/modules/camera/3_4/metadata/metadata.cpp
@@ -19,11 +19,9 @@
#include "metadata.h"
-#include <camera/CameraMetadata.h>
#include <hardware/camera3.h>
-#include "../common.h"
-#include "metadata_common.h"
+#include "common.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/metadata.h b/modules/camera/3_4/metadata/metadata.h
index 615b5899..eb3e035a 100644
--- a/modules/camera/3_4/metadata/metadata.h
+++ b/modules/camera/3_4/metadata/metadata.h
@@ -17,11 +17,8 @@
#ifndef V4L2_CAMERA_HAL_METADATA_H_
#define V4L2_CAMERA_HAL_METADATA_H_
-#include <set>
-
#include <android-base/macros.h>
#include <camera/CameraMetadata.h>
-#include <hardware/camera3.h>
#include "metadata_common.h"
diff --git a/modules/camera/3_4/metadata/metadata_common.h b/modules/camera/3_4/metadata/metadata_common.h
index 52fb3ea5..f56ccc85 100644
--- a/modules/camera/3_4/metadata/metadata_common.h
+++ b/modules/camera/3_4/metadata/metadata_common.h
@@ -23,8 +23,8 @@
#include <vector>
#include <camera/CameraMetadata.h>
-
#include "array_vector.h"
+#include "common.h"
#include "partial_metadata_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/metadata_reader.h b/modules/camera/3_4/metadata/metadata_reader.h
index 8e05079e..f704a15e 100644
--- a/modules/camera/3_4/metadata/metadata_reader.h
+++ b/modules/camera/3_4/metadata/metadata_reader.h
@@ -17,14 +17,12 @@
#ifndef DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_H_
#define DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_H_
-#include <map>
#include <memory>
#include <set>
#include <vector>
#include <android-base/macros.h>
#include <camera/CameraMetadata.h>
-
#include "types.h"
namespace default_camera_hal {
diff --git a/modules/camera/3_4/metadata/metadata_reader_mock.h b/modules/camera/3_4/metadata/metadata_reader_mock.h
index 19895a70..3a91d172 100644
--- a/modules/camera/3_4/metadata/metadata_reader_mock.h
+++ b/modules/camera/3_4/metadata/metadata_reader_mock.h
@@ -19,10 +19,10 @@
#ifndef DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_MOCK_H_
#define DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_MOCK_H_
-#include <gmock/gmock.h>
-
#include "metadata_reader.h"
+#include <gmock/gmock.h>
+
namespace default_camera_hal {
class MetadataReaderMock : public MetadataReader {
diff --git a/modules/camera/3_4/metadata/metadata_reader_test.cpp b/modules/camera/3_4/metadata/metadata_reader_test.cpp
index 5b9cc635..92f94384 100644
--- a/modules/camera/3_4/metadata/metadata_reader_test.cpp
+++ b/modules/camera/3_4/metadata/metadata_reader_test.cpp
@@ -17,16 +17,12 @@
#include "metadata_reader.h"
#include <camera/CameraMetadata.h>
-#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <system/camera.h>
#include "array_vector.h"
#include "metadata_common.h"
-using testing::AtMost;
-using testing::Expectation;
-using testing::Return;
using testing::Test;
namespace default_camera_hal {
diff --git a/modules/camera/3_4/metadata/metadata_test.cpp b/modules/camera/3_4/metadata/metadata_test.cpp
index 508884c5..5769a765 100644
--- a/modules/camera/3_4/metadata/metadata_test.cpp
+++ b/modules/camera/3_4/metadata/metadata_test.cpp
@@ -23,7 +23,6 @@
#include <camera/CameraMetadata.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-
#include "metadata_common.h"
#include "partial_metadata_interface_mock.h"
diff --git a/modules/camera/3_4/metadata/partial_metadata_factory.h b/modules/camera/3_4/metadata/partial_metadata_factory.h
index 63bf2f50..75aba25f 100644
--- a/modules/camera/3_4/metadata/partial_metadata_factory.h
+++ b/modules/camera/3_4/metadata/partial_metadata_factory.h
@@ -17,7 +17,7 @@
#ifndef V4L2_CAMERA_HAL_METADATA_CONTROL_FACTORY_H_
#define V4L2_CAMERA_HAL_METADATA_CONTROL_FACTORY_H_
-#include "../common.h"
+#include "common.h"
#include "control.h"
#include "menu_control_options.h"
#include "no_effect_control_delegate.h"
diff --git a/modules/camera/3_4/metadata/partial_metadata_factory_test.cpp b/modules/camera/3_4/metadata/partial_metadata_factory_test.cpp
index 3537ed24..f039b54d 100644
--- a/modules/camera/3_4/metadata/partial_metadata_factory_test.cpp
+++ b/modules/camera/3_4/metadata/partial_metadata_factory_test.cpp
@@ -14,15 +14,16 @@
* limitations under the License.
*/
+#include "partial_metadata_factory.h"
+
#include <camera/CameraMetadata.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include "../v4l2_wrapper_mock.h"
#include "converter_interface_mock.h"
#include "metadata_common.h"
-#include "partial_metadata_factory.h"
#include "test_common.h"
+#include "v4l2_wrapper_mock.h"
using testing::AtMost;
using testing::Expectation;
diff --git a/modules/camera/3_4/metadata/partial_metadata_interface.h b/modules/camera/3_4/metadata/partial_metadata_interface.h
index f6e91386..4212e039 100644
--- a/modules/camera/3_4/metadata/partial_metadata_interface.h
+++ b/modules/camera/3_4/metadata/partial_metadata_interface.h
@@ -17,14 +17,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_PARTIAL_METADATA_INTERFACE_H_
#define V4L2_CAMERA_HAL_METADATA_PARTIAL_METADATA_INTERFACE_H_
-#include <array>
#include <vector>
#include <camera/CameraMetadata.h>
-#include "../common.h"
-#include "array_vector.h"
-
namespace v4l2_camera_hal {
// A subset of metadata.
diff --git a/modules/camera/3_4/metadata/partial_metadata_interface_mock.h b/modules/camera/3_4/metadata/partial_metadata_interface_mock.h
index 9e822a10..289b9785 100644
--- a/modules/camera/3_4/metadata/partial_metadata_interface_mock.h
+++ b/modules/camera/3_4/metadata/partial_metadata_interface_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_PARTIAL_METADATA_INTERFACE_MOCK_H_
#define V4L2_CAMERA_HAL_PARTIAL_METADATA_INTERFACE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "partial_metadata_interface.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
class PartialMetadataInterfaceMock : public PartialMetadataInterface {
diff --git a/modules/camera/3_4/metadata/property.h b/modules/camera/3_4/metadata/property.h
index 6a542b28..b5a996cb 100644
--- a/modules/camera/3_4/metadata/property.h
+++ b/modules/camera/3_4/metadata/property.h
@@ -17,7 +17,6 @@
#ifndef V4L2_CAMERA_HAL_METADATA_PROPERTY_H_
#define V4L2_CAMERA_HAL_METADATA_PROPERTY_H_
-#include "../common.h"
#include "metadata_common.h"
#include "partial_metadata_interface.h"
diff --git a/modules/camera/3_4/metadata/property_test.cpp b/modules/camera/3_4/metadata/property_test.cpp
index 80f8eb8d..5faac470 100644
--- a/modules/camera/3_4/metadata/property_test.cpp
+++ b/modules/camera/3_4/metadata/property_test.cpp
@@ -20,19 +20,13 @@
#include <vector>
#include <camera/CameraMetadata.h>
-#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <hardware/camera3.h>
-
#include "array_vector.h"
#include "metadata_common.h"
#include "test_common.h"
-using testing::AtMost;
-using testing::Return;
-using testing::ReturnRef;
using testing::Test;
-using testing::_;
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/ranged_converter.h b/modules/camera/3_4/metadata/ranged_converter.h
index bc48767f..abfe3705 100644
--- a/modules/camera/3_4/metadata/ranged_converter.h
+++ b/modules/camera/3_4/metadata/ranged_converter.h
@@ -20,7 +20,7 @@
#include <memory>
#include <android-base/macros.h>
-
+#include "common.h"
#include "converter_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/scaling_converter.h b/modules/camera/3_4/metadata/scaling_converter.h
index 30871678..bddf1f40 100644
--- a/modules/camera/3_4/metadata/scaling_converter.h
+++ b/modules/camera/3_4/metadata/scaling_converter.h
@@ -17,7 +17,7 @@
#ifndef V4L2_CAMERA_HAL_METADATA_SCALING_CONVERTER_H_
#define V4L2_CAMERA_HAL_METADATA_SCALING_CONVERTER_H_
-#include "../common.h"
+#include "common.h"
#include "converter_interface.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/slider_control_options.h b/modules/camera/3_4/metadata/slider_control_options.h
index 88c16516..1d9fb7e4 100644
--- a/modules/camera/3_4/metadata/slider_control_options.h
+++ b/modules/camera/3_4/metadata/slider_control_options.h
@@ -17,11 +17,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_SLIDER_CONTROL_OPTIONS_H_
#define V4L2_CAMERA_HAL_METADATA_SLIDER_CONTROL_OPTIONS_H_
-#include <errno.h>
-
+#include <cerrno>
#include <vector>
-#include "../common.h"
+#include "common.h"
#include "control_options_interface.h"
#include "default_option_delegate.h"
diff --git a/modules/camera/3_4/metadata/slider_control_options_test.cpp b/modules/camera/3_4/metadata/slider_control_options_test.cpp
index b7cef5a7..7f3a6436 100644
--- a/modules/camera/3_4/metadata/slider_control_options_test.cpp
+++ b/modules/camera/3_4/metadata/slider_control_options_test.cpp
@@ -21,7 +21,6 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <hardware/camera3.h>
-
#include "default_option_delegate_mock.h"
using testing::Return;
diff --git a/modules/camera/3_4/metadata/state.h b/modules/camera/3_4/metadata/state.h
index 13f2ea5f..3fd84476 100644
--- a/modules/camera/3_4/metadata/state.h
+++ b/modules/camera/3_4/metadata/state.h
@@ -17,7 +17,7 @@
#ifndef V4L2_CAMERA_HAL_METADATA_STATE_H_
#define V4L2_CAMERA_HAL_METADATA_STATE_H_
-#include "../common.h"
+#include "common.h"
#include "metadata_common.h"
#include "partial_metadata_interface.h"
#include "state_delegate_interface.h"
diff --git a/modules/camera/3_4/metadata/state_delegate_interface_mock.h b/modules/camera/3_4/metadata/state_delegate_interface_mock.h
index 5064b834..e9698f16 100644
--- a/modules/camera/3_4/metadata/state_delegate_interface_mock.h
+++ b/modules/camera/3_4/metadata/state_delegate_interface_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_METADATA_STATE_DELEGATE_INTERFACE_MOCK_H_
#define V4L2_CAMERA_HAL_METADATA_STATE_DELEGATE_INTERFACE_MOCK_H_
-#include <gmock/gmock.h>
-
#include "state_delegate_interface.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
template <typename T>
diff --git a/modules/camera/3_4/metadata/test_common.h b/modules/camera/3_4/metadata/test_common.h
index 42e44f0b..838f97ea 100644
--- a/modules/camera/3_4/metadata/test_common.h
+++ b/modules/camera/3_4/metadata/test_common.h
@@ -22,7 +22,6 @@
#include <camera/CameraMetadata.h>
#include <gtest/gtest.h>
-
#include "array_vector.h"
#include "metadata_common.h"
diff --git a/modules/camera/3_4/metadata/v4l2_control_delegate.h b/modules/camera/3_4/metadata/v4l2_control_delegate.h
index 3f45f9c8..b52c252e 100644
--- a/modules/camera/3_4/metadata/v4l2_control_delegate.h
+++ b/modules/camera/3_4/metadata/v4l2_control_delegate.h
@@ -17,9 +17,9 @@
#ifndef V4L2_CAMERA_HAL_METADATA_V4L2_CONTROL_DELEGATE_H_
#define V4L2_CAMERA_HAL_METADATA_V4L2_CONTROL_DELEGATE_H_
-#include "../v4l2_wrapper.h"
#include "control_delegate_interface.h"
#include "converter_interface.h"
+#include "v4l2_wrapper.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/metadata/v4l2_control_delegate_test.cpp b/modules/camera/3_4/metadata/v4l2_control_delegate_test.cpp
index 2f14d6f9..63ad0f60 100644
--- a/modules/camera/3_4/metadata/v4l2_control_delegate_test.cpp
+++ b/modules/camera/3_4/metadata/v4l2_control_delegate_test.cpp
@@ -18,9 +18,8 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-
-#include "../v4l2_wrapper_mock.h"
#include "converter_interface_mock.h"
+#include "v4l2_wrapper_mock.h"
using testing::Return;
using testing::SetArgPointee;
diff --git a/modules/camera/3_4/request_tracker.h b/modules/camera/3_4/request_tracker.h
index e0bb4b52..3d390e31 100644
--- a/modules/camera/3_4/request_tracker.h
+++ b/modules/camera/3_4/request_tracker.h
@@ -21,9 +21,8 @@
#include <memory>
#include <set>
-#include <hardware/camera3.h>
#include <android-base/macros.h>
-
+#include <hardware/camera3.h>
#include "capture_request.h"
namespace default_camera_hal {
diff --git a/modules/camera/3_4/request_tracker_test.cpp b/modules/camera/3_4/request_tracker_test.cpp
index 001ba78b..a7e377c0 100644
--- a/modules/camera/3_4/request_tracker_test.cpp
+++ b/modules/camera/3_4/request_tracker_test.cpp
@@ -16,15 +16,9 @@
#include "request_tracker.h"
-#include <gmock/gmock.h>
#include <gtest/gtest.h>
-using testing::AtMost;
-using testing::Expectation;
-using testing::Return;
-using testing::SetArgPointee;
using testing::Test;
-using testing::_;
namespace default_camera_hal {
diff --git a/modules/camera/3_4/static_properties.h b/modules/camera/3_4/static_properties.h
index 25c82057..565118d6 100644
--- a/modules/camera/3_4/static_properties.h
+++ b/modules/camera/3_4/static_properties.h
@@ -21,7 +21,6 @@
#include <set>
#include <hardware/camera3.h>
-
#include "common.h"
#include "metadata/metadata_reader.h"
#include "metadata/types.h"
diff --git a/modules/camera/3_4/stream_format.cpp b/modules/camera/3_4/stream_format.cpp
index 401a2f09..4a6231ab 100644
--- a/modules/camera/3_4/stream_format.cpp
+++ b/modules/camera/3_4/stream_format.cpp
@@ -19,10 +19,7 @@
#include "stream_format.h"
-#include <linux/videodev2.h>
-
#include <system/graphics.h>
-
#include "arc/image_processor.h"
#include "common.h"
diff --git a/modules/camera/3_4/stream_format.h b/modules/camera/3_4/stream_format.h
index 82ec440d..3f0c5146 100644
--- a/modules/camera/3_4/stream_format.h
+++ b/modules/camera/3_4/stream_format.h
@@ -17,12 +17,10 @@
#ifndef V4L2_CAMERA_HAL_STREAM_FORMAT_H_
#define V4L2_CAMERA_HAL_STREAM_FORMAT_H_
-#include <string.h>
+#include <cstring>
#include <linux/videodev2.h>
-
#include "arc/common_types.h"
-#include "common.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/v4l2_camera.cpp b/modules/camera/3_4/v4l2_camera.cpp
index 558b4535..99b7a935 100644
--- a/modules/camera/3_4/v4l2_camera.cpp
+++ b/modules/camera/3_4/v4l2_camera.cpp
@@ -19,16 +19,14 @@
#include "v4l2_camera.h"
-#include <fcntl.h>
-#include <linux/videodev2.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
#include <cstdlib>
+#include <fcntl.h>
#include <camera/CameraMetadata.h>
#include <hardware/camera3.h>
-
+#include <linux/videodev2.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "common.h"
#include "function_thread.h"
#include "metadata/metadata_common.h"
diff --git a/modules/camera/3_4/v4l2_camera.h b/modules/camera/3_4/v4l2_camera.h
index fc2adb3e..ee291454 100644
--- a/modules/camera/3_4/v4l2_camera.h
+++ b/modules/camera/3_4/v4l2_camera.h
@@ -21,14 +21,12 @@
#include <array>
#include <condition_variable>
-#include <map>
#include <queue>
#include <string>
#include <camera/CameraMetadata.h>
#include <utils/StrongPointer.h>
#include <utils/Thread.h>
-
#include "camera.h"
#include "common.h"
#include "metadata/metadata.h"
diff --git a/modules/camera/3_4/v4l2_metadata_factory.cpp b/modules/camera/3_4/v4l2_metadata_factory.cpp
index 535f5629..096951f3 100644
--- a/modules/camera/3_4/v4l2_metadata_factory.cpp
+++ b/modules/camera/3_4/v4l2_metadata_factory.cpp
@@ -20,13 +20,11 @@
#include "v4l2_metadata_factory.h"
#include <camera/CameraMetadata.h>
-
#include "common.h"
#include "format_metadata_factory.h"
#include "metadata/boottime_state_delegate.h"
#include "metadata/control.h"
#include "metadata/enum_converter.h"
-#include "metadata/metadata_common.h"
#include "metadata/partial_metadata_factory.h"
#include "metadata/property.h"
#include "metadata/scaling_converter.h"
diff --git a/modules/camera/3_4/v4l2_wrapper.cpp b/modules/camera/3_4/v4l2_wrapper.cpp
index bba826fb..bee7855f 100644
--- a/modules/camera/3_4/v4l2_wrapper.cpp
+++ b/modules/camera/3_4/v4l2_wrapper.cpp
@@ -20,18 +20,13 @@
#include "v4l2_wrapper.h"
#include <algorithm>
-#include <array>
+#include <fcntl.h>
#include <limits>
-#include <mutex>
-#include <vector>
-#include <fcntl.h>
+#include <android-base/unique_fd.h>
#include <linux/videodev2.h>
#include <sys/stat.h>
#include <sys/types.h>
-
-#include <android-base/unique_fd.h>
-
#include "arc/cached_frame.h"
namespace v4l2_camera_hal {
diff --git a/modules/camera/3_4/v4l2_wrapper.h b/modules/camera/3_4/v4l2_wrapper.h
index dcb8afea..2682ce7d 100644
--- a/modules/camera/3_4/v4l2_wrapper.h
+++ b/modules/camera/3_4/v4l2_wrapper.h
@@ -25,7 +25,6 @@
#include <vector>
#include <android-base/unique_fd.h>
-
#include "arc/common_types.h"
#include "arc/frame_buffer.h"
#include "capture_request.h"
diff --git a/modules/camera/3_4/v4l2_wrapper_mock.h b/modules/camera/3_4/v4l2_wrapper_mock.h
index f98bc948..1e4d3ad5 100644
--- a/modules/camera/3_4/v4l2_wrapper_mock.h
+++ b/modules/camera/3_4/v4l2_wrapper_mock.h
@@ -19,10 +19,10 @@
#ifndef V4L2_CAMERA_HAL_V4L2_WRAPPER_MOCK_H_
#define V4L2_CAMERA_HAL_V4L2_WRAPPER_MOCK_H_
-#include <gmock/gmock.h>
-
#include "v4l2_wrapper.h"
+#include <gmock/gmock.h>
+
namespace v4l2_camera_hal {
class V4L2WrapperMock : public V4L2Wrapper {