cameraservice: Use ro.board.api_level instead of ro.vndk.version
With trunk stable, ro.vndk.version has been deprecated and replaced
by ro.board.api_level to represent the API version that the vendor
parition is built against.
From Android V onwards, instead of using the SDK version,
ro.board.api_level will store the API level in YYYYMM format.
So Android V will be designated 202404.
This CL updates the logic in CameraService to map the new
YYYYMM values back to SDK API level that is used to filter
CameraMetadata keys.
Bug: 312315580
Test: Manually verified that the mapping is correct.
Change-Id: I569760223e7f1fac4e747339f129bd86c3aa6af1
diff --git a/services/camera/libcameraservice/aidl/AidlUtils.cpp b/services/camera/libcameraservice/aidl/AidlUtils.cpp
index f5d68eb..f2d1414 100644
--- a/services/camera/libcameraservice/aidl/AidlUtils.cpp
+++ b/services/camera/libcameraservice/aidl/AidlUtils.cpp
@@ -310,8 +310,8 @@
status_t filterVndkKeys(int vndkVersion, CameraMetadata &metadata, bool isStatic) {
if (vndkVersion == __ANDROID_API_FUTURE__) {
- // VNDK version in ro.vndk.version is a version code-name that
- // corresponds to the current version.
+ // VNDK version derived from ro.board.api_level is a version code-name that
+ // corresponds to the current SDK version.
return OK;
}
const auto &apiLevelToKeys =