summaryrefslogtreecommitdiffstats
path: root/modules/camera
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-02-18 15:38:05 -0800
committerAlex Ray <aray@google.com>2013-02-26 15:08:45 -0800
commitbb13a3231d24bf640e7060fee3a18643f7a9f0db (patch)
tree362395549382251f70f699fc989154b76ed73949 /modules/camera
parent5824b40278ff95f963688e9f9d3c7951f363acc2 (diff)
downloadhardware_libhardware-bb13a3231d24bf640e7060fee3a18643f7a9f0db.zip
hardware_libhardware-bb13a3231d24bf640e7060fee3a18643f7a9f0db.tar.gz
hardware_libhardware-bb13a3231d24bf640e7060fee3a18643f7a9f0db.tar.bz2
modules: camera: Hide HAL symbols DO NOT MERGE
Explicitly hide all symbols from being exported from the camera HAL except the symbol required to load the module. Change-Id: I940b24b8d3895f46e63df3c28e43b8cb012bd637
Diffstat (limited to 'modules/camera')
-rw-r--r--modules/camera/Android.mk2
-rw-r--r--modules/camera/CameraHAL.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/modules/camera/Android.mk b/modules/camera/Android.mk
index 44d7212..eebffc1 100644
--- a/modules/camera/Android.mk
+++ b/modules/camera/Android.mk
@@ -32,7 +32,7 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
liblog \
-LOCAL_CFLAGS += -Wall -Wextra
+LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden
LOCAL_MODULE_TAGS := optional
diff --git a/modules/camera/CameraHAL.cpp b/modules/camera/CameraHAL.cpp
index 22c7aef..abc3278 100644
--- a/modules/camera/CameraHAL.cpp
+++ b/modules/camera/CameraHAL.cpp
@@ -64,9 +64,8 @@ static int get_camera_info(int id, struct camera_info* info)
return gCameras[id].getCameraInfo(info);
}
-static int open_device(const hw_module_t* module,
- const char* name,
- hw_device_t** device)
+static int open_device(const hw_module_t* module, const char* name,
+ hw_device_t** device)
{
ALOGV("%s: module=%p, name=%s, device=%p", __func__, module, name, device);
char *nameEnd;
@@ -88,7 +87,7 @@ static hw_module_methods_t gCameraModuleMethods = {
open : open_device
};
-camera_module_t HAL_MODULE_INFO_SYM = {
+camera_module_t HAL_MODULE_INFO_SYM __attribute__ ((visibility("default"))) = {
common : {
tag : HARDWARE_MODULE_TAG,
module_api_version : CAMERA_MODULE_API_VERSION_2_0,