Fix sdk_version: "system_current" when Platform_sdk_final=true

When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final
becomes true, which causes the return value of sdkVersionToNumber
for "system_current" to a real version number instead of
FutureApiLevel.  This enables the check against
PlatformSystemSdkVersions, which doesn't contain "current".  Use
the numeric value instead.

Fixes: 129786845
Test: sdk_test.go
Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
This commit is contained in:
Colin Cross
2019-04-02 16:10:56 -07:00
parent 9a4f3f7ea8
commit ff0daf4ccf
5 changed files with 66 additions and 25 deletions

View File

@@ -138,6 +138,9 @@ func testContext(config android.Config, bp string,
"prebuilts/sdk/17/public/android.jar": nil,
"prebuilts/sdk/17/public/framework.aidl": nil,
"prebuilts/sdk/17/system/android.jar": nil,
"prebuilts/sdk/25/public/android.jar": nil,
"prebuilts/sdk/25/public/framework.aidl": nil,
"prebuilts/sdk/25/system/android.jar": nil,
"prebuilts/sdk/current/core/android.jar": nil,
"prebuilts/sdk/current/public/android.jar": nil,
"prebuilts/sdk/current/public/framework.aidl": nil,