diff options
| -rw-r--r-- | core/Makefile | 45 | ||||
| -rw-r--r-- | core/config.mk | 5 | ||||
| -rw-r--r-- | core/config_sanitizers.mk | 6 | ||||
| -rw-r--r-- | core/definitions.mk | 30 | ||||
| -rw-r--r-- | core/dynamic_binary.mk | 7 | ||||
| -rw-r--r-- | core/main.mk | 3 | ||||
| -rw-r--r-- | core/soong_app_prebuilt.mk | 16 | ||||
| -rw-r--r-- | core/soong_cc_rust_prebuilt.mk | 7 | ||||
| -rw-r--r-- | core/tasks/meta-lic.mk | 70 | ||||
| -rw-r--r-- | target/product/base_vendor.mk | 1 | ||||
| -rw-r--r-- | tools/aconfig/aconfig/src/codegen/java.rs | 3 | ||||
| -rw-r--r-- | tools/aconfig/exported_flag_check/allow_flag_list.txt | 260 | ||||
| -rw-r--r-- | tools/aconfig/exported_flag_check/allow_package_list.txt (renamed from tools/aconfig/exported_flag_check/allow_list.txt) | 0 | ||||
| -rw-r--r-- | tools/aconfig/exported_flag_check/src/utils.rs | 26 | ||||
| -rw-r--r-- | tools/aconfig/fake_device_config/src/android/os/Build.java | 5 | ||||
| -rwxr-xr-x | tools/releasetools/build_image.py | 4 | ||||
| -rw-r--r-- | tools/releasetools/common.py | 2 |
17 files changed, 377 insertions, 113 deletions
diff --git a/core/Makefile b/core/Makefile index 2051c2c364..9db50a371c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -6119,9 +6119,6 @@ endif ifneq ($(BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST),) $(hide) echo "partial_ota_update_partitions_list=$(BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST)" >> $@ endif -ifeq ($(BUILDING_WITH_VSDK),true) - $(hide) echo "building_with_vsdk=true" >> $@ -endif $(call declare-0p-target,$(INSTALLED_FASTBOOT_INFO_TARGET)) @@ -7189,6 +7186,12 @@ dexpreopt_config_zip: $(DEXPREOPT_CONFIG_ZIP) $(call declare-1p-target,$(DEXPREOPT_CONFIG_ZIP),) # ----------------------------------------------------------------- +# Zips of the symbols directory per test suites +# + +$(foreach suite,$(ALL_COMPATIBILITY_SUITES),$(eval $(call create-suite-symbols-map,$(suite)))) + +# ----------------------------------------------------------------- # A zip of the symbols directory. Keep the full paths to make it # more obvious where these files came from. # Also produces a textproto containing mappings from elf IDs to symbols @@ -7206,29 +7209,37 @@ SYMBOLS_ZIP := $(PRODUCT_OUT)/$(name)-symbols.zip # The path to a file containing mappings from elf IDs to filenames. SYMBOLS_MAPPING := $(PRODUCT_OUT)/$(name)-symbols-mapping.textproto .KATI_READONLY := SYMBOLS_ZIP SYMBOLS_MAPPING -# For apps_only build we'll establish the dependency later in build/make/core/main.mk. + ifeq (,$(TARGET_BUILD_UNBUNDLED)) -$(SYMBOLS_ZIP): $(INTERNAL_ALLIMAGES_FILES) $(updater_dep) + _symbols_zip_modules := $(call product-installed-modules,$(INTERNAL_PRODUCT)) + $(SYMBOLS_ZIP): $(updater_dep) +else + _symbols_zip_modules := $(unbundled_build_modules) endif -$(SYMBOLS_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,symbols)/filelist -$(SYMBOLS_ZIP): PRIVATE_MAPPING_PACKAGING_DIR := $(call intermediates-dir-for,PACKAGING,elf_symbol_mapping) -$(SYMBOLS_ZIP): $(SOONG_ZIP) $(SYMBOLS_MAP) + +_symbols_zip_modules_symbols_files := $(foreach m,$(_symbols_zip_modules),$(ALL_MODULES.$(m).SYMBOLIC_OUTPUT_PATH)) +_symbols_zip_modules_mapping_files := $(foreach m,$(_symbols_zip_modules),$(ALL_MODULES.$(m).ELF_SYMBOL_MAPPING_PATH)) + +$(SYMBOLS_ZIP): PRIVATE_SYMBOLS_MODULES_FILES := $(_symbols_zip_modules_symbols_files) +$(SYMBOLS_ZIP): PRIVATE_SYMBOLS_MODULES_MAPPING_FILES := $(_symbols_zip_modules_mapping_files) +$(SYMBOLS_ZIP): $(SOONG_ZIP) $(SYMBOLS_MAP) $(_symbols_zip_modules_symbols_files) $(_symbols_zip_modules_mapping_files) @echo "Package symbols: $@" - $(hide) rm -rf $@ $(PRIVATE_LIST_FILE) - $(hide) mkdir -p $(TARGET_OUT_UNSTRIPPED) $(dir $(PRIVATE_LIST_FILE)) $(PRIVATE_MAPPING_PACKAGING_DIR) - # Find all of the files in the symbols directory and zip them into the symbols zip. - $(hide) find -L $(TARGET_OUT_UNSTRIPPED) -type f | sort >$(PRIVATE_LIST_FILE) - $(hide) $(SOONG_ZIP) --ignore_missing_files -d -o $@ -C $(OUT_DIR)/.. -l $(PRIVATE_LIST_FILE) - # Find all of the files in the symbols mapping directory and merge them into the symbols mapping textproto. - $(hide) find -L $(PRIVATE_MAPPING_PACKAGING_DIR) -type f | sort >$(PRIVATE_LIST_FILE) - $(hide) $(SYMBOLS_MAP) -merge $(SYMBOLS_MAPPING) -ignore_missing_files @$(PRIVATE_LIST_FILE) + $(hide) rm -rf $@ $@.symbols_list $@.mapping_list + # Find all installed files in the symbols directory and zip them into the symbols zip. + echo "$(PRIVATE_SYMBOLS_MODULES_FILES)" | tr " " "\n" | sort > $@.symbols_list + $(hide) $(SOONG_ZIP) -d -o $@ -l $@.symbols_list + # Find all installed files in the symbols mapping directory and merge them into the symbols mapping textproto. + echo "$(PRIVATE_SYMBOLS_MODULES_MAPPING_FILES)" | tr " " "\n" | sort > $@.mapping_list + $(hide) $(SYMBOLS_MAP) -merge $(SYMBOLS_MAPPING) @$@.mapping_list $(SYMBOLS_ZIP): .KATI_IMPLICIT_OUTPUTS := $(SYMBOLS_MAPPING) $(call declare-1p-container,$(SYMBOLS_ZIP),) ifeq (,$(TARGET_BUILD_UNBUNDLED)) -$(call declare-container-license-deps,$(SYMBOLS_ZIP),$(INTERNAL_ALLIMAGES_FILES) $(updater_dep),$(PRODUCT_OUT)/:/) +$(call declare-container-license-deps,$(SYMBOLS_ZIP),$(PRIVATE_SYMBOLS_MODULES_FILES) $(updater_dep),$(PRODUCT_OUT)/:/) endif +_symbols_zip_modules_symbols_files := +_symbols_zip_modules_mapping_files := # ----------------------------------------------------------------- # A zip of the coverage directory. # diff --git a/core/config.mk b/core/config.mk index 47018aaba1..fafdfe1ac3 100644 --- a/core/config.mk +++ b/core/config.mk @@ -598,10 +598,7 @@ DISABLE_PREOPT := DISABLE_PREOPT_BOOT_IMAGES := ifneq (,$(TARGET_BUILD_APPS)$(TARGET_BUILD_UNBUNDLED_IMAGE)) DISABLE_PREOPT := true - # VSDK builds perform dexpreopt during merge_target_files build step. - ifneq (true,$(BUILDING_WITH_VSDK)) - DISABLE_PREOPT_BOOT_IMAGES := true - endif + DISABLE_PREOPT_BOOT_IMAGES := true endif ifeq (true,$(TARGET_BUILD_UNBUNDLED)) ifneq (true,$(UNBUNDLED_BUILD_SDKS_FROM_SOURCE)) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index ab2d5c1ddf..c0f2c6893f 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -284,9 +284,9 @@ endif ifneq ($(filter memtag_stack,$(my_sanitize)),) my_cflags += -fsanitize=memtag-stack my_ldflags += -fsanitize=memtag-stack - my_cflags += -march=armv8a+memtag - my_ldflags += -march=armv8a+memtag - my_asflags += -march=armv8a+memtag + my_cflags += -Xclang -target-feature -Xclang +mte + my_ldflags += -Xclang -target-feature -Xclang +mte + my_asflags += -Xclang -target-feature -Xclang +mte my_sanitize := $(filter-out memtag_stack,$(my_sanitize)) endif diff --git a/core/definitions.mk b/core/definitions.mk index 60034cd064..ea151fac37 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -3422,9 +3422,9 @@ endef # a hash mapping to the mapping directory. # $(1): unstripped intermediates file # $(2): path in symbols directory +# $(3): path in elf_symbol_mapping packaging directory define copy-unstripped-elf-file-with-mapping -$(call _copy-symbols-file-with-mapping,$(1),$(2),\ - elf,$(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(2).textproto)) +$(call _copy-symbols-file-with-mapping,$(1),$(2),elf,$(3)) endef # Copy an R8 dictionary to the packaging directory while also extracting @@ -3689,6 +3689,32 @@ $(eval $(my_all_targets) : \ $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_config_$(suite)))))) endef +# Define symbols.zip and symbols-mapping.textproto build rule per test suite +# +# $(1): Name of the test suite to create the zip and mapping build rules +define create-suite-symbols-map +_suite_symbols_zip := $$(subst -tests-,-tests_-,$$(PRODUCT_OUT)/$(1)-symbols.zip) +_suite_symbols_mapping := $$(subst -tests-,-tests_-,$$(PRODUCT_OUT)/$(1)-symbols-mapping.textproto) +_suite_modules_symbols_files := $$(foreach m,$$(COMPATIBILITY.$(1).MODULES),$$(ALL_MODULES.$$(m).SYMBOLIC_OUTPUT_PATH)) +_suite_modules_mapping_files := $$(foreach m,$$(COMPATIBILITY.$(1).MODULES),$$(ALL_MODULES.$$(m).ELF_SYMBOL_MAPPING_PATH)) + +$$(_suite_symbols_zip): PRIVATE_SUITE_SYMBOLS_MAPPING := $$(_suite_symbols_mapping) +$$(_suite_symbols_zip): PRIVATE_SUITE_MODULES_SYMBOLS_FILES := $$(_suite_modules_symbols_files) +$$(_suite_symbols_zip): PRIVATE_SUITE_MODULES_MAPPING_FILES := $$(_suite_modules_mapping_files) +$$(_suite_symbols_zip): $$(SOONG_ZIP) $$(SYMBOLS_MAP) $$(_suite_modules_symbols_files) $$(_suite_modules_mapping_files) + @echo "Package $(1) symbols: $$@" + $(hide) rm -rf $$@ $$@.symbols_list $$@.mapping_list + echo "$$(PRIVATE_SUITE_MODULES_SYMBOLS_FILES)" | tr " " "\n" | sort > $$@.symbols_list + $(hide) $$(SOONG_ZIP) -d -o $$@ -l $$@.symbols_list + echo "$$(PRIVATE_SUITE_MODULES_MAPPING_FILES)" | tr " " "\n" | sort > $$@.mapping_list + $(hide) $$(SYMBOLS_MAP) -merge $$(PRIVATE_SUITE_SYMBOLS_MAPPING) @$$@.mapping_list +$$(_suite_symbols_zip): .KATI_IMPLICIT_OUTPUTS := $$(_suite_symbols_mapping) + +.PHONY: $(1) +$(1): $$(_suite_symbols_zip) $$(_suite_symbols_mapping) +$$(call dist-for-goals-with-filenametag,$(1), $$(_suite_symbols_zip) $$(_suite_symbols_mapping)) +endef + ########################################################### ## Path Cleaning ########################################################### diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk index 0d2cd7f067..878989d635 100644 --- a/core/dynamic_binary.mk +++ b/core/dynamic_binary.mk @@ -55,7 +55,12 @@ my_unstripped_path := $(LOCAL_UNSTRIPPED_PATH) endif symbolic_input := $(inject_module) symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem) -$(eval $(call copy-unstripped-elf-file-with-mapping,$(symbolic_input),$(symbolic_output))) +elf_mapping_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(symbolic_output).textproto) + +ALL_MODULES.$(my_register_name).SYMBOLIC_OUTPUT_PATH := $(symbolic_output) +ALL_MODULES.$(my_register_name).ELF_SYMBOL_MAPPING_PATH := $(elf_mapping_path) + +$(eval $(call copy-unstripped-elf-file-with-mapping,$(symbolic_input),$(symbolic_output),$(elf_mapping_path))) ########################################################### ## Store breakpad symbols diff --git a/core/main.mk b/core/main.mk index b9edfc1762..aed3fa2fd9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -299,6 +299,8 @@ subdir_makefiles_total := $(words int $(subdir_makefiles) post finish) $(foreach mk,$(subdir_makefiles),$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] including $(mk) ...)$(eval include $(mk))) +-include device/generic/goldfish/tasks/emu_img_zip.mk + # Build bootloader.img/radio.img, and unpack the partitions. -include vendor/google_devices/$(TARGET_SOC)/prebuilts/misc_bins/update_bootloader_radio_image.mk @@ -993,6 +995,7 @@ endef define auto-included-modules $(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),com.android.vndk.v$(vndk_ver)) \ llndk.libraries.txt \ + $(if $(DEVICE_MANIFEST_FILE),vendor_manifest.xml) \ $(if $(DEVICE_MANIFEST_SKUS),$(foreach sku, $(DEVICE_MANIFEST_SKUS),vendor_manifest_$(sku).xml)) \ $(if $(ODM_MANIFEST_FILES),odm_manifest.xml) \ $(if $(ODM_MANIFEST_SKUS),$(foreach sku, $(ODM_MANIFEST_SKUS),odm_manifest_$(sku).xml)) \ diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index ab9227f676..62b5d5bab1 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -142,7 +142,21 @@ endif # install symbol files of JNI libraries my_jni_lib_symbols_copy_files := $(foreach f,$(LOCAL_SOONG_JNI_LIBS_SYMBOLS),\ $(call word-colon,1,$(f)):$(patsubst $(PRODUCT_OUT)/%,$(TARGET_OUT_UNSTRIPPED)/%,$(call word-colon,2,$(f)))) -$(LOCAL_BUILT_MODULE): | $(call copy-many-files, $(my_jni_lib_symbols_copy_files)) + +$(foreach f, $(my_jni_lib_symbols_copy_files), \ + $(eval $(call copy-unstripped-elf-file-with-mapping, \ + $(call word-colon,1,$(f)), \ + $(call word-colon,2,$(f)), \ + $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(call word-colon,2,$(f)).textproto)\ + ))\ +) + +symbolic_outputs := $(foreach f,$(my_jni_lib_symbols_copy_files),$(call word-colon,2,$(f))) +symbolic_mappings := $(foreach f,$(symbolic_outputs),$(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(f).textproto)) +ALL_MODULES.$(my_register_name).SYMBOLIC_OUTPUT_PATH := $(symbolic_outputs) +ALL_MODULES.$(my_register_name).ELF_SYMBOL_MAPPING_PATH := $(symbolic_mappings) + +$(LOCAL_BUILT_MODULE): | $(symbolic_outputs) # embedded JNI will already have been handled by soong my_embed_jni := diff --git a/core/soong_cc_rust_prebuilt.mk b/core/soong_cc_rust_prebuilt.mk index da608322f2..9ea24f7e46 100644 --- a/core/soong_cc_rust_prebuilt.mk +++ b/core/soong_cc_rust_prebuilt.mk @@ -190,7 +190,12 @@ ifndef LOCAL_IS_HOST_MODULE # drop /root as /root is mounted as / my_unstripped_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/root/%,$(TARGET_OUT_UNSTRIPPED)/%, $(my_unstripped_path)) symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem) - $(eval $(call copy-unstripped-elf-file-with-mapping,$(LOCAL_SOONG_UNSTRIPPED_BINARY),$(symbolic_output))) + elf_symbol_mapping_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(symbolic_output).textproto) + + ALL_MODULES.$(my_register_name).SYMBOLIC_OUTPUT_PATH := $(symbolic_output) + ALL_MODULES.$(my_register_name).ELF_SYMBOL_MAPPING_PATH := $(elf_symbol_mapping_path) + + $(eval $(call copy-unstripped-elf-file-with-mapping,$(LOCAL_SOONG_UNSTRIPPED_BINARY),$(symbolic_output),$(elf_symbol_mapping_path))) $(LOCAL_BUILT_MODULE): | $(symbolic_output) ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true) diff --git a/core/tasks/meta-lic.mk b/core/tasks/meta-lic.mk index 620b1e29ae..0675a901c2 100644 --- a/core/tasks/meta-lic.mk +++ b/core/tasks/meta-lic.mk @@ -30,59 +30,6 @@ $(eval $(call declare-1p-copy-files,device/google_car/common,)) $(eval $(call declare-1p-copy-files,device/google/atv,atv-component-overrides.xml)) $(eval $(call declare-1p-copy-files,device/google/atv,tv_core_hardware.xml)) -# Moved here from device/google/bramble/Android.mk -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,libnfc-nci.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,fstab.postinstall,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,ueventd.rc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,hals.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,media_profiles_V1_0.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/bramble,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) - -$(eval $(call declare-1p-copy-files,device/google/bramble,audio_policy_configuration.xml)) - -# Moved here from device/google/barbet/Android.mk -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,libnfc-nci.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,fstab.postinstall,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,ueventd.rc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,hals.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,media_profiles_V1_0.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/barbet,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) - -$(eval $(call declare-1p-copy-files,device/google/barbet,audio_policy_configuration.xml)) - -# Moved here from device/google/coral/Android.mk -$(eval $(call declare-copy-files-license-metadata,device/google/coral,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,libnfc-nci.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,fstab.postinstall,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,ueventd.rc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,hals.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,media_profiles_V1_0.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/coral,display_19261132550654593.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) - -$(eval $(call declare-1p-copy-files,device/google/coral,audio_policy_configuration.xml)) -$(eval $(call declare-1p-copy-files,device/google/coral,display_19260504575090817.xml)) - # Moved here from device/google/cuttlefish/Android.mk $(eval $(call declare-copy-files-license-metadata,device/google/cuttlefish,.idc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) $(eval $(call declare-copy-files-license-metadata,device/google/cuttlefish,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) @@ -152,23 +99,6 @@ $(eval $(call declare-copy-files-license-metadata,device/google/raviole,wpa_supp $(eval $(call declare-1p-copy-files,device/google/raviole,audio_policy_configuration.xml)) -# Moved here from device/google/redfin/Android.mk -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,libnfc-nci.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,fstab.postinstall,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,ueventd.rc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,hals.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,media_profiles_V1_0.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/redfin,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) - -$(eval $(call declare-1p-copy-files,device/google/redfin,audio_policy_configuration.xml)) - # Moved here from device/sample/Android.mk $(eval $(call declare-1p-copy-files,device/sample,)) diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk index 16fc7fd906..b4e450e076 100644 --- a/target/product/base_vendor.mk +++ b/target/product/base_vendor.mk @@ -106,7 +106,6 @@ PRODUCT_PACKAGES_SHIPPING_API_LEVEL_29 += \ # VINTF data for vendor image PRODUCT_PACKAGES += \ vendor_compatibility_matrix.xml \ - vendor_manifest.xml \ # Base modules and settings for the debug ramdisk, which is then packed # into a boot-debug.img and a vendor_boot-debug.img. diff --git a/tools/aconfig/aconfig/src/codegen/java.rs b/tools/aconfig/aconfig/src/codegen/java.rs index 61802f2f30..d74e87a593 100644 --- a/tools/aconfig/aconfig/src/codegen/java.rs +++ b/tools/aconfig/aconfig/src/codegen/java.rs @@ -59,7 +59,8 @@ where let runtime_lookup_required = flag_elements.iter().any(|elem| elem.is_read_write) || library_exported; let container = (flag_elements.first().expect("zero template flags").container).to_string(); - let is_platform_container = matches!(container.as_str(), "system" | "product" | "vendor"); + let is_platform_container = + matches!(container.as_str(), "system" | "system_ext" | "product" | "vendor"); let context = Context { flag_elements, namespace_flags, diff --git a/tools/aconfig/exported_flag_check/allow_flag_list.txt b/tools/aconfig/exported_flag_check/allow_flag_list.txt new file mode 100644 index 0000000000..b9c81c4ae9 --- /dev/null +++ b/tools/aconfig/exported_flag_check/allow_flag_list.txt @@ -0,0 +1,260 @@ +android.adpf.adpf_viewrootimpl_action_down_boost +android.app.admin.flags.coexistence_migration_for_supervision_enabled +android.app.admin.flags.enable_supervision_service_sync +android.app.admin.flags.lock_now_coexistence +android.app.admin.flags.permission_migration_for_zero_trust_api_enabled +android.app.admin.flags.reset_password_with_token_coexistence +android.app.admin.flags.set_application_restrictions_coexistence +android.app.admin.flags.set_backup_service_enabled_coexistence +android.app.admin.flags.set_keyguard_disabled_features_coexistence +android.app.admin.flags.set_permission_grant_state_coexistence +android.app.app_restrictions_api +android.app.enforce_pic_testmode_protocol +android.app.job.backup_jobs_exemption +android.app.pic_uses_shared_memory +android.app.pinner_service_client_api +android.app.supervision.flags.deprecate_dpm_supervision_apis +android.app.supervision.flags.enable_sync_with_dpm +android.app.supervision.flags.supervision_api +android.app.supervision.flags.supervision_api_on_wear +android.app.ui_rich_ongoing +android.appwidget.flags.use_smaller_app_widget_system_radius +android.car.feature.always_send_initial_value_event +android.car.feature.android_b_vehicle_properties +android.car.feature.android_vic_vehicle_properties +android.car.feature.area_id_config_access +android.car.feature.async_audio_service_init +android.car.feature.audio_control_hal_configuration +android.car.feature.audio_legacy_mode_navigation_volume +android.car.feature.audio_vendor_freeze_improvements +android.car.feature.batched_subscriptions +android.car.feature.car_app_card +android.car.feature.car_audio_dynamic_devices +android.car.feature.car_audio_fade_manager_configuration +android.car.feature.car_audio_min_max_activation_volume +android.car.feature.car_audio_mute_ambiguity +android.car.feature.car_evs_query_service_status +android.car.feature.car_evs_stream_management +android.car.feature.car_night_global_setting +android.car.feature.car_power_cancel_shell_command +android.car.feature.car_property_detailed_error_codes +android.car.feature.car_property_supported_value +android.car.feature.car_property_value_property_status +android.car.feature.cluster_health_monitoring +android.car.feature.display_compatibility +android.car.feature.handle_property_events_in_binder_thread +android.car.feature.persist_ap_settings +android.car.feature.projection_query_bt_profile_inhibit +android.car.feature.serverless_remote_access +android.car.feature.subscription_with_resolution +android.car.feature.supports_secure_passenger_users +android.car.feature.switch_user_ignoring_uxr +android.car.feature.variable_update_rate +android.car.feature.visible_background_user_restrictions +android.companion.new_association_builder +android.companion.ongoing_perm_sync +android.companion.virtualdevice.flags.camera_multiple_input_streams +android.companion.virtualdevice.flags.notifications_for_device_streaming +android.content.pm.get_package_storage_stats +android.content.res.layout_readwrite_flags +android.content.res.resources_minor_version_support +android.content.res.rro_control_for_android_no_overlayable +android.content.res.self_targeting_android_resource_frro +android.content.res.system_context_handle_app_info_changed +android.credentials.flags.settings_activity_enabled +android.hardware.biometrics.screen_off_unlock_udfps +android.hardware.devicestate.feature.flags.device_state_property_migration +android.hardware.devicestate.feature.flags.device_state_rdm_v2 +android.hardware.devicestate.feature.flags.device_state_requester_cancel_state +android.hardware.usb.flags.enable_interface_name_device_filter +android.hardware.usb.flags.enable_is_mode_change_supported_api +android.media.audio.focus_exclusive_with_recording +android.media.audio.focus_freeze_test_api +android.media.audio.foreground_audio_control +android.media.audio.hardening_permission_api +android.media.audio.hardening_permission_spa +android.media.audio.ro_foreground_audio_control +android.media.audiopolicy.audio_mix_test_api +android.media.codec.aidl_hal_input_surface +android.media.swcodec.flags.apv_software_codec +android.media.swcodec.flags.mpeg2_keep_threads_active +android.media.tv.flags.enable_le_audio_broadcast_ui +android.media.tv.flags.enable_le_audio_unicast_ui +android.media.tv.flags.hdmi_control_collect_physical_address +android.media.tv.flags.hdmi_control_enhanced_behavior +android.media.tv.flags.tif_unbind_inactive_tis +android.multiuser.enable_biometrics_to_unlock_private_space +android.net.platform.flags.mdns_improvement_for_25q2 +android.nfc.nfc_persist_log +android.nfc.nfc_watchdog +android.os.adpf_graphics_pipeline +android.os.android_os_build_vanilla_ice_cream +android.os.battery_saver_supported_check_api +android.os.network_time_uses_shared_memory +android.os.profiling.persist_queue +android.os.profiling.redaction_enabled +android.permission.flags.allow_host_permission_dialogs_on_virtual_devices +android.permission.flags.device_aware_permissions_enabled +android.permission.flags.device_policy_management_role_split_create_managed_profile_enabled +android.permission.flags.enable_aiai_proxied_text_classifiers +android.permission.flags.enable_otp_in_text_classifiers +android.permission.flags.enable_sqlite_appops_accesses +android.permission.flags.location_bypass_privacy_dashboard_enabled +android.permission.flags.note_op_batching_enabled +android.permission.flags.permission_request_short_circuit_enabled +android.permission.flags.rate_limit_batched_note_op_async_callbacks_enabled +android.permission.flags.sensitive_notification_app_protection +android.permission.flags.supervision_role_permission_update_enabled +android.permission.flags.unknown_call_package_install_blocking_enabled +android.permission.flags.updatable_text_classifier_for_otp_detection_enabled +android.permission.flags.use_profile_labels_for_default_app_section_titles +android.permission.flags.wallet_role_cross_user_enabled +android.provider.allow_config_maximum_call_log_entries_per_sim +android.provider.backup_tasks_settings_screen +android.provider.flags.new_storage_writer_system_api +android.service.autofill.fill_dialog_improvements_impl +android.service.chooser.fix_resolver_memory_leak +android.service.notification.redact_sensitive_notifications_big_text_style +android.service.notification.redact_sensitive_notifications_from_untrusted_listeners +android.view.accessibility.motion_event_observing +android.view.flags.expected_presentation_time_api +android.view.flags.toolkit_frame_rate_touch_boost_25q1 +android.view.inputmethod.concurrent_input_methods +android.view.inputmethod.ime_switcher_revamp +android.view.inputmethod.imm_userhandle_hostsidetests +android.webkit.mainline_apis +android.widget.flags.use_wear_material3_ui +com.android.aconfig.test.disabled_rw_exported +com.android.aconfig.test.enabled_fixed_ro_exported +com.android.aconfig.test.enabled_ro_exported +com.android.aconfig.test.exported.exported_flag +com.android.aconfig.test.forcereadonly.fro_exported +com.android.adservices.ondevicepersonalization.flags.on_device_personalization_apis_enabled +com.android.appsearch.flags.app_open_event_indexer_enabled +com.android.appsearch.flags.apps_indexer_enabled +com.android.appsearch.flags.enable_app_functions_schema_parser +com.android.appsearch.flags.enable_apps_indexer_incremental_put +com.android.appsearch.flags.enable_contacts_index_first_middle_and_last_names +com.android.appsearch.flags.enable_document_limiter_replace_tracking +com.android.appsearch.flags.enable_enterprise_empty_batch_result_fix +com.android.bluetooth.flags.allow_switching_hid_and_hogp +com.android.bluetooth.flags.bt_offload_socket_api +com.android.bluetooth.flags.channel_sounding +com.android.bluetooth.flags.fix_started_module_race +com.android.bluetooth.flags.le_subrate_api +com.android.bluetooth.flags.leaudio_broadcast_monitor_source_sync_status +com.android.bluetooth.flags.leaudio_broadcast_volume_control_for_connected_devices +com.android.bluetooth.flags.leaudio_multiple_vocs_instances_api +com.android.bluetooth.flags.metadata_api_inactive_audio_device_upon_connection +com.android.bluetooth.flags.settings_can_control_hap_preset +com.android.bluetooth.flags.unix_file_socket_creation_failure +com.android.graphics.flags.icon_load_drawable_return_null_when_uri_decode_fails +com.android.graphics.hwui.flags.animated_image_drawable_filter_bitmap +com.android.hardware.input.manage_key_gestures +com.android.healthfitness.flags.activity_intensity_db +com.android.healthfitness.flags.add_missing_access_logs +com.android.healthfitness.flags.architecture_improvement +com.android.healthfitness.flags.cloud_backup_and_restore +com.android.healthfitness.flags.cycle_phases +com.android.healthfitness.flags.d2d_file_deletion_bug_fix +com.android.healthfitness.flags.dependency_injection +com.android.healthfitness.flags.development_database +com.android.healthfitness.flags.ecosystem_metrics +com.android.healthfitness.flags.ecosystem_metrics_db_changes +com.android.healthfitness.flags.export_import +com.android.healthfitness.flags.export_import_fast_follow +com.android.healthfitness.flags.export_import_nice_to_have +com.android.healthfitness.flags.expressive_theming_enabled +com.android.healthfitness.flags.health_connect_mappings +com.android.healthfitness.flags.immediate_export +com.android.healthfitness.flags.logcat_censor_iae +com.android.healthfitness.flags.new_information_architecture +com.android.healthfitness.flags.onboarding +com.android.healthfitness.flags.permission_metrics +com.android.healthfitness.flags.permission_tracker_fix_mapping_init +com.android.healthfitness.flags.personal_health_record_database +com.android.healthfitness.flags.personal_health_record_disable_d2d +com.android.healthfitness.flags.personal_health_record_disable_export_import +com.android.healthfitness.flags.personal_health_record_enable_d2d_and_export_import +com.android.healthfitness.flags.personal_health_record_entries_screen +com.android.healthfitness.flags.personal_health_record_lock_screen_banner +com.android.healthfitness.flags.personal_health_record_telemetry +com.android.healthfitness.flags.personal_health_record_telemetry_private_ww +com.android.healthfitness.flags.personal_health_record_ui_telemetry +com.android.healthfitness.flags.phr_fhir_basic_complex_type_validation +com.android.healthfitness.flags.phr_fhir_complex_type_validation +com.android.healthfitness.flags.phr_fhir_oneof_validation +com.android.healthfitness.flags.phr_fhir_primitive_type_validation +com.android.healthfitness.flags.phr_fhir_structural_validation +com.android.healthfitness.flags.phr_read_medical_resources_fix_query_limit +com.android.healthfitness.flags.phr_upsert_fix_parcel_size_calculation +com.android.healthfitness.flags.phr_upsert_fix_use_shared_memory +com.android.icu.icu_v_api +com.android.internal.telephony.flags.async_init_carrier_privileges_tracker +com.android.internal.telephony.flags.cleanup_carrier_app_update_enabled_state_logic +com.android.internal.telephony.flags.oem_enabled_satellite_phase_2 +com.android.internal.telephony.flags.remap_disconnect_cause_sip_request_cancelled +com.android.libcore.hpke_v_apis +com.android.libcore.read_only_dynamic_code_load +com.android.libcore.v_apis +com.android.media.audio.hardening_impl +com.android.media.audio.hardening_strict +com.android.media.extractor.flags.extractor_mp4_enable_apv +com.android.media.extractor.flags.extractor_sniff_midi_optimizations +com.android.media.flags.enable_cross_user_routing_in_media_router2 +com.android.media.flags.enable_notifying_activity_manager_with_media_session_status_change +com.android.media.metrics.flags.mediametrics_to_module +com.android.media.projection.flags.media_projection_connected_display +com.android.media.projection.flags.media_projection_connected_display_no_virtual_device +com.android.net.ct.flags.certificate_transparency_job +com.android.net.ct.flags.certificate_transparency_service +com.android.net.flags.restrict_local_network +com.android.net.flags.tethering_active_sessions_metrics +com.android.net.thread.flags.thread_mobile_enabled +com.android.nfc.module.flags.nfc_hce_latency_events +com.android.org.conscrypt.flags.certificate_transparency_checkservertrusted_api +com.android.permission.flags.add_banners_to_privacy_sensitive_apps_for_aaos +com.android.permission.flags.app_permission_fragment_uses_preferences +com.android.permission.flags.archiving_read_only +com.android.permission.flags.decluttered_permission_manager_enabled +com.android.permission.flags.enable_coarse_fine_location_prompt_for_aaos +com.android.permission.flags.enhanced_confirmation_backport_enabled +com.android.permission.flags.expressive_design_enabled +com.android.permission.flags.livedata_refactor_permission_timeline_enabled +com.android.permission.flags.odad_notifications_supported +com.android.permission.flags.permission_timeline_attribution_label_fix +com.android.permission.flags.private_profile_supported +com.android.permission.flags.safety_center_enabled_no_device_config +com.android.permission.flags.safety_center_issue_only_affects_group_status +com.android.permission.flags.wear_compose_material3 +com.android.permission.flags.wear_privacy_dashboard_enabled_read_only +com.android.providers.contactkeys.flags.contactkeys_strip_fix +com.android.providers.media.flags.enable_backup_and_restore +com.android.providers.media.flags.enable_malicious_app_detector +com.android.providers.media.flags.enable_mark_media_as_favorite_api +com.android.providers.media.flags.enable_modern_photopicker +com.android.providers.media.flags.enable_photopicker_search +com.android.providers.media.flags.enable_photopicker_transcoding +com.android.providers.media.flags.enable_stable_uris_for_external_primary_volume +com.android.providers.media.flags.enable_stable_uris_for_public_volume +com.android.providers.media.flags.enable_unicode_check +com.android.providers.media.flags.index_media_latitude_longitude +com.android.providers.media.flags.version_lockdown +com.android.ranging.flags.ranging_stack_updates_25q4 +com.android.server.backup.enable_read_all_external_storage_files +com.android.server.telecom.flags.allow_system_apps_resolve_voip_calls +com.android.server.telecom.flags.telecom_app_label_proxy_hsum_aware +com.android.server.telecom.flags.telecom_main_user_in_block_check +com.android.server.telecom.flags.telecom_main_user_in_get_respond_message_app +com.android.server.updates.certificate_transparency_installer +com.android.system.virtualmachine.flags.terminal_gui_support +com.android.tradeinmode.flags.enable_trade_in_mode +com.android.update_engine.minor_changes_2025q4 +com.android.uwb.flags.uwb_fira_3_0_25q4 +com.android.wifi.flags.network_provider_battery_charging_status +com.android.wifi.flags.p2p_dialog2 +com.android.wifi.flags.shared_connectivity_broadcast_receiver_test_api +com.android.wifi.flags.wep_disabled_in_apm +com.android.window.flags.untrusted_embedding_state_sharing +vendor.vibrator.hal.flags.enable_pwle_v2 +vendor.vibrator.hal.flags.remove_capo
\ No newline at end of file diff --git a/tools/aconfig/exported_flag_check/allow_list.txt b/tools/aconfig/exported_flag_check/allow_package_list.txt index e69de29bb2..e69de29bb2 100644 --- a/tools/aconfig/exported_flag_check/allow_list.txt +++ b/tools/aconfig/exported_flag_check/allow_package_list.txt diff --git a/tools/aconfig/exported_flag_check/src/utils.rs b/tools/aconfig/exported_flag_check/src/utils.rs index 2c30424067..3686fec739 100644 --- a/tools/aconfig/exported_flag_check/src/utils.rs +++ b/tools/aconfig/exported_flag_check/src/utils.rs @@ -60,9 +60,15 @@ pub(crate) fn get_exported_flags_from_binary_proto<R: Read>( Ok(HashSet::from_iter(iter)) } -fn get_allow_list() -> Result<HashSet<FlagId>> { +fn get_allow_flag_list() -> Result<HashSet<FlagId>> { let allow_list: HashSet<FlagId> = - include_str!("../allow_list.txt").lines().map(|x| x.into()).collect(); + include_str!("../allow_flag_list.txt").lines().map(|x| x.into()).collect(); + Ok(allow_list) +} + +fn get_allow_package_list() -> Result<HashSet<FlagId>> { + let allow_list: HashSet<FlagId> = + include_str!("../allow_package_list.txt").lines().map(|x| x.into()).collect(); Ok(allow_list) } @@ -73,7 +79,9 @@ pub(crate) fn check_all_exported_flags( all_flags: &HashSet<FlagId>, already_finalized_flags: &HashSet<FlagId>, ) -> Result<Vec<FlagId>> { - let allow_list = get_allow_list()?; + let allow_flag_list = get_allow_flag_list()?; + let allow_package_list = get_allow_package_list()?; + let new_flags: Vec<FlagId> = all_flags .difference(flags_used_with_flaggedapi_annotation) .cloned() @@ -81,11 +89,19 @@ pub(crate) fn check_all_exported_flags( .difference(already_finalized_flags) .cloned() .collect::<HashSet<_>>() - .difference(&allow_list) + .difference(&allow_flag_list) + .filter(|flag| { + if let Some(last_dot_index) = flag.rfind('.') { + let package_name = &flag[..last_dot_index]; + !allow_package_list.contains(package_name) + } else { + true + } + }) .cloned() .collect(); - Ok(new_flags.into_iter().collect()) + Ok(new_flags) } #[cfg(test)] diff --git a/tools/aconfig/fake_device_config/src/android/os/Build.java b/tools/aconfig/fake_device_config/src/android/os/Build.java index 790ff82ad1..8ec72fb2dc 100644 --- a/tools/aconfig/fake_device_config/src/android/os/Build.java +++ b/tools/aconfig/fake_device_config/src/android/os/Build.java @@ -18,9 +18,6 @@ package android.os; public class Build { public static class VERSION { - public static final int SDK_INT = placeholder(); - private static int placeholder() { - throw new UnsupportedOperationException("Stub!"); - } + public static final int SDK_INT = 0; } } diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index b6c96c4bf3..08b4d6aa50 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -49,8 +49,8 @@ BYTES_IN_MB = 1024 * 1024 # Use a fixed timestamp (01/01/2009 00:00:00 UTC) for files when packaging # images. (b/24377993, b/80600931) FIXED_FILE_TIMESTAMP = int(( - datetime.datetime(2009, 1, 1, 0, 0, 0, 0, None) - - datetime.datetime.utcfromtimestamp(0)).total_seconds()) + datetime.datetime(2009, 1, 1, 0, 0, 0, 0, datetime.UTC) - + datetime.datetime.fromtimestamp(0, datetime.UTC)).total_seconds()) class BuildImageError(Exception): diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index b6cbb15222..e5f5f92b6d 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -2993,7 +2993,7 @@ def ZipWrite(zip_file, filename, arcname=None, perms=0o644, os.chmod(filename, perms) # Use a fixed timestamp so the output is repeatable. - # Note: Use of fromtimestamp rather than utcfromtimestamp here is + # Note: Use of fromtimestamp without specifying a timezone here is # intentional. zip stores datetimes in local time without a time zone # attached, so we need "epoch" but in the local time zone to get 2009/01/01 # in the zip archive. |