Enforce hidden api usage in vendor (soong)
From aosp/588578, if vendor app doesn't fill sdk_version, build scirpt overwrites system_current to sdk_version.
But there is no similar enforcement in soong.
So, as make does, sdkVersion() returns "system_current" if it is device-specific or soc-specific module. and sdk_version is not filled.
Test: pass soong test
Bug: 132780927
Change-Id: I69bb3d7bfcf7c27c2db4d0efbe046f9c7879b4bc
diff --git a/java/aar.go b/java/aar.go
index 47f6e5f..a2c203f 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -499,7 +499,7 @@
}
func (a *AARImport) sdkVersion() string {
- return String(a.properties.Sdk_version)
+ return proptools.StringDefault(a.properties.Sdk_version, defaultSdkVersion(a))
}
func (a *AARImport) minSdkVersion() string {