Use AVendorSupport_getVendorApiLevel instead of ro.board.api_level
ro.board.api_level is currently being used to get the API version the vendor partition was built against. However, ro.board.api_level is not present on all devices, and the deprecated ro.vndk.version should be used for those instead. AVendorSupport_getVendorApiLevel was added to wrap all these complications and return the API level that vendor partition is built against. This patch removes the logic to manually read system properties and replaces it with a call to AVendorSupport_getVendorApiLevel instead. libvendorsupport also provides a utility function to map the new YYYYMM format of Vendor API back to SDK version, so this patch also replaces the hardcoded logic used by cameraservice with a call to AVendorSupport_getSdkApiLevelOf. Flag: com.android.internal.camera.flags.use_system_api_for_vndk_version Bug: 312315580 Bug: 332651718 Test: Manually verified that the reported API level is correct. Test: Verified by vendors that upgrading devices report their API level correctly. Change-Id: Ifde2743a1f341931d0c15bad316ae1ebd4aacde2
Loading
Please register or sign in to comment