summaryrefslogtreecommitdiffstats
path: root/services/sensorservice
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-05-09 14:53:35 -0700
committerMathias Agopian <mathias@google.com>2013-05-09 16:51:37 -0700
commitb6df7d0e4c2117ca476662bd52b6745b3d8a305f (patch)
tree6d3440cc26cd449391323fac1c0905a637383fcf /services/sensorservice
parent5d85d72a17ab4c87957c2802b92e5b67b5605558 (diff)
downloadframeworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.zip
frameworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.tar.gz
frameworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.tar.bz2
make all libsurfaceflinger and libsensorservice symbols's visibility hidden
we only export the main entry-point. this saves about 150KB. Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
Diffstat (limited to 'services/sensorservice')
-rw-r--r--services/sensorservice/Android.mk7
-rw-r--r--services/sensorservice/SensorService.h15
2 files changed, 10 insertions, 12 deletions
diff --git a/services/sensorservice/Android.mk b/services/sensorservice/Android.mk
index dd698c5..14a4e55 100644
--- a/services/sensorservice/Android.mk
+++ b/services/sensorservice/Android.mk
@@ -12,11 +12,12 @@ LOCAL_SRC_FILES:= \
SensorDevice.cpp \
SensorFusion.cpp \
SensorInterface.cpp \
- SensorService.cpp \
-
+ SensorService.cpp
LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
+LOCAL_CFLAGS += -fvisibility=hidden
+
LOCAL_SHARED_LIBRARIES := \
libcutils \
libhardware \
@@ -27,8 +28,6 @@ LOCAL_SHARED_LIBRARIES := \
libui \
libgui
-
-
LOCAL_MODULE:= libsensorservice
include $(BUILD_SHARED_LIBRARY)
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 25e5f76..ff3b555 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -50,12 +50,13 @@ class SensorService :
public BnSensorServer,
protected Thread
{
- friend class BinderService<SensorService>;
+ friend class BinderService<SensorService>;
- static const nsecs_t MINIMUM_EVENTS_PERIOD = 1000000; // 1000 Hz
- static const char* WAKE_LOCK_NAME;
+ static const nsecs_t MINIMUM_EVENTS_PERIOD = 1000000; // 1000 Hz
+ static const char* WAKE_LOCK_NAME;
- SensorService();
+ static char const* getServiceName() ANDROID_API { return "sensorservice"; }
+ SensorService() ANDROID_API;
virtual ~SensorService();
virtual void onFirstRef();
@@ -116,9 +117,9 @@ class SensorService :
void registerSensor(SensorInterface* sensor);
void registerVirtualSensor(SensorInterface* sensor);
status_t cleanupWithoutDisable(const sp<SensorEventConnection>& connection,
- int handle);
+ int handle);
void cleanupAutoDisabledSensor(const sp<SensorEventConnection>& connection,
- sensors_event_t const* buffer, const int count);
+ sensors_event_t const* buffer, const int count);
// constants
Vector<Sensor> mSensorList;
@@ -138,8 +139,6 @@ class SensorService :
KeyedVector<int32_t, sensors_event_t> mLastEventSeen;
public:
- static char const* getServiceName() { return "sensorservice"; }
-
void cleanupConnection(SensorEventConnection* connection);
status_t enable(const sp<SensorEventConnection>& connection, int handle);
status_t disable(const sp<SensorEventConnection>& connection, int handle);