Updated the logic to determine the VSR API level for device ID
attestation tests.
The following order of precedence is used to determine the VSR API level:
1. If the `ro.vendor.api_level` property is present, then use it as the
VSR API level.
2. Otherwise, determine the VSR API level with the following logic:
- Get the vendor API level using the `ro.board.api_level` property if
present; otherwise, use the `ro.board.first_api_level` property.
- Get the product API level using the `ro.product.first_api_level`
property if present; otherwise, use the `ro.build.version.sdk`
property.
- If it is unable to determine the vendor API level, then use the
product API level as the VSR API level.
- If both the vendor API level and product API level are available,
then use the minimum of `vendor_api_level` and `product_api_level`
as the VSR API level.
- Otherwise, the vendor API level will be used as the VSR API level.
Bug: 326675646
Test: atest keystore2_client_tests
(cherry picked from https://android-review.googlesource.com/q/commit:3f6c8a250de737a3cc9571b047ff8a156c2b4754)
Merged-In: I3aa48d05f367fafab5151fa7eb6dd447840dae0d
Change-Id: I3aa48d05f367fafab5151fa7eb6dd447840dae0d
1 file changed