Merge "Run apex_sepolicy_tests with erofs apexes" into main
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 862fcb2..73831dc 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -39,6 +39,8 @@
$(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_DRMSERVER)
$(call add_soong_config_var,ANDROID,TARGET_ENABLE_MEDIADRM_64)
$(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_MEDIASERVER)
+$(call soong_config_set_bool,ANDROID,TARGET_SUPPORTS_32_BIT_APPS,$(if $(TARGET_SUPPORTS_32_BIT_APPS),true,false))
+$(call soong_config_set_bool,ANDROID,TARGET_SUPPORTS_64_BIT_APPS,$(if $(TARGET_SUPPORTS_64_BIT_APPS),true,false))
$(call add_soong_config_var,ANDROID,BOARD_GENFS_LABELS_VERSION)
$(call add_soong_config_var,ANDROID,ADDITIONAL_M4DEFS,$(if $(BOARD_SEPOLICY_M4DEFS),$(addprefix -D,$(BOARD_SEPOLICY_M4DEFS))))
diff --git a/core/product_config.mk b/core/product_config.mk
index f93b63c..d18770b 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -485,9 +485,7 @@
# Show a warning wall of text if non-compliance-GSI products set this option.
ifdef PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
- ifeq (,$(filter gsi_arm gsi_arm64 gsi_arm64_soong_system gsi_x86 gsi_x86_64 \
- gsi_x86_64_soong_system gsi_car_arm64 gsi_car_x86_64 \
- gsi_tv_arm gsi_tv_arm64,$(PRODUCT_NAME)))
+ ifeq (,$(filter gsi_arm gsi_arm64 gsi_x86 gsi_x86_64 gsi_car_arm64 gsi_car_x86_64 gsi_tv_arm gsi_tv_arm64,$(PRODUCT_NAME)))
$(warning PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT is set but \
PRODUCT_NAME ($(PRODUCT_NAME)) doesn't look like a GSI for compliance \
testing. This is a special configuration for compliance GSI, so do make \
diff --git a/core/proguard.flags b/core/proguard.flags
index 5148e56..dc32e15 100644
--- a/core/proguard.flags
+++ b/core/proguard.flags
@@ -1,14 +1,3 @@
-# We have moved -dontobfuscate and -dontoptimize to the makefiles.
-# dex does not like code run through proguard optimize and preverify steps.
-# -dontoptimize
--dontpreverify
-
-# Don't obfuscate. We only need dead code striping.
-# -dontobfuscate
-
-# Add this flag in your package's own configuration if it's needed.
-#-flattenpackagehierarchy
-
# Keep classes and members with the platform-defined @VisibleForTesting annotation.
-keep @com.android.internal.annotations.VisibleForTesting class *
-keepclassmembers class * {
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags
index f6b34b8..a9416d5 100644
--- a/core/proguard_basic_keeps.flags
+++ b/core/proguard_basic_keeps.flags
@@ -1,7 +1,3 @@
-# Some classes in the libraries extend package private classes to chare common functionality
-# that isn't explicitly part of the API
--dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers
-
# Preserve line number information for debugging stack traces.
-keepattributes SourceFile,LineNumberTable
diff --git a/core/soong_config.mk b/core/soong_config.mk
index ba59f5e..adfdb9c 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -547,6 +547,8 @@
$(call add_json_str, brightness_dimmed_percent, $(TARGET_RECOVERY_UI_BRIGHTNESS_DIMMED))
$(call end_json_map)
+ $(call add_json_str, PrebuiltBootloader, $(BOARD_PREBUILT_BOOTLOADER))
+
$(call end_json_map)
# For converting vintf_data
diff --git a/packaging/distdir.mk b/packaging/distdir.mk
index 153ecf6..97ed95a 100644
--- a/packaging/distdir.mk
+++ b/packaging/distdir.mk
@@ -45,5 +45,3 @@
endif
copy-one-dist-file :=
-DIST_GOAL_OUTPUT_PAIRS :=
-DIST_SRC_DST_PAIRS :=
diff --git a/packaging/main_soong_only.mk b/packaging/main_soong_only.mk
new file mode 100644
index 0000000..f29e5f6
--- /dev/null
+++ b/packaging/main_soong_only.mk
@@ -0,0 +1,60 @@
+# Copyright (C) 2025 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.
+
+ifndef KATI
+$(error Only Kati is supported.)
+endif
+
+$(info [1/4] initializing packaging system ...)
+
+.KATI_READONLY := KATI_PACKAGE_MK_DIR
+
+include build/make/common/core.mk
+include build/make/common/strings.mk
+
+# Define well-known goals and their dependency graph that they've
+# traditionally had in make builds. Also it's important to define
+# droid first so that it's built by default.
+
+.PHONY: droid
+droid: droid_targets
+
+.PHONY: droid_targets
+droid_targets: droidcore dist_files
+
+.PHONY: dist_files
+dist_files:
+
+.PHONY: droidcore
+droidcore: droidcore-unbundled
+
+.PHONY: droidcore-unbundled
+droidcore-unbundled:
+
+$(info [2/4] including distdir.mk ...)
+
+include build/make/packaging/distdir.mk
+
+$(info [3/4] defining phony modules ...)
+
+include $(OUT_DIR)/soong/soong_phony_targets.mk
+
+goals := $(sort $(foreach pair,$(DIST_GOAL_OUTPUT_PAIRS),$(call word-colon,1,$(pair))))
+$(foreach goal,$(goals), \
+ $(eval .PHONY: $$(goal)) \
+ $(eval $$(goal):) \
+ $(if $(call streq,$(DIST),true),\
+ $(eval $$(goal): _dist_$$(goal))))
+
+$(info [4/4] writing packaging rules ...)
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index b3b58d3..90d45a8 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -52,7 +52,7 @@
com.android.adbd \
com.android.adservices \
com.android.appsearch \
- com.android.btservices \
+ com.android.bt \
com.android.configinfrastructure \
com.android.conscrypt \
com.android.devicelock \
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index d857e04..e543ccf 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -65,7 +65,7 @@
com.android.adservices:framework-adservices \
com.android.adservices:framework-sdksandbox \
com.android.appsearch:framework-appsearch \
- com.android.btservices:framework-bluetooth \
+ com.android.bt:framework-bluetooth \
com.android.configinfrastructure:framework-configinfrastructure \
com.android.conscrypt:conscrypt \
com.android.devicelock:framework-devicelock \
@@ -171,7 +171,7 @@
# Keep the list sorted by module names and then library names.
# Note: For modules available in Q, DO NOT add new entries here.
PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS := \
- com.android.btservices:service-bluetooth \
+ com.android.bt:service-bluetooth \
com.android.devicelock:service-devicelock \
com.android.os.statsd:service-statsd \
com.android.scheduling:service-scheduling \
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index 115b355..c288ad0 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -27,6 +27,7 @@
#
BUILDING_GSI := true
+$(call soong_config_set_bool,gsi,building_gsi,true)
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/etc/init/config \
diff --git a/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt b/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt
index af73a84..aad2b23 100644
--- a/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt
+++ b/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt
@@ -1,7 +1,7 @@
"/apex/com.android.adservices/etc/aconfig_flags.pb",
"/apex/com.android.appsearch/etc/aconfig_flags.pb",
"/apex/com.android.art/etc/aconfig_flags.pb",
-"/apex/com.android.btservices/etc/aconfig_flags.pb",
+"/apex/com.android.bt/etc/aconfig_flags.pb",
"/apex/com.android.cellbroadcast/etc/aconfig_flags.pb",
"/apex/com.android.configinfrastructure/etc/aconfig_flags.pb",
"/apex/com.android.conscrypt/etc/aconfig_flags.pb",
diff --git a/tools/perf/benchmarks b/tools/perf/benchmarks
index 6998ecd..4fdb8c2 100755
--- a/tools/perf/benchmarks
+++ b/tools/perf/benchmarks
@@ -786,6 +786,14 @@
preroll=1,
postroll=2,
),
+ Benchmark(id="add_systemui_field_with_tests",
+ title="Add SystemUI field with tests",
+ change=AddJavaField("frameworks/base/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java",
+ "public"),
+ modules=["SystemUiRavenTests"],
+ preroll=1,
+ postroll=2,
+ ),
]
def _error(self, message):