From ff9e640e435c5cec869758459fd76982e10ca1d6 Mon Sep 17 00:00:00 2001 From: Zhi Dou Date: Fri, 9 Dec 2022 22:30:57 +0000 Subject: [PATCH] Replace "apex_inherit" min_sdk_version Replace "apex_inherit" min_sdk_version to a conditional setting. If environment veriable KEEP_APEX_INHERIT is set, using "apex_inherit" as the min_sdk_version, otherwise set the number to "29". For more detail please refer https://docs.google.com/document/d/1R2vZw0cQa-haAMgFyQ682uSq9aGBNQrzMHKIsU17-XY/edit?usp=sharing&resourcekey=0-gUbs463r9LCKs7vdP_Xkmg Test: build APEX uses this library, and presubmit Bug: 254634795 Change-Id: If7acfce5fb2e1cb1cc7208a8c57b1e1cd1499c11 Merged-In: Ie6984128e6b84ba73de3f4c08eca5560657c5ca2 --- libutils/Android.bp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libutils/Android.bp b/libutils/Android.bp index b07058a52..162f0f44b 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -21,11 +21,13 @@ cc_library_headers { vendor_ramdisk_available: true, host_supported: true, native_bridge_supported: true, + defaults: [ + "apex-lowest-min-sdk-version", + ], apex_available: [ "//apex_available:platform", "//apex_available:anyapex", ], - min_sdk_version: "apex_inherit", header_libs: [ "libbase_headers", @@ -124,7 +126,10 @@ cc_defaults { cc_defaults { name: "libutils_impl_defaults", - defaults: ["libutils_defaults"], + defaults: [ + "libutils_defaults", + "apex-lowest-min-sdk-version", + ], native_bridge_supported: true, srcs: [ @@ -167,7 +172,6 @@ cc_defaults { "//apex_available:anyapex", "//apex_available:platform", ], - min_sdk_version: "apex_inherit", afdo: true, }