Add media.codec.update service
This is done similarly to how we update the extractors.
media.swcodec will start a service "media.codec.update"
to get notified of the update apk location, then updated
version of the component store will be loaded.
Since the update interface is exactly the same, we reuse
IMediaExtractorUpdateService to avoid adding new an aidl
interface. Besides this service will likely be removed
after we switch to APEX.)
Bug: 111407413
Bug: 117290290
Change-Id: I739ba0071806beed99302ccd3da7a6f73a437f06
diff --git a/services/mediacodec/Android.mk b/services/mediacodec/Android.mk
index 314ff01..fe05e95 100644
--- a/services/mediacodec/Android.mk
+++ b/services/mediacodec/Android.mk
@@ -72,7 +72,27 @@
LOCAL_REQUIRED_MODULES_arm := crash_dump.policy mediacodec.policy
LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediacodec.policy
endif
-LOCAL_SRC_FILES := main_swcodecservice.cpp
+LOCAL_SRC_FILES := \
+ main_swcodecservice.cpp \
+ MediaCodecUpdateService.cpp \
+
+sanitizer_runtime_libraries := $(call normalize-path-list,$(addsuffix .so,\
+ $(ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
+ $(UBSAN_RUNTIME_LIBRARY) \
+ $(TSAN_RUNTIME_LIBRARY) \
+ $(2ND_ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
+ $(2ND_UBSAN_RUNTIME_LIBRARY) \
+ $(2ND_TSAN_RUNTIME_LIBRARY)))
+
+$(info Sanitizer: $(sanitizer_runtime_libraries))
+
+llndk_libraries := $(call normalize-path-list,$(addsuffix .so,\
+ $(LLNDK_LIBRARIES)))
+
+$(info LLNDK: $(llndk_libraries))
+
+LOCAL_CFLAGS := -DLINKED_LIBRARIES='"$(sanitizer_runtime_libraries):$(llndk_libraries)"'
+
LOCAL_SHARED_LIBRARIES := \
libavservices_minijail \
libbase \
@@ -89,6 +109,9 @@
LOCAL_INIT_RC := mediaswcodec.rc
LOCAL_32_BIT_ONLY := true
+sanitizer_runtime_libraries :=
+llndk_libraries :=
+
include $(BUILD_EXECUTABLE)
####################################################################