QCamera2: Fixed compilation error for AOSP upgrade

* Fixed compilation error for O
This commit is contained in:
Suman Mukherjee 2017-11-30 14:50:06 +05:30 committed by Isaac Chen
parent b5c32d6cef
commit 83d447f155
4 changed files with 7 additions and 3 deletions

View file

@ -39,7 +39,7 @@ LOCAL_SRC_FILES += \
HAL/QCameraParametersIntf.cpp \ HAL/QCameraParametersIntf.cpp \
HAL/QCameraThermalAdapter.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 # System header file path prefix
LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys

View file

@ -6311,6 +6311,7 @@ int32_t QCamera2HardwareInterface::processPrepSnapshotDoneEvent(
int32_t QCamera2HardwareInterface::processASDUpdate( int32_t QCamera2HardwareInterface::processASDUpdate(
__unused cam_auto_scene_t scene) __unused cam_auto_scene_t scene)
{ {
size_t data_len = sizeof(cam_auto_scene_t); size_t data_len = sizeof(cam_auto_scene_t);
size_t buffer_len = 1 *sizeof(int) //meta type size_t buffer_len = 1 *sizeof(int) //meta type
+ 1 *sizeof(int) //data len + 1 *sizeof(int) //data len
@ -6319,6 +6320,8 @@ int32_t QCamera2HardwareInterface::processASDUpdate(
buffer_len, buffer_len,
1, 1,
mCallbackCookie); mCallbackCookie);
#ifndef VANILLA_HAL
if ( NULL == asdBuffer ) { if ( NULL == asdBuffer ) {
LOGE("Not enough memory for histogram data"); LOGE("Not enough memory for histogram data");
return NO_MEMORY; return NO_MEMORY;
@ -6330,7 +6333,7 @@ int32_t QCamera2HardwareInterface::processASDUpdate(
return UNKNOWN_ERROR; return UNKNOWN_ERROR;
} }
#ifndef VANILLA_HAL
pASDData[0] = CAMERA_META_DATA_ASD; pASDData[0] = CAMERA_META_DATA_ASD;
pASDData[1] = (int)data_len; pASDData[1] = (int)data_len;
pASDData[2] = scene; pASDData[2] = scene;

View file

@ -36,6 +36,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h>
#include "gralloc.h" #include "gralloc.h"
// Camera dependencies // Camera dependencies

View file

@ -19,7 +19,7 @@ LOCAL_INC_FILES := qomx_core.h \
LOCAL_SRC_FILES := qomx_core.c LOCAL_SRC_FILES := qomx_core.c
LOCAL_MODULE := libqomx_core LOCAL_MODULE := libqomx_core
LOCAL_SHARED_LIBRARIES := libcutils libdl LOCAL_SHARED_LIBRARIES := libcutils libdl liblog
LOCAL_32_BIT_ONLY := true LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)