libhardware: deprecate cutils/log.h
Replace cutils/log.h with log/log.h. Sort headers. Minimize conflicts.
Add missing required headers.
Test: compile
Bug: 34250038
Change-Id: I5c0f231cbfed90b73e0538c9d32ad3226c7cc5e4
diff --git a/modules/usbcamera/Camera.cpp b/modules/usbcamera/Camera.cpp
index cf62f7f..500a982 100644
--- a/modules/usbcamera/Camera.cpp
+++ b/modules/usbcamera/Camera.cpp
@@ -16,21 +16,28 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "Camera"
-#include <cutils/log.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
#include <cstdlib>
-#include <stdio.h>
-#include <hardware/camera3.h>
-#include <system/camera_metadata.h>
-#include <system/graphics.h>
+
+#include <log/log.h>
#include <utils/Mutex.h>
-#include "CameraHAL.h"
-#include "Metadata.h"
-#include "Stream.h"
#define ATRACE_TAG (ATRACE_TAG_CAMERA | ATRACE_TAG_HAL)
#include <utils/Trace.h>
+#include <hardware/camera3.h>
+#include <system/camera_metadata.h>
+#include <system/graphics.h>
+
+#include "CameraHAL.h"
+#include "Metadata.h"
+#include "Stream.h"
+
#include "Camera.h"
namespace usb_camera_hal {
diff --git a/modules/usbcamera/CameraHAL.cpp b/modules/usbcamera/CameraHAL.cpp
index 652e937..eec1044 100644
--- a/modules/usbcamera/CameraHAL.cpp
+++ b/modules/usbcamera/CameraHAL.cpp
@@ -16,13 +16,17 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "UsbCameraHAL"
-#include <cutils/log.h>
#include <cstdlib>
+
+#include <log/log.h>
+#include <utils/Mutex.h>
+
#include <hardware/camera_common.h>
#include <hardware/hardware.h>
-#include "UsbCamera.h"
+
#include "CameraHAL.h"
+#include "UsbCamera.h"
/*
* This file serves as the entry point to the HAL. It contains the module
diff --git a/modules/usbcamera/HotplugThread.cpp b/modules/usbcamera/HotplugThread.cpp
index 6c65086..80f18c8 100644
--- a/modules/usbcamera/HotplugThread.cpp
+++ b/modules/usbcamera/HotplugThread.cpp
@@ -16,7 +16,8 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "HotplugThread"
-#include <cutils/log.h>
+
+#include <log/log.h>
#include "HotplugThread.h"
diff --git a/modules/usbcamera/Metadata.cpp b/modules/usbcamera/Metadata.cpp
index f243834..78318f3 100644
--- a/modules/usbcamera/Metadata.cpp
+++ b/modules/usbcamera/Metadata.cpp
@@ -16,13 +16,14 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "Metadata"
-#include <cutils/log.h>
-#include <system/camera_metadata.h>
+#include <log/log.h>
#define ATRACE_TAG (ATRACE_TAG_CAMERA | ATRACE_TAG_HAL)
#include <utils/Trace.h>
+#include <system/camera_metadata.h>
+
#include "Metadata.h"
namespace usb_camera_hal {
diff --git a/modules/usbcamera/Stream.cpp b/modules/usbcamera/Stream.cpp
index f56866e..45e7fc2 100644
--- a/modules/usbcamera/Stream.cpp
+++ b/modules/usbcamera/Stream.cpp
@@ -16,17 +16,19 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "Stream"
-#include <cutils/log.h>
#include <stdio.h>
-#include <hardware/camera3.h>
-#include <hardware/gralloc.h>
-#include <system/graphics.h>
+
+#include <log/log.h>
#include <utils/Mutex.h>
#define ATRACE_TAG (ATRACE_TAG_CAMERA | ATRACE_TAG_HAL)
#include <utils/Trace.h>
+#include <hardware/camera3.h>
+#include <hardware/gralloc.h>
+#include <system/graphics.h>
+
#include "Stream.h"
namespace usb_camera_hal {
diff --git a/modules/usbcamera/UsbCamera.cpp b/modules/usbcamera/UsbCamera.cpp
index d0aaded..ec949ae 100644
--- a/modules/usbcamera/UsbCamera.cpp
+++ b/modules/usbcamera/UsbCamera.cpp
@@ -16,13 +16,16 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "UsbCameraDevice"
-#include <cutils/log.h>
-#include <system/camera_metadata.h>
+#include <stdint.h>
+
+#include <log/log.h>
#define ATRACE_TAG (ATRACE_TAG_CAMERA | ATRACE_TAG_HAL)
#include <utils/Trace.h>
+#include <system/camera_metadata.h>
+
#include "Camera.h"
#include "UsbCamera.h"