diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index a17c7c823a..f69c147835 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -236,3 +236,7 @@ else endif # Required as platform_bootclasspath is using this namespace $(call soong_config_set,bootclasspath,release_crashrecovery_module,$(RELEASE_CRASHRECOVERY_MODULE)) + +# Enable Profiling module. Also used by platform_bootclasspath. +$(call soong_config_set,ANDROID,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE)) +$(call soong_config_set,bootclasspath,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE)) diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 9ad93c6382..a53913209f 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -65,7 +65,6 @@ PRODUCT_PACKAGES += \ com.android.ondevicepersonalization \ com.android.os.statsd \ com.android.permission \ - com.android.profiling \ com.android.resolv \ com.android.rkpd \ com.android.neuralnetworks \ @@ -330,6 +329,12 @@ else com.android.nfcservices endif +# Check if the build supports Profiling module +ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true) + PRODUCT_PACKAGES += \ + com.android.profiling +endif + ifeq ($(RELEASE_USE_WEBVIEW_BOOTSTRAP_MODULE),true) PRODUCT_PACKAGES += \ com.android.webview.bootstrap diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk index af6e2b1c34..7084c3ad0e 100644 --- a/target/product/default_art_config.mk +++ b/target/product/default_art_config.mk @@ -80,7 +80,6 @@ PRODUCT_APEX_BOOT_JARS := \ com.android.os.statsd:framework-statsd \ com.android.permission:framework-permission \ com.android.permission:framework-permission-s \ - com.android.profiling:framework-profiling \ com.android.scheduling:framework-scheduling \ com.android.sdkext:framework-sdkextensions \ com.android.tethering:framework-connectivity \ @@ -107,6 +106,13 @@ else $(call soong_config_set,bootclasspath,nfc_apex_bootclasspath_fragment,true) endif +# Check if build supports Profiling module. +ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true) + PRODUCT_APEX_BOOT_JARS += \ + com.android.profiling:framework-profiling \ + +endif + # TODO(b/308174306): Adjust this after multiple prebuilts version is supported. # APEX boot jars that are not in prebuilt apexes. # Keep the list sorted by module names and then library names. @@ -157,12 +163,18 @@ PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS := \ com.android.btservices:service-bluetooth \ com.android.devicelock:service-devicelock \ com.android.os.statsd:service-statsd \ - com.android.profiling:service-profiling \ com.android.scheduling:service-scheduling \ com.android.tethering:service-connectivity \ com.android.uwb:service-uwb \ com.android.wifi:service-wifi \ +# Check if build supports Profiling module. +ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true) + PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS += \ + com.android.profiling:service-profiling \ + +endif + # Overrides the (apex, jar) pairs above when determining the on-device location. The format is: # ::: PRODUCT_CONFIGURED_JAR_LOCATION_OVERRIDES := \