make libserviceutility a shared lib
so that we have only one getpid_cached in mediaserver process
bug: 18919657
Change-Id: Iff3cd932c9110e874b3885f79705f49bf3e3f1fc
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 697fb37..f0196c6 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -19,7 +19,13 @@
# FIXME Move this library to frameworks/native
LOCAL_MODULE := libserviceutility
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
+ libutils \
+ liblog \
+ libbinder
+
+include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
@@ -51,13 +57,13 @@
libhardware \
libhardware_legacy \
libeffects \
- libpowermanager
+ libpowermanager \
+ libserviceutility
LOCAL_STATIC_LIBRARIES := \
libscheduling_policy \
libcpustats \
- libmedia_helper \
- libserviceutility
+ libmedia_helper
LOCAL_MODULE:= libaudioflinger
LOCAL_32_BIT_ONLY := true
diff --git a/services/audiopolicy/Android.mk b/services/audiopolicy/Android.mk
index 6512c38..188fc89 100644
--- a/services/audiopolicy/Android.mk
+++ b/services/audiopolicy/Android.mk
@@ -30,7 +30,8 @@
libbinder \
libmedia \
libhardware \
- libhardware_legacy
+ libhardware_legacy \
+ libserviceutility
ifneq ($(USE_LEGACY_AUDIO_POLICY), 1)
LOCAL_SHARED_LIBRARIES += \
@@ -38,8 +39,7 @@
endif
LOCAL_STATIC_LIBRARIES := \
- libmedia_helper \
- libserviceutility
+ libmedia_helper
LOCAL_MODULE:= libaudiopolicyservice
diff --git a/services/soundtrigger/Android.mk b/services/soundtrigger/Android.mk
index 572ae56..ecc49ae 100644
--- a/services/soundtrigger/Android.mk
+++ b/services/soundtrigger/Android.mk
@@ -32,9 +32,7 @@
libcutils \
libhardware \
libsoundtrigger \
- libmedia
-
-LOCAL_STATIC_LIBRARIES := \
+ libmedia \
libserviceutility
LOCAL_C_INCLUDES += \