Move mediacodec to vendor partition.
Test: Camera, Photos, YouTube, and Play Movies apps.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Bug: 35328855
Change-Id: I0f36683b531fc645835a94e449996e5b44d0a3de
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 34d040e..46a95c5 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -65,6 +65,8 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/liboboe*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj_arm/STATIC_LIBRARIES/liboboe*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj_arm/SHARED_LIBRARIES/liboboe*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/mediacodec)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/mediacodec.rc)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/services/mediacodec/Android.mk b/services/mediacodec/Android.mk
index 5cb7f92..8eb4aa0 100644
--- a/services/mediacodec/Android.mk
+++ b/services/mediacodec/Android.mk
@@ -41,9 +41,11 @@
$(TOP)/frameworks/av/media/libstagefright \
$(TOP)/frameworks/av/media/libstagefright/include \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_MODULE := mediacodec
+LOCAL_MODULE := android.hardware.media.omx@1.0-service
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_32_BIT_ONLY := true
-LOCAL_INIT_RC := mediacodec.rc
+LOCAL_INIT_RC := android.hardware.media.omx@1.0-service.rc
include $(BUILD_EXECUTABLE)
# service seccomp policy
diff --git a/services/mediacodec/mediacodec.rc b/services/mediacodec/android.hardware.media.omx@1.0-service.rc
similarity index 63%
rename from services/mediacodec/mediacodec.rc
rename to services/mediacodec/android.hardware.media.omx@1.0-service.rc
index d78e0a4..ec51d65 100644
--- a/services/mediacodec/mediacodec.rc
+++ b/services/mediacodec/android.hardware.media.omx@1.0-service.rc
@@ -1,4 +1,4 @@
-service mediacodec /system/bin/mediacodec
+service mediacodec /vendor/bin/hw/android.hardware.media.omx@1.0-service
class main
user mediacodec
group camera drmrpc mediadrm