From 6a655a02d126e097a7023767f30c8b4dbe17128b Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Fri, 20 Sep 2024 13:42:23 +0900 Subject: [PATCH] Set all hostside network tests apps' target SDK to 10000. This ensures they are subject to the most restrictive target SDK restrictions and that we never have to manually increment their target SDK version. Bug: 365191921 Test: atest CtsHostsideNetworkTests Change-Id: I66e4e53720b2860094b7a4d3194a81a063b116da --- tests/cts/hostside/Android.bp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cts/hostside/Android.bp b/tests/cts/hostside/Android.bp index 0f87dc2bfe..3050d9a15e 100644 --- a/tests/cts/hostside/Android.bp +++ b/tests/cts/hostside/Android.bp @@ -27,6 +27,16 @@ java_defaults { name: "CtsHostsideNetworkTestsAllAppDefaults", platform_apis: true, min_sdk_version: "30", + // Set target SDK to 10000 so that all the test helper apps are always subject to the most + // recent (and possibly most restrictive) target SDK behaviour. Also, this matches the target + // SDK of the tests themselves, and of other tests such as CtsNetTestCases. + // Note that some of the test helper apps (e.g., CtsHostsideNetworkCapTestsAppSdk33) override + // this with older SDK versions. + // Also note that unlike android_test targets, "current" does not work: the target SDK is set to + // something like "VanillaIceCream" instead of 100000. This means that the tests will not run on + // released devices with errors such as "Requires development platform VanillaIceCream but this + // is a release platform". + target_sdk_version: "10000", } java_test_host {