Structure MediaProvider as an APEX.
Based on guidance from the Mainline team, we're placing the
MediaProvider APK inside a new APEX, as this will allow us to
move MediaStore.java inside the module boundary in a future CL.
As part of this restructuring, we need the pre-Mainline APK to
remain intact to preserve the user's media database. There is
already logic in place from previous CLs that will migrate data
from the pre-Mainline to the post-Mainline world, including tests
to verify that the migration works.
Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I571eccbb2950a7c518a682eae3350ba7ef9bd804
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 4a0ac62..6e7bf62 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -713,6 +713,9 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/apex/com.android.cellbroadcast.apex)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.cellbroadcast)
+# Remove MediaProvider after moving into APEX
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/MediaProvider)
+
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 08db037..588c41a 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -58,6 +58,7 @@
com.android.location.provider \
com.android.media \
com.android.media.swcodec \
+ com.android.mediaprovider \
com.android.permission \
com.android.resolv \
com.android.neuralnetworks \
@@ -204,7 +205,7 @@
mediaextractor \
mediametrics \
media_profiles_V1_0.dtd \
- MediaProvider \
+ MediaProviderLegacy \
mediaserver \
mke2fs \
monkey \