Merge "Don't disable dexpreopt for an unbundled build."
diff --git a/core/Makefile b/core/Makefile
index 0503c35..305488f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1275,7 +1275,7 @@
$(AVBTOOL) add_hash_footer \
--image $@ \
$(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \
- --partition_name boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \
+ --partition_name init_boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),)
diff --git a/core/product_config.rbc b/core/product_config.rbc
index da8209b..97c1d00 100644
--- a/core/product_config.rbc
+++ b/core/product_config.rbc
@@ -462,6 +462,9 @@
def __words(string_or_list):
if type(string_or_list) == "list":
+ for x in string_or_list:
+ if type(x) != "string":
+ return string_or_list
string_or_list = " ".join(string_or_list)
return _mkstrip(string_or_list).split()
diff --git a/core/proguard.flags b/core/proguard.flags
index 53f63d8..d790061 100644
--- a/core/proguard.flags
+++ b/core/proguard.flags
@@ -9,14 +9,19 @@
# Add this flag in your package's own configuration if it's needed.
#-flattenpackagehierarchy
-# Keep classes and methods that have @VisibleForTesting annotations, except in
-# intermediate libraries that export those annotations (e.g., androidx, guava).
-# This avoids keeping library-specific test code that isn't actually needed
-# for platform testing.
+# Keep classes and members with the platform-defined @VisibleForTesting annotation.
+-keep @com.android.internal.annotations.VisibleForTesting class *
+-keepclassmembers class * {
+ @com.android.internal.annotations.VisibleForTesting *;
+}
+
+# Keep classes and members with non-platform @VisibleForTesting annotations, but
+# only within platform-defined packages. This avoids keeping external, library-specific
+# test code that isn't actually needed for platform testing.
# TODO(b/239961360): Migrate away from androidx.annotation.VisibleForTesting
# and com.google.common.annotations.VisibleForTesting use in platform code.
--keep @**.VisibleForTesting class !androidx.**,!com.google.common.**,*
--keepclassmembers class !androidx.**,!com.google.common.**,* {
+-keep @**.VisibleForTesting class android.**,com.android.**,com.google.android.**
+-keepclassmembers class android.**,com.android.**,com.google.android.** {
@**.VisibleForTesting *;
}
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags
index ea200c1..7e7b270 100644
--- a/core/proguard_basic_keeps.flags
+++ b/core/proguard_basic_keeps.flags
@@ -83,14 +83,13 @@
# 1) runtime-visible annotations will still be kept, and 2) compile-time
# annotations are stripped by R8 anyway.
# Note: The ** prefix is used to accommodate jarjar repackaging.
-# TODO(b/266561579): Remove this exemptions after resolving jarjar-ed transitive libs
+# TODO(b/242088131): Remove these exemptions after resolving transitive libs
+# dependencies that are provided to R8.
-dontwarn **android**.annotation*.**
-
-# These classes generate warnings of the kind `Library class extends program class`
-# because some apps have deps that statically include the same libraries as the app,
-# and r8 complains that a library is implementing a class provided by the app (the "program").
--dontwarn com.google.protobuf.**
--dontwarn kotlin.reflect.jvm.internal.ReflectionFactoryImpl
+-dontwarn **com.google.errorprone.annotations.**
+-dontwarn javax.annotation.**
+-dontwarn org.checkerframework.**
+-dontwarn org.jetbrains.annotations.**
# Less spammy.
-dontnote
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index e6a96ff..a664b9d 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -103,7 +103,7 @@
# It must be of the form "YYYY-MM-DD" on production devices.
# It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
- PLATFORM_SECURITY_PATCH := 2023-01-05
+ PLATFORM_SECURITY_PATCH := 2023-02-05
endif
include $(BUILD_SYSTEM)/version_util.mk
diff --git a/envsetup.sh b/envsetup.sh
index 32e1a32..0272624 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1881,11 +1881,6 @@
color_reset=""
fi
- if [[ "x${USE_RBE}" == "x" && $mins -gt 15 && "${ANDROID_BUILD_ENVIRONMENT_CONFIG}" == "googler" ]]; then
- echo
- echo "${color_warning}Start using RBE (http://go/build-fast) to get faster builds!${color_reset}"
- fi
-
echo
if [ $ret -eq 0 ] ; then
echo -n "${color_success}#### build completed successfully "
diff --git a/tests/run.rbc b/tests/run.rbc
index 1b51719..33583eb 100644
--- a/tests/run.rbc
+++ b/tests/run.rbc
@@ -46,6 +46,11 @@
assert_eq("a b c", rblf.mkstrip(" a b \n c \t"))
assert_eq("1", rblf.mkstrip("1 "))
+assert_eq(["a", "b"], rblf.words("a b"))
+assert_eq(["a", "b", "c"], rblf.words(["a b", "c"]))
+# 1-tuple like we use in product variables
+assert_eq(["a b", ("c",)], rblf.words(["a b", ("c",)]))
+
assert_eq("b1 b2", rblf.mksubst("a", "b", "a1 a2"))
assert_eq(["b1", "x2"], rblf.mksubst("a", "b", ["a1", "x2"]))
diff --git a/tools/signapk/Android.bp b/tools/signapk/Android.bp
index bee6a6f..c4f25f8 100644
--- a/tools/signapk/Android.bp
+++ b/tools/signapk/Android.bp
@@ -31,6 +31,10 @@
"conscrypt-unbundled",
],
+ // b/267608166: Prevent target Java 17 so the host-side tool can run in an
+ // environment where JDK 11 is available.
+ java_version: "11",
+
jni_libs: ["libconscrypt_openjdk_jni"],
// The post-build signing tools need signapk.jar (and its shared libraries,