Merge "aconfig: add single-exported-file parameter" into main
diff --git a/core/Makefile b/core/Makefile
index 5c9dbde..92f9b9c 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3594,7 +3594,6 @@
ifeq ($(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE),)
$(error PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE must be set if USE_SOONG_DEFINED_SYSTEM_IMAGE is true)
endif
-SOONG_DEFINED_SYSTEM_IMAGE_PATH := $(call intermediates-dir-for,ETC,$(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE))/$(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE)
SOONG_DEFINED_SYSTEM_IMAGE_BASE := $(dir $(ALL_MODULES.$(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE).FILESYSTEM_FILELIST))
$(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE) $(systemimage_intermediates)/file_list.txt $(SOONG_DEFINED_SYSTEM_IMAGE_PATH)
$(eval $(call copy-one-file, $(SOONG_DEFINED_SYSTEM_IMAGE_PATH), $(BUILT_SYSTEMIMAGE)))
@@ -7319,29 +7318,6 @@
$(call dist-for-goals,droidcore-unbundled apps_only,$(LLVM_COVERAGE_TOOLS_ZIP))
endif
-# -----------------------------------------------------------------
-# A zip of the Android Apps. Not keeping full path so that we don't
-# include product names when distributing
-#
-name := $(TARGET_PRODUCT)
-ifeq ($(TARGET_BUILD_TYPE),debug)
- name := $(name)_debug
-endif
-name := $(name)-apps
-
-APPS_ZIP := $(PRODUCT_OUT)/$(name).zip
-$(APPS_ZIP): $(FULL_SYSTEMIMAGE_DEPS)
- @echo "Package apps: $@"
- $(hide) rm -rf $@
- $(hide) mkdir -p $(dir $@)
- $(hide) apps_to_zip=`find $(TARGET_OUT_APPS) $(TARGET_OUT_APPS_PRIVILEGED) -mindepth 2 -maxdepth 3 -name "*.apk"`; \
- if [ -z "$$apps_to_zip" ]; then \
- echo "No apps to zip up. Generating empty apps archive." ; \
- a=$$(mktemp /tmp/XXXXXXX) && touch $$a && zip $@ $$a && zip -d $@ $$a; \
- else \
- zip -qjX $@ $$apps_to_zip; \
- fi
-
ifeq (true,$(EMMA_INSTRUMENT))
#------------------------------------------------------------------
# An archive of classes for use in generating code-coverage reports
diff --git a/core/main.mk b/core/main.mk
index c10fbbb..41a36ca 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1621,7 +1621,6 @@
ifneq ($(ANDROID_BUILD_EMBEDDED),true)
$(call dist-for-goals-with-filenametag, droidcore, \
- $(APPS_ZIP) \
$(INTERNAL_EMULATOR_PACKAGE_TARGET) \
)
endif
diff --git a/core/release_config.mk b/core/release_config.mk
index 68e115f..c6986c7 100644
--- a/core/release_config.mk
+++ b/core/release_config.mk
@@ -156,20 +156,6 @@
_used_files :=
ifeq (,$(_must_protobuf)$(RELEASE_BUILD_FLAGS_IN_PROTOBUF))
_use_protobuf :=
- else
- _base_all_release := all_release_configs-$(TARGET_PRODUCT)
- $(call dist-for-goals,droid,\
- $(_flags_dir)/$(_base_all_release).pb:build_flags/all_release_configs.pb \
- $(_flags_dir)/$(_base_all_release).textproto:build_flags/all_release_configs.textproto \
- $(_flags_dir)/$(_base_all_release).json:build_flags/all_release_configs.json \
- $(_flags_dir)/inheritance_graph-$(TARGET_PRODUCT).dot:build_flags/inheritance_graph-$(TARGET_PRODUCT).dot \
- )
-# These are always created, add an empty rule for them to keep ninja happy.
-$(_flags_dir)/inheritance_graph-$(TARGET_PRODUCT).dot:
- : created by $(OUT_DIR)/release-config
-$(_flags_dir)/$(_base_all_release).pb $(_flags_dir)/$(_base_all_release).textproto $(_flags_dir)/$(_base_all_release).json:
- : created by $(OUT_DIR)/release-config
- _base_all_release :=
endif
_flags_dir:=
_flags_file:=
diff --git a/core/tasks/device-tests.mk b/core/tasks/device-tests.mk
index 6164c2e..062ac23 100644
--- a/core/tasks/device-tests.mk
+++ b/core/tasks/device-tests.mk
@@ -14,7 +14,6 @@
.PHONY: device-tests
-.PHONY: device-tests-host-shared-libs
device-tests-zip := $(PRODUCT_OUT)/device-tests.zip
# Create an artifact to include a list of test config files in device-tests.
@@ -22,7 +21,6 @@
# Create an artifact to include all test config files in device-tests.
device-tests-configs-zip := $(PRODUCT_OUT)/device-tests_configs.zip
my_host_shared_lib_for_device_tests := $(call copy-many-files,$(COMPATIBILITY.device-tests.HOST_SHARED_LIBRARY.FILES))
-device_tests_host_shared_libs_zip := $(PRODUCT_OUT)/device-tests_host-shared-libs.zip
$(device-tests-zip) : .KATI_IMPLICIT_OUTPUTS := $(device-tests-list-zip) $(device-tests-configs-zip)
$(device-tests-zip) : PRIVATE_device_tests_list := $(PRODUCT_OUT)/device-tests_list
@@ -47,22 +45,9 @@
rm -f $@.list $@-host.list $@-target.list $@-host-test-configs.list $@-target-test-configs.list \
$(PRIVATE_device_tests_list)
-$(device_tests_host_shared_libs_zip) : PRIVATE_device_host_shared_libs_zip := $(device_tests_host_shared_libs_zip)
-$(device_tests_host_shared_libs_zip) : PRIVATE_HOST_SHARED_LIBS := $(my_host_shared_lib_for_device_tests)
-$(device_tests_host_shared_libs_zip) : $(my_host_shared_lib_for_device_tests) $(SOONG_ZIP)
- rm -f $@-shared-libs.list
- $(hide) for shared_lib in $(PRIVATE_HOST_SHARED_LIBS); do \
- echo $$shared_lib >> $@-shared-libs.list; \
- done
- grep $(HOST_OUT_TESTCASES) $@-shared-libs.list > $@-host-shared-libs.list || true
- $(SOONG_ZIP) -d -o $(PRIVATE_device_host_shared_libs_zip) \
- -P host -C $(HOST_OUT) -l $@-host-shared-libs.list
-
device-tests: $(device-tests-zip)
-device-tests-host-shared-libs: $(device_tests_host_shared_libs_zip)
-$(call dist-for-goals, device-tests, $(device-tests-zip) $(device-tests-list-zip) $(device-tests-configs-zip) $(device_tests_host_shared_libs_zip))
-$(call dist-for-goals, device-tests-host-shared-libs, $(device_tests_host_shared_libs_zip))
+$(call dist-for-goals, device-tests, $(device-tests-zip) $(device-tests-list-zip) $(device-tests-configs-zip))
$(call declare-1p-container,$(device-tests-zip),)
$(call declare-container-license-deps,$(device-tests-zip),$(COMPATIBILITY.device-tests.FILES) $(my_host_shared_lib_for_device_tests),$(PRODUCT_OUT)/:/)
diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp
index 22f87f4..12abea9 100644
--- a/target/product/generic/Android.bp
+++ b/target/product/generic/Android.bp
@@ -468,6 +468,8 @@
name: "system_image_defaults",
partition_name: "system",
base_dir: "system",
+ stem: "system.img",
+ no_full_install: true,
dirs: generic_rootdirs,
soong_config_variables: {
TARGET_ADD_ROOT_EXTRA_VENDOR_SYMLINKS: {
@@ -509,6 +511,7 @@
avb_private_key: ":generic_system_sign_key",
avb_algorithm: "SHA256_RSA4096",
avb_hash_algorithm: "sha256",
+ rollback_index_location: 1,
deps: [
"abx",
diff --git a/tools/aconfig/aconfig/src/codegen/cpp.rs b/tools/aconfig/aconfig/src/codegen/cpp.rs
index 30e1a89..b855d78 100644
--- a/tools/aconfig/aconfig/src/codegen/cpp.rs
+++ b/tools/aconfig/aconfig/src/codegen/cpp.rs
@@ -234,11 +234,11 @@
return provider_->disabled_rw_in_other_namespace();
}
-inline bool enabled_fixed_ro() {
+constexpr inline bool enabled_fixed_ro() {
return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}
-inline bool enabled_fixed_ro_exported() {
+constexpr inline bool enabled_fixed_ro_exported() {
return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO_EXPORTED;
}
@@ -496,7 +496,7 @@
return false;
}
-inline bool enabled_fixed_ro() {
+constexpr inline bool enabled_fixed_ro() {
return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}
@@ -1189,7 +1189,7 @@
extern std::unique_ptr<flag_provider_interface> provider_;
-inline bool disabled_fixed_ro() {
+constexpr inline bool disabled_fixed_ro() {
return COM_ANDROID_ACONFIG_TEST_DISABLED_FIXED_RO;
}
@@ -1197,7 +1197,7 @@
return false;
}
-inline bool enabled_fixed_ro() {
+constexpr inline bool enabled_fixed_ro() {
return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}
diff --git a/tools/aconfig/aconfig/templates/cpp_exported_header.template b/tools/aconfig/aconfig/templates/cpp_exported_header.template
index 4643c97..f6f576a 100644
--- a/tools/aconfig/aconfig/templates/cpp_exported_header.template
+++ b/tools/aconfig/aconfig/templates/cpp_exported_header.template
@@ -41,6 +41,7 @@
extern std::unique_ptr<flag_provider_interface> provider_;
{{ for item in class_elements}}
+{{ if not is_test_mode }}{{ if item.is_fixed_read_only }}constexpr {{ endif }}{{ endif -}}
inline bool {item.flag_name}() \{
{{ -if is_test_mode }}
return provider_->{item.flag_name}();
diff --git a/tools/edit_monitor/daemon_manager_test.py b/tools/edit_monitor/daemon_manager_test.py
index be28965..a7c175d 100644
--- a/tools/edit_monitor/daemon_manager_test.py
+++ b/tools/edit_monitor/daemon_manager_test.py
@@ -494,8 +494,8 @@
def _assert_error_event_logged(self, fake_cclient, error_type):
error_events = fake_cclient.get_sent_events()
- self.assertEquals(len(error_events), 1)
- self.assertEquals(
+ self.assertEqual(len(error_events), 1)
+ self.assertEqual(
edit_event_pb2.EditEvent.FromString(
error_events[0].source_extension
).edit_monitor_error_event.error_type,
diff --git a/tools/edit_monitor/edit_monitor_test.py b/tools/edit_monitor/edit_monitor_test.py
index 64a3871..deb73e7 100644
--- a/tools/edit_monitor/edit_monitor_test.py
+++ b/tools/edit_monitor/edit_monitor_test.py
@@ -260,7 +260,7 @@
# Wait until observer started.
received_data = receiver.recv()
- self.assertEquals(received_data, 'Observer started.')
+ self.assertEqual(received_data, 'Observer started.')
receiver.close()
return p