Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f50484fe authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

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
parent a54cf01e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment