OSDN Git Service

Use vendor variant of libstagefright_foundation.
authorSteven Moreland <smoreland@google.com>
Fri, 23 Jun 2017 00:11:15 +0000 (17:11 -0700)
committerSteven Moreland <smoreland@google.com>
Fri, 23 Jun 2017 15:49:02 +0000 (08:49 -0700)
Rather than having a lib called libstagefright_foundation and one
called libstagefright_foundation_vendor, we now just have one library
and the build system keeps track of the vendor APIs that are exposed.

Test: (sanity) boot device, watch (part of) DRM protected movie.
Change-Id: I49f1c557ae8f93092bad5314e0630583cc7dc710

drm/mediadrm/plugins/clearkey/Android.bp
drm/mediadrm/plugins/clearkey/tests/Android.bp
media/libstagefright/foundation/Android.bp

index f3ce65c..2973fcf 100644 (file)
@@ -38,7 +38,7 @@ cc_library_shared {
     shared_libs: [
         "libcrypto",
         "liblog",
-        "libstagefright_foundation_vendor",
+        "libstagefright_foundation",
         "libutils",
     ],
 
index 976c590..ac57d65 100644 (file)
@@ -31,7 +31,7 @@ cc_test {
         "libcrypto",
         "libdrmclearkeyplugin",
         "liblog",
-        "libstagefright_foundation_vendor",
+        "libstagefright_foundation",
         "libutils",
     ],
 }
index eeeb284..91462c8 100644 (file)
@@ -1,35 +1,6 @@
-COMMON_SRCS = [
-        "AAtomizer.cpp",
-        "ABitReader.cpp",
-        "ABuffer.cpp",
-        "ADebug.cpp",
-        "AHandler.cpp",
-        "AHierarchicalStateMachine.cpp",
-        "ALooper.cpp",
-        "ALooperRoster.cpp",
-        "AMessage.cpp",
-        "ANetworkSession.cpp",
-        "AString.cpp",
-        "AStringUtils.cpp",
-        "ColorUtils.cpp",
-        "MediaBuffer.cpp",
-        "MediaBufferGroup.cpp",
-        "MetaData.cpp",
-        "ParsedMessage.cpp",
-        "base64.cpp",
-        "hexdump.cpp",
-]
-
-COMMON_LIBS = [
-        "libbinder",
-        "libutils",
-        "libui",
-        "libcutils",
-        "liblog",
-]
-
-cc_defaults {
-    name: "libstagefright_foundation-defaults",
+cc_library_shared {
+    name: "libstagefright_foundation",
+    vendor_available: true,
 
     include_dirs: [
         "frameworks/av/include",
@@ -59,6 +30,45 @@ cc_defaults {
         "-Wall",
     ],
 
+    shared_libs: [
+        "libbinder",
+        "libutils",
+        "libui",
+        "libcutils",
+        "liblog",
+        "libpowermanager",
+    ],
+
+    srcs: [
+        "AAtomizer.cpp",
+        "ABitReader.cpp",
+        "ABuffer.cpp",
+        "ADebug.cpp",
+        "AHandler.cpp",
+        "AHierarchicalStateMachine.cpp",
+        "ALooper.cpp",
+        "ALooperRoster.cpp",
+        "AMessage.cpp",
+        "ANetworkSession.cpp",
+        "AString.cpp",
+        "AStringUtils.cpp",
+        "AWakeLock.cpp",
+        "ColorUtils.cpp",
+        "MediaBuffer.cpp",
+        "MediaBufferGroup.cpp",
+        "MetaData.cpp",
+        "ParsedMessage.cpp",
+        "base64.cpp",
+        "hexdump.cpp",
+    ],
+
+    target: {
+        vendor: {
+            exclude_shared_libs: ["libpowermanager"],
+            exclude_srcs: ["AWakeLock.cpp"],
+        },
+    },
+
     clang: true,
 
     sanitize: {
@@ -72,20 +82,3 @@ cc_defaults {
         },
     },
 }
-
-cc_library_shared {
-    name: "libstagefright_foundation",
-    defaults: ["libstagefright_foundation-defaults"],
-
-    srcs: COMMON_SRCS + ["AWakeLock.cpp"],
-    shared_libs: COMMON_LIBS + ["libpowermanager"],
-}
-
-cc_library_shared {
-    name: "libstagefright_foundation_vendor",
-    defaults: ["libstagefright_foundation-defaults"],
-    vendor: true,
-
-    srcs: COMMON_SRCS,
-    shared_libs: COMMON_LIBS,
-}