From 83d447f155e5e7e0a795f8036bc0548c96555f52 Mon Sep 17 00:00:00 2001 From: Suman Mukherjee Date: Thu, 30 Nov 2017 14:50:06 +0530 Subject: [PATCH] QCamera2: Fixed compilation error for AOSP upgrade * Fixed compilation error for O --- camera/QCamera2/Android.mk | 2 +- camera/QCamera2/HAL/QCamera2HWI.cpp | 5 ++++- camera/QCamera2/HAL3/QCamera3Channel.cpp | 1 + camera/mm-image-codec/qomx_core/Android.mk | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/camera/QCamera2/Android.mk b/camera/QCamera2/Android.mk index df49eac..69078d0 100644 --- a/camera/QCamera2/Android.mk +++ b/camera/QCamera2/Android.mk @@ -39,7 +39,7 @@ LOCAL_SRC_FILES += \ HAL/QCameraParametersIntf.cpp \ HAL/QCameraThermalAdapter.cpp -LOCAL_CFLAGS := -Wall -Wextra -Werror +LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-variable # System header file path prefix LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys diff --git a/camera/QCamera2/HAL/QCamera2HWI.cpp b/camera/QCamera2/HAL/QCamera2HWI.cpp index 1c8b63e..95227f2 100644 --- a/camera/QCamera2/HAL/QCamera2HWI.cpp +++ b/camera/QCamera2/HAL/QCamera2HWI.cpp @@ -6311,6 +6311,7 @@ int32_t QCamera2HardwareInterface::processPrepSnapshotDoneEvent( int32_t QCamera2HardwareInterface::processASDUpdate( __unused cam_auto_scene_t scene) { + size_t data_len = sizeof(cam_auto_scene_t); size_t buffer_len = 1 *sizeof(int) //meta type + 1 *sizeof(int) //data len @@ -6319,6 +6320,8 @@ int32_t QCamera2HardwareInterface::processASDUpdate( buffer_len, 1, mCallbackCookie); + +#ifndef VANILLA_HAL if ( NULL == asdBuffer ) { LOGE("Not enough memory for histogram data"); return NO_MEMORY; @@ -6330,7 +6333,7 @@ int32_t QCamera2HardwareInterface::processASDUpdate( return UNKNOWN_ERROR; } -#ifndef VANILLA_HAL + pASDData[0] = CAMERA_META_DATA_ASD; pASDData[1] = (int)data_len; pASDData[2] = scene; diff --git a/camera/QCamera2/HAL3/QCamera3Channel.cpp b/camera/QCamera2/HAL3/QCamera3Channel.cpp index 27403f8..d9b1bee 100644 --- a/camera/QCamera2/HAL3/QCamera3Channel.cpp +++ b/camera/QCamera2/HAL3/QCamera3Channel.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include "gralloc.h" // Camera dependencies diff --git a/camera/mm-image-codec/qomx_core/Android.mk b/camera/mm-image-codec/qomx_core/Android.mk index 3982278..5cbac78 100644 --- a/camera/mm-image-codec/qomx_core/Android.mk +++ b/camera/mm-image-codec/qomx_core/Android.mk @@ -19,7 +19,7 @@ LOCAL_INC_FILES := qomx_core.h \ LOCAL_SRC_FILES := qomx_core.c LOCAL_MODULE := libqomx_core -LOCAL_SHARED_LIBRARIES := libcutils libdl +LOCAL_SHARED_LIBRARIES := libcutils libdl liblog LOCAL_32_BIT_ONLY := true include $(BUILD_SHARED_LIBRARY)