From 5e88a32def8c1ba2f4661fa0ee1fff47495c0506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 19 Mar 2024 16:45:28 -0700 Subject: [PATCH] make apex init .XXrc parsing honour .35rc even though we're not yet sdk=35 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: I315cfe77c60988d8cdc8ef64bf8cb2f5c37c93db --- init/apex_init_util.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init/apex_init_util.cpp b/init/apex_init_util.cpp index 6d17f36e2..e5a7fbcc0 100644 --- a/init/apex_init_util.cpp +++ b/init/apex_init_util.cpp @@ -107,8 +107,9 @@ static Result ParseRcScripts(const std::vector& files) { } // APEXes can have versioned RC files. These should be filtered based on // SDK version. - auto filtered = FilterVersionedConfigs( - files, android::base::GetIntProperty("ro.build.version.sdk", INT_MAX)); + int sdk = android::base::GetIntProperty("ro.build.version.sdk", INT_MAX); + if (sdk < 35) sdk = 35; // aosp/main merges only into sdk=35+ (ie. __ANDROID_API_V__+) + auto filtered = FilterVersionedConfigs(files, sdk); if (filtered.empty()) { return {}; }