Merge "Enable the soong config namespace "camera" for all products" into main
diff --git a/cogsetup.sh b/cogsetup.sh
index 6439af0..44538f2 100644
--- a/cogsetup.sh
+++ b/cogsetup.sh
@@ -21,18 +21,21 @@
OUT_DIR="out"
fi
- if [[ -L "${OUT_DIR}" ]]; then
+ # getoutdir ensures paths are absolute. envsetup could be called from a
+ # directory other than the root of the source tree
+ local outdir=$(getoutdir)
+ if [[ -L "${outdir}" ]]; then
return
fi
- if [ -d "${OUT_DIR}" ]; then
- echo -e "\tOutput directory ${OUT_DIR} cannot be present in a Cog workspace."
- echo -e "\tDelete \"${OUT_DIR}\" or create a symlink from \"${OUT_DIR}\" to a directory outside your workspace."
+ if [ -d "${outdir}" ]; then
+ echo -e "\tOutput directory ${outdir} cannot be present in a Cog workspace."
+ echo -e "\tDelete \"${outdir}\" or create a symlink from \"${outdir}\" to a directory outside your workspace."
return 1
fi
DEFAULT_OUTPUT_DIR="${HOME}/.cog/android-build-out"
mkdir -p ${DEFAULT_OUTPUT_DIR}
- ln -s ${DEFAULT_OUTPUT_DIR} `pwd`/out
+ ln -s ${DEFAULT_OUTPUT_DIR} ${outdir}
}
# This function sets up the build environment to be appropriate for Cog.
@@ -63,4 +66,4 @@
echo -e "\e[01;31mERROR:\e[0m This script must be run from a Cog workspace."
fi
-_setup_cog_env
\ No newline at end of file
+_setup_cog_env
diff --git a/core/Makefile b/core/Makefile
index 0215fda..2165700 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -465,9 +465,7 @@
)
$(if $(1),\
cp $$(PRIVATE_MODULES) $$(PRIVATE_MODULE_DIR)/; \
- for MODULE in $$(PRIVATE_LOAD_MODULES); do \
- basename $$$$MODULE >> $$(PRIVATE_LOAD_FILE); \
- done; \
+ if [ -n "$$(PRIVATE_LOAD_MODULES)" ]; then basename -a $$(PRIVATE_LOAD_MODULES); fi > $$(PRIVATE_LOAD_FILE); \
)
# The ln -sf + find -delete sequence is to remove any modules in
# PRIVATE_EXTRA_MODULES which have same basename as MODULES in PRIVATE_MODULES
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 9f43a3e..82e8baa 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -164,6 +164,8 @@
$(call add_soong_config_var_value,ANDROID,release_binder_death_recipient_weak_from_jni,$(RELEASE_BINDER_DEATH_RECIPIENT_WEAK_FROM_JNI))
+$(call add_soong_config_var_value,ANDROID,release_selinux_data_data_ignore,$(RELEASE_SELINUX_DATA_DATA_IGNORE))
+
# Enable system_server optimizations by default unless explicitly set or if
# there may be dependent runtime jars.
# TODO(b/240588226): Remove the off-by-default exceptions after handling
diff --git a/core/art_config.mk b/core/art_config.mk
index 54bfd6b..47b4bcf 100644
--- a/core/art_config.mk
+++ b/core/art_config.mk
@@ -27,8 +27,11 @@
# soong variables indicate whether the prebuilt is enabled:
# - $(m)_module/source_build for art and TOGGLEABLE_PREBUILT_MODULES
# - ANDROID/module_build_from_source for other mainline modules
+# Note that RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST is the list of module names
+# and library names of jars that need to be removed. We have to keep separated list per
+# release config due to possibility of different prebuilt content.
APEX_BOOT_JARS_EXCLUDED :=
-$(foreach pair, $(PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY),\
+$(foreach pair, $(RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST),\
$(eval m := $(subst com.android.,,$(call word-colon,1,$(pair)))) \
$(if $(call soong_config_get,$(m)_module,source_build), \
$(if $(filter true,$(call soong_config_get,$(m)_module,source_build)),, \
diff --git a/core/tasks/meta-lic.mk b/core/tasks/meta-lic.mk
new file mode 100644
index 0000000..0079714
--- /dev/null
+++ b/core/tasks/meta-lic.mk
@@ -0,0 +1,23 @@
+# Copyright (C) 2024 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Declare license metadata for non-module files released with products.
+
+# Moved here from frameworks/av/media/Android.mk
+$(eval $(call declare-1p-copy-files,frameworks/av/media/libeffects,audio_effects.conf))
+$(eval $(call declare-1p-copy-files,frameworks/av/media/libeffects,audio_effects.xml))
+$(eval $(call declare-1p-copy-files,frameworks/av/media/libstagefright,))
+
+# Moved here from frameworks/av/services/Android.mk
+$(eval $(call declare-1p-copy-files,frameworks/av/services/audiopolicy,))
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index dca9baa..d13a4c4 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -104,13 +104,6 @@
com.android.nfcservices:framework-nfc
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.
-PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY := \
- com.android.mediaprovider:framework-pdf \
- com.android.mediaprovider:framework-pdf-v \
-
# List of system_server classpath jars delivered via apex.
# Keep the list sorted by module names and then library names.
# Note: For modules available in Q, DO NOT add new entries here.
diff --git a/tools/aconfig/TEST_MAPPING b/tools/aconfig/TEST_MAPPING
index e42b5d3..b07596f 100644
--- a/tools/aconfig/TEST_MAPPING
+++ b/tools/aconfig/TEST_MAPPING
@@ -20,10 +20,11 @@
// aconfig C++ integration tests (test mode auto-generated code)
"name": "aconfig.test.cpp.test_mode"
},
- {
- // aconfig C++ integration tests (exported mode auto-generated code)
- "name": "aconfig.test.cpp.exported_mode"
- },
+ // TODO(327420679): Enable export mode for native flag library
+ // {
+ // // aconfig C++ integration tests (exported mode auto-generated code)
+ // "name": "aconfig.test.cpp.exported_mode"
+ // },
{
// aconfig Rust integration tests (production mode auto-generated code)
"name": "aconfig.prod_mode.test.rust"
@@ -32,10 +33,11 @@
// aconfig Rust integration tests (test mode auto-generated code)
"name": "aconfig.test_mode.test.rust"
},
- {
- // aconfig Rust integration tests (exported mode auto-generated code)
- "name": "aconfig.exported_mode.test.rust"
- },
+ // TODO(327420679): Enable export mode for native flag library
+ // {
+ // // aconfig Rust integration tests (exported mode auto-generated code)
+ // "name": "aconfig.exported_mode.test.rust"
+ // },
{
// printflags unit tests
"name": "printflags.test"
diff --git a/tools/aconfig/aconfig/Android.bp b/tools/aconfig/aconfig/Android.bp
index 164bfe7..2c26166 100644
--- a/tools/aconfig/aconfig/Android.bp
+++ b/tools/aconfig/aconfig/Android.bp
@@ -143,12 +143,6 @@
}
cc_aconfig_library {
- name: "aconfig_test_cpp_library_exported_variant",
- aconfig_declarations: "aconfig.test.flags",
- mode: "exported",
-}
-
-cc_aconfig_library {
name: "aconfig_test_cpp_library_force_read_only_variant",
aconfig_declarations: "aconfig.test.flags",
mode: "force-read-only",
@@ -184,6 +178,14 @@
test_suites: ["general-tests"],
}
+// TODO(327420679): Enable export mode for native flag library
+/*
+cc_aconfig_library {
+ name: "aconfig_test_cpp_library_exported_variant",
+ aconfig_declarations: "aconfig.test.flags",
+ mode: "exported",
+}
+
cc_test {
name: "aconfig.test.cpp.exported_mode",
srcs: [
@@ -198,6 +200,7 @@
],
test_suites: ["general-tests"],
}
+*/
cc_test {
name: "aconfig.test.cpp.force_read_only_mode",
@@ -249,6 +252,8 @@
test_suites: ["general-tests"],
}
+// TODO(327420679): Enable export mode for native flag library
+/*
rust_aconfig_library {
name: "libaconfig_test_rust_library_with_exported_mode",
crate_name: "aconfig_test_rust_library",
@@ -266,6 +271,7 @@
],
test_suites: ["general-tests"],
}
+*/
rust_aconfig_library {
name: "libaconfig_test_rust_library_with_force_read_only_mode",
diff --git a/tools/aconfig/aconfig/src/commands.rs b/tools/aconfig/aconfig/src/commands.rs
index 59f349b..c1df16b 100644
--- a/tools/aconfig/aconfig/src/commands.rs
+++ b/tools/aconfig/aconfig/src/commands.rs
@@ -203,6 +203,11 @@
}
pub fn create_cpp_lib(mut input: Input, codegen_mode: CodegenMode) -> Result<Vec<OutputFile>> {
+ // TODO(327420679): Enable export mode for native flag library
+ ensure!(
+ codegen_mode != CodegenMode::Exported,
+ "Exported mode for generated c/c++ flag library is disabled"
+ );
let parsed_flags = input.try_parse_flags()?;
let modified_parsed_flags = modify_parsed_flags_based_on_mode(parsed_flags, codegen_mode)?;
let Some(package) = find_unique_package(&modified_parsed_flags) else {
@@ -214,6 +219,11 @@
}
pub fn create_rust_lib(mut input: Input, codegen_mode: CodegenMode) -> Result<OutputFile> {
+ // // TODO(327420679): Enable export mode for native flag library
+ ensure!(
+ codegen_mode != CodegenMode::Exported,
+ "Exported mode for generated rust flag library is disabled"
+ );
let parsed_flags = input.try_parse_flags()?;
let modified_parsed_flags = modify_parsed_flags_based_on_mode(parsed_flags, codegen_mode)?;
let Some(package) = find_unique_package(&modified_parsed_flags) else {
diff --git a/tools/aconfig/aconfig_storage_file/src/lib.rs b/tools/aconfig/aconfig_storage_file/src/lib.rs
index 84e0e90..f20600d 100644
--- a/tools/aconfig/aconfig_storage_file/src/lib.rs
+++ b/tools/aconfig/aconfig_storage_file/src/lib.rs
@@ -63,7 +63,7 @@
];
/// Storage file location pb file
-pub const STORAGE_LOCATION_FILE: &str = "/metadata/aconfig/storage_files.pb";
+pub const STORAGE_LOCATION_FILE: &str = "/metadata/aconfig/available_storage_file_records.pb";
/// Storage file type enum
#[derive(Clone, Debug, PartialEq, Eq)]