Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6df7d0e authored by Mathias Agopian's avatar Mathias Agopian
Browse files

make all libsurfaceflinger and libsensorservice symbols's visibility hidden

we only export the main entry-point.
this saves about 150KB.

Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
parent 5d85d72a
Loading
Loading
Loading
Loading
+10 −9
Original line number Original line Diff line number Diff line
@@ -42,19 +42,20 @@ public:
    }
    }


    static void publishAndJoinThreadPool(bool allowIsolated = false) {
    static void publishAndJoinThreadPool(bool allowIsolated = false) {
        sp<IServiceManager> sm(defaultServiceManager());
        publish(allowIsolated);
        sm->addService(
        joinThreadPool();
                String16(SERVICE::getServiceName()),
                new SERVICE(), allowIsolated);
        ProcessState::self()->startThreadPool();
        ProcessState::self()->giveThreadPoolName();
        IPCThreadState::self()->joinThreadPool();
    }
    }


    static void instantiate() { publish(); }
    static void instantiate() { publish(); }


    static status_t shutdown() {
    static status_t shutdown() { return NO_ERROR; }
        return NO_ERROR;

private:
    static void joinThreadPool() {
        sp<ProcessState> ps(ProcessState::self());
        ps->startThreadPool();
        ps->giveThreadPoolName();
        IPCThreadState::self()->joinThreadPool();
    }
    }
};
};


+3 −4
Original line number Original line Diff line number Diff line
@@ -12,11 +12,12 @@ LOCAL_SRC_FILES:= \
    SensorDevice.cpp \
    SensorDevice.cpp \
    SensorFusion.cpp \
    SensorFusion.cpp \
    SensorInterface.cpp \
    SensorInterface.cpp \
    SensorService.cpp \
    SensorService.cpp



LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"


LOCAL_CFLAGS += -fvisibility=hidden

LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
	libcutils \
	libcutils \
	libhardware \
	libhardware \
@@ -27,8 +28,6 @@ LOCAL_SHARED_LIBRARIES := \
	libui \
	libui \
	libgui
	libgui




LOCAL_MODULE:= libsensorservice
LOCAL_MODULE:= libsensorservice


include $(BUILD_SHARED_LIBRARY)
include $(BUILD_SHARED_LIBRARY)
+7 −8
Original line number Original line Diff line number Diff line
@@ -55,7 +55,8 @@ class SensorService :
    static const nsecs_t MINIMUM_EVENTS_PERIOD =   1000000; // 1000 Hz
    static const nsecs_t MINIMUM_EVENTS_PERIOD =   1000000; // 1000 Hz
    static const char* WAKE_LOCK_NAME;
    static const char* WAKE_LOCK_NAME;


            SensorService();
    static char const* getServiceName() ANDROID_API { return "sensorservice"; }
    SensorService() ANDROID_API;
    virtual ~SensorService();
    virtual ~SensorService();


    virtual void onFirstRef();
    virtual void onFirstRef();
@@ -138,8 +139,6 @@ class SensorService :
    KeyedVector<int32_t, sensors_event_t> mLastEventSeen;
    KeyedVector<int32_t, sensors_event_t> mLastEventSeen;


public:
public:
    static char const* getServiceName() { return "sensorservice"; }

    void cleanupConnection(SensorEventConnection* connection);
    void cleanupConnection(SensorEventConnection* connection);
    status_t enable(const sp<SensorEventConnection>& connection, int handle);
    status_t enable(const sp<SensorEventConnection>& connection, int handle);
    status_t disable(const sp<SensorEventConnection>& connection, int handle);
    status_t disable(const sp<SensorEventConnection>& connection, int handle);
+2 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,8 @@ ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
  LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
  LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif
endif


LOCAL_CFLAGS += -fvisibility=hidden

LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
	libcutils \
	libcutils \
	liblog \
	liblog \
+2 −2
Original line number Original line Diff line number Diff line
@@ -79,11 +79,11 @@ class SurfaceFlinger : public BinderService<SurfaceFlinger>,
                       private HWComposer::EventHandler
                       private HWComposer::EventHandler
{
{
public:
public:
    static char const* getServiceName() {
    static char const* getServiceName() ANDROID_API {
        return "SurfaceFlinger";
        return "SurfaceFlinger";
    }
    }


    SurfaceFlinger();
    SurfaceFlinger() ANDROID_API;


    enum {
    enum {
        EVENT_VSYNC = HWC_EVENT_VSYNC
        EVENT_VSYNC = HWC_EVENT_VSYNC