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 Diff line number Diff line
@@ -42,19 +42,20 @@ public:
    }

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

    static void instantiate() { publish(); }

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

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

+3 −4
Original line number Diff line number Diff line
@@ -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)
+7 −8
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ class SensorService :
    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();
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
  LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif

LOCAL_CFLAGS += -fvisibility=hidden

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

    SurfaceFlinger();
    SurfaceFlinger() ANDROID_API;

    enum {
        EVENT_VSYNC = HWC_EVENT_VSYNC