Remove sdk_version if platform_apis is set
This CL is to make `android_test` and `android_test_helper_app` more consistent with documentation which suggests sdk_version must be empty if platform_apis is set.
https://cs.android.com/android/platform/superproject/+/master:build/soong/java/base.go;bpv=1;bpt=1;l=211?gsn=Platform_apis&gs=kythe%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fsuperproject%3Flang%3Dgo%3Fpath%3Dbuild%2Fsoong%2Fjava%23field%2520DeviceProperties.Platform_apis
Next step:
* Add validation to error when both `sdk_version` and `platform_apis` are set. WIP: aosp/2065270
Test: The affected test modules are FramefworksCoreTests, BugreportManagerTestCases, FrameworksCorePackageInstallerSessionsTests , and PackageManagerServiceHostTests. Some tests in FrameworksCorePackageInstallerSessionsTests and PackageManagerServiceHostTests fail but this CL doesn't produce any regression from the last known build. In other words, the last known build also has the same test failures.
Bug: 219755537
Change-Id: I50405b37b7454a78f1dbd240380d2e98b8bb34b2
diff --git a/core/tests/PackageInstallerSessions/Android.bp b/core/tests/PackageInstallerSessions/Android.bp
index c112cbb..de2a013 100644
--- a/core/tests/PackageInstallerSessions/Android.bp
+++ b/core/tests/PackageInstallerSessions/Android.bp
@@ -51,6 +51,5 @@
],
platform_apis: true,
- sdk_version: "core_platform",
test_suites: ["device-tests"],
}
diff --git a/core/tests/bugreports/Android.bp b/core/tests/bugreports/Android.bp
index f87797a..43a9679 100644
--- a/core/tests/bugreports/Android.bp
+++ b/core/tests/bugreports/Android.bp
@@ -35,7 +35,6 @@
"truth-prebuilt",
],
test_suites: ["general-tests"],
- sdk_version: "test_current",
platform_apis: true,
}
diff --git a/core/tests/coretests/Android.bp b/core/tests/coretests/Android.bp
index 05ec00f..b521184 100644
--- a/core/tests/coretests/Android.bp
+++ b/core/tests/coretests/Android.bp
@@ -73,7 +73,6 @@
],
platform_apis: true,
- sdk_version: "core_platform",
test_suites: ["device-tests"],
certificate: "platform",
diff --git a/services/tests/PackageManagerServiceTests/host/test-apps/DeviceSide/Android.bp b/services/tests/PackageManagerServiceTests/host/test-apps/DeviceSide/Android.bp
index 7e4f0e7..0a03338 100644
--- a/services/tests/PackageManagerServiceTests/host/test-apps/DeviceSide/Android.bp
+++ b/services/tests/PackageManagerServiceTests/host/test-apps/DeviceSide/Android.bp
@@ -25,7 +25,6 @@
android_test_helper_app {
name: "PackageManagerServiceDeviceSideTests",
- sdk_version: "test_current",
srcs: ["src/**/*.kt"],
libs: [
"android.test.base",