Merge "Specify is_stubs_module property in selected aconfig library modules" into main
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 915f55f..5fc8fd4 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -71,11 +71,6 @@
endif
endif
-# TODO(b/308187800): some internal modules set `prefer` to true on the prebuilt apex module,
-# and set that to false when `ANDROID.module_build_from_source` is true.
-# Set this soong config variable to true for now, and cleanup `prefer` as part of b/308187800
-$(call add_soong_config_var_value,ANDROID,module_build_from_source,true)
-
# Enable SystemUI optimizations by default unless explicitly set.
SYSTEMUI_OPTIMIZE_JAVA ?= true
$(call add_soong_config_var,ANDROID,SYSTEMUI_OPTIMIZE_JAVA)
diff --git a/core/java_prebuilt_internal.mk b/core/java_prebuilt_internal.mk
index 46393ac..4b6eea7 100644
--- a/core/java_prebuilt_internal.mk
+++ b/core/java_prebuilt_internal.mk
@@ -172,6 +172,12 @@
endif
endif
+# transitive-res-packages is only populated for Soong modules for now, but needs
+# to exist so that other Make modules can depend on it. Create an empty file.
+my_transitive_res_packages := $(intermediates.COMMON)/transitive-res-packages
+$(my_transitive_res_packages):
+ touch $@
+
my_res_package := $(intermediates.COMMON)/package-res.apk
# We needed only very few PRIVATE variables and aapt2.mk input variables. Reset the unnecessary ones.
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 37601a1..797b14c 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -355,6 +355,11 @@
$(call add_json_str, EnableUffdGc, $(_config_enable_uffd_gc))
_config_enable_uffd_gc :=
+$(call add_json_list, DeviceFrameworkCompatibilityMatrixFile, $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE))
+$(call add_json_list, DeviceProductCompatibilityMatrixFile, $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE))
+$(call add_json_list, BoardAvbSystemAddHashtreeFooterArgs, $(BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS))
+$(call add_json_bool, BoardAvbEnable, $(filter true,$(BOARD_AVB_ENABLE)))
+
$(call json_end)
$(file >$(SOONG_VARIABLES).tmp,$(json_contents))
diff --git a/tools/aconfig/aconfig/src/codegen/java.rs b/tools/aconfig/aconfig/src/codegen/java.rs
index a74ef85..dbc4ab5 100644
--- a/tools/aconfig/aconfig/src/codegen/java.rs
+++ b/tools/aconfig/aconfig/src/codegen/java.rs
@@ -698,6 +698,8 @@
StorageInternalReader reader;
boolean readFromNewStorage;
+ boolean useNewStorageValueAndDiscardOld = false;
+
private final static String TAG = "AconfigJavaCodegen";
private final static String SUCCESS_LOG = "success: %s value matches";
private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s";
@@ -713,6 +715,9 @@
reader = null;
}
}
+
+ useNewStorageValueAndDiscardOld =
+ DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false);
}
private void load_overrides_aconfig_test() {
@@ -746,7 +751,7 @@
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRw", val, disabledRw));
}
- if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) {
+ if (useNewStorageValueAndDiscardOld) {
disabledRw = val;
}
@@ -757,7 +762,7 @@
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwExported", val, disabledRwExported));
}
- if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) {
+ if (useNewStorageValueAndDiscardOld) {
disabledRwExported = val;
}
@@ -768,7 +773,7 @@
Log.i(TAG, String.format(MISMATCH_LOG, "enabledRw", val, enabledRw));
}
- if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) {
+ if (useNewStorageValueAndDiscardOld) {
enabledRw = val;
}
@@ -805,7 +810,7 @@
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwInOtherNamespace", val, disabledRwInOtherNamespace));
}
- if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) {
+ if (useNewStorageValueAndDiscardOld) {
disabledRwInOtherNamespace = val;
}
diff --git a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
index 96e7623..9970b1f 100644
--- a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
+++ b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
@@ -35,6 +35,8 @@
StorageInternalReader reader;
boolean readFromNewStorage;
+ boolean useNewStorageValueAndDiscardOld = false;
+
private final static String TAG = "AconfigJavaCodegen";
private final static String SUCCESS_LOG = "success: %s value matches";
private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s";
@@ -50,6 +52,9 @@
reader = null;
}
}
+
+ useNewStorageValueAndDiscardOld =
+ DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false);
}
{{ -endif }}
@@ -91,7 +96,7 @@
Log.i(TAG, String.format(MISMATCH_LOG, "{flag.method_name}", val, {flag.method_name}));
}
- if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) \{
+ if (useNewStorageValueAndDiscardOld) \{
{flag.method_name} = val;
}
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 6cec380..5d942b5 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -933,7 +933,7 @@
else:
logger.warning(
"Failed to find %s fro %s", filename, prop)
- del d[key_name]
+ del d[prop]
# Redirect erofs_[default_]compress_hints files
redirect_file("erofs_default_compress_hints",