Merge "make apex init .XXrc parsing honour .35rc even though we're not yet sdk=35" into main am: a1188013f3 am: 50024efd2e

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3007926

Change-Id: I02e7eb7bcc0a2ca521da1876d50d3213b4c1f31f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2024-06-14 14:52:34 +00:00 committed by Automerger Merge Worker
commit fa57c11e10

View file

@ -107,8 +107,9 @@ static Result<void> ParseRcScripts(const std::vector<std::string>& 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 {};
}