Use libmedia_helper as shared lib.
The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.
Size diffs of affected binaries on angler-userdebug build are as
follows.
libmedia : 598056 -> 547928 (-50128)
libstagefright : 1496420 -> 1492124 (-4296)
libaudiopolicyservice : 75372 -> 66940 (-8432)
libaudiopolicymanagerdefault: 613168 -> 583516 (-29652)
libaudioflinger : 397840 -> 364380 (-33460)
libaudiohal : 114752 -> 68684 (-46068)
libaudiopolicyenginedefault : 122096 -> 71968 (-50128)
libmedia_helper : 0 -> 66288 (+66288)
total : (-155876)
Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I00a71e518337a1efcf7f55256145776311596991
diff --git a/media/libmedia/Android.bp b/media/libmedia/Android.bp
index 6e28ba9..4b14543 100644
--- a/media/libmedia/Android.bp
+++ b/media/libmedia/Android.bp
@@ -1,4 +1,4 @@
-cc_library_static {
+cc_library {
name: "libmedia_helper",
srcs: ["AudioParameter.cpp", "TypeConverter.cpp"],
cflags: [
@@ -6,5 +6,8 @@
"-Wno-error=deprecated-declarations",
"-Wall",
],
+ shared: {
+ shared_libs: ["libutils", "liblog"],
+ },
clang: true,
}