Improve staticlibs/Android.bp

- Add comments clarifying the use cases of
  net-utils-framework-connectivity and net-utils-service-connectivity
- Apply stricter visibility for the staticlibs

Bug: 357803496
Test: CI
Change-Id: I0d13b436976c3194c0fe350a905a8edf3e4df73a
This commit is contained in:
Handa Wang 2024-08-08 15:36:48 +00:00
commit 8be10bfdff
2 changed files with 11 additions and 7 deletions

View file

@ -450,6 +450,7 @@ java_library {
visibility: ["//packages/modules/Connectivity/service-t"],
}
// net-utils-framework-connectivity is only for framework-connectivity.
java_library {
name: "net-utils-framework-connectivity",
srcs: [
@ -462,8 +463,7 @@ java_library {
"//apex_available:platform",
],
visibility: [
"//packages/modules/Connectivity:__subpackages__",
"//packages/modules/NetworkStack:__subpackages__",
"//packages/modules/Connectivity/framework",
],
libs: [
"androidx.annotation_annotation",
@ -502,10 +502,6 @@ java_defaults {
"com.android.tethering",
"//apex_available:platform",
],
visibility: [
"//packages/modules/CaptivePortalLogin:__subpackages__",
"//packages/modules/Connectivity:__subpackages__",
],
defaults_visibility: [
"//visibility:private",
],
@ -515,6 +511,7 @@ java_defaults {
},
}
// net-utils-service-connectivity is only for service-connectivity.
java_library {
name: "net-utils-service-connectivity",
srcs: [
@ -528,6 +525,10 @@ java_library {
],
defaults: ["net-utils-non-bootclasspath-defaults"],
jarjar_rules: "jarjar-rules-shared.txt",
visibility: [
"//packages/modules/Connectivity/service",
"//packages/modules/Connectivity/staticlibs/tests/unit",
],
}
java_library {
@ -538,6 +539,10 @@ java_library {
],
defaults: ["net-utils-non-bootclasspath-defaults"],
jarjar_rules: "jarjar-rules-shared.txt",
visibility: [
"//packages/modules/CaptivePortalLogin:__subpackages__",
"//packages/modules/Connectivity/Tethering",
],
}
aidl_interface {

View file

@ -42,7 +42,6 @@ java_library {
"net-utils-device-common-struct",
"net-utils-device-common-struct-base",
"net-utils-device-common-wear",
"net-utils-framework-connectivity",
"modules-utils-build_system",
],
lint: {