Merge "Make FlaggedAPI available to CtsThreadNetworkTestCases" into main

This commit is contained in:
Motomu Utsumi
2023-11-07 07:29:13 +00:00
committed by Gerrit Code Review
3 changed files with 28 additions and 0 deletions

View File

@@ -266,6 +266,7 @@ java_genrule {
":framework-connectivity-t-pre-jarjar{.jar}", ":framework-connectivity-t-pre-jarjar{.jar}",
":framework-connectivity.stubs.module_lib{.jar}", ":framework-connectivity.stubs.module_lib{.jar}",
":framework-connectivity-t.stubs.module_lib{.jar}", ":framework-connectivity-t.stubs.module_lib{.jar}",
":framework-connectivity-flagged-apis{.jar}",
"jarjar-excludes.txt", "jarjar-excludes.txt",
], ],
tools: [ tools: [
@@ -278,6 +279,7 @@ java_genrule {
"--prefix android.net.connectivity " + "--prefix android.net.connectivity " +
"--apistubs $(location :framework-connectivity.stubs.module_lib{.jar}) " + "--apistubs $(location :framework-connectivity.stubs.module_lib{.jar}) " +
"--apistubs $(location :framework-connectivity-t.stubs.module_lib{.jar}) " + "--apistubs $(location :framework-connectivity-t.stubs.module_lib{.jar}) " +
"--apistubs $(location :framework-connectivity-flagged-apis{.jar}) " +
// Make a ":"-separated list. There will be an extra ":" but empty items are ignored. // Make a ":"-separated list. There will be an extra ":" but empty items are ignored.
"--unsupportedapi $$(printf ':%s' $(locations :connectivity-hiddenapi-files)) " + "--unsupportedapi $$(printf ':%s' $(locations :connectivity-hiddenapi-files)) " +
"--excludes $(location jarjar-excludes.txt) " + "--excludes $(location jarjar-excludes.txt) " +
@@ -289,6 +291,30 @@ java_genrule {
], ],
} }
droidstubs {
name: "framework-connectivity-flagged-apis-droidstubs",
srcs: [
":framework-connectivity-sources",
":framework-connectivity-tiramisu-updatable-sources",
":framework-nearby-java-sources",
":framework-thread-sources",
],
flags: [
"--show-annotation android.annotation.FlaggedApi",
],
aidl: {
include_dirs: [
"packages/modules/Connectivity/framework/aidl-export",
"frameworks/native/aidl/binder", // For PersistableBundle.aidl
],
},
}
java_library {
name: "framework-connectivity-flagged-apis",
srcs: [":framework-connectivity-flagged-apis-droidstubs"],
}
// Library providing limited APIs within the connectivity module, so that R+ components like // Library providing limited APIs within the connectivity module, so that R+ components like
// Tethering have a controlled way to depend on newer components like framework-connectivity that // Tethering have a controlled way to depend on newer components like framework-connectivity that
// are not loaded on R. // are not loaded on R.

View File

@@ -26,6 +26,7 @@ filegroup {
], ],
path: "java", path: "java",
visibility: [ visibility: [
"//packages/modules/Connectivity/framework:__subpackages__",
"//packages/modules/Connectivity/framework-t:__subpackages__", "//packages/modules/Connectivity/framework-t:__subpackages__",
], ],
} }

View File

@@ -44,6 +44,7 @@ android_test {
libs: [ libs: [
"android.test.base", "android.test.base",
"android.test.runner", "android.test.runner",
"framework-connectivity-flagged-apis"
], ],
// Test coverage system runs on different devices. Need to // Test coverage system runs on different devices. Need to
// compile for all architectures. // compile for all architectures.