2020-12-21 18:40:08 +09:00
|
|
|
//
|
|
|
|
|
// Copyright (C) 2020 The Android Open Source Project
|
|
|
|
|
//
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
//
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
//
|
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
|
|
|
|
//
|
|
|
|
|
|
2021-02-12 17:07:05 -08:00
|
|
|
package {
|
|
|
|
|
// See: http://go/android-license-faq
|
2021-05-23 16:38:40 +00:00
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
2021-02-12 17:07:05 -08:00
|
|
|
}
|
|
|
|
|
|
2021-11-11 17:53:56 +08:00
|
|
|
// The library name match the service-connectivity jarjar rules that put the JNI utils in the
|
2022-01-31 11:21:08 +09:00
|
|
|
// android.net.connectivity.com.android.net.module.util package.
|
2021-11-11 17:53:56 +08:00
|
|
|
cc_library_shared {
|
2022-01-31 11:21:08 +09:00
|
|
|
name: "libandroid_net_connectivity_com_android_net_module_util_jni",
|
2021-11-11 17:53:56 +08:00
|
|
|
min_sdk_version: "30",
|
|
|
|
|
cflags: [
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
|
"-Wthread-safety",
|
|
|
|
|
],
|
|
|
|
|
srcs: [
|
|
|
|
|
"jni/com_android_net_module_util/onload.cpp",
|
|
|
|
|
],
|
|
|
|
|
static_libs: [
|
|
|
|
|
"libnet_utils_device_common_bpfjni",
|
|
|
|
|
],
|
|
|
|
|
shared_libs: [
|
|
|
|
|
"liblog",
|
|
|
|
|
"libnativehelper",
|
|
|
|
|
],
|
|
|
|
|
apex_available: [
|
|
|
|
|
"com.android.tethering",
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-08 01:19:44 +00:00
|
|
|
cc_library_shared {
|
|
|
|
|
name: "libservice-connectivity",
|
2021-03-23 14:45:58 +00:00
|
|
|
min_sdk_version: "30",
|
2020-12-21 18:40:08 +09:00
|
|
|
cflags: [
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
|
"-Wthread-safety",
|
|
|
|
|
],
|
|
|
|
|
srcs: [
|
2022-02-02 13:03:29 +09:00
|
|
|
":services.connectivity-netstats-jni-sources",
|
2022-01-28 15:39:17 +01:00
|
|
|
"jni/com_android_server_BpfNetMaps.cpp",
|
2021-12-25 17:05:41 +08:00
|
|
|
"jni/com_android_server_connectivity_ClatCoordinator.cpp",
|
2022-01-28 15:39:17 +01:00
|
|
|
"jni/com_android_server_TestNetworkService.cpp",
|
2021-01-08 01:19:44 +00:00
|
|
|
"jni/onload.cpp",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
2021-03-23 14:45:58 +00:00
|
|
|
header_libs: [
|
2022-01-28 15:39:17 +01:00
|
|
|
"bpf_connectivity_headers",
|
2021-03-23 14:45:58 +00:00
|
|
|
],
|
2021-12-25 17:05:41 +08:00
|
|
|
static_libs: [
|
|
|
|
|
"libclat",
|
|
|
|
|
"libip_checksum",
|
2022-02-02 13:03:29 +09:00
|
|
|
"libmodules-utils-build",
|
2021-12-25 17:05:41 +08:00
|
|
|
"libnetjniutils",
|
2022-02-02 13:03:29 +09:00
|
|
|
"libnet_utils_device_common_bpfjni",
|
2022-01-28 15:39:17 +01:00
|
|
|
"libtraffic_controller",
|
|
|
|
|
"netd_aidl_interface-lateststable-ndk",
|
2021-12-25 17:05:41 +08:00
|
|
|
],
|
2020-12-21 18:40:08 +09:00
|
|
|
shared_libs: [
|
2022-01-31 19:59:32 -08:00
|
|
|
"libbase",
|
2022-02-02 13:03:29 +09:00
|
|
|
"libcutils",
|
2022-01-31 19:59:32 -08:00
|
|
|
"libnetdutils",
|
2020-12-21 18:40:08 +09:00
|
|
|
"liblog",
|
|
|
|
|
"libnativehelper",
|
2022-02-02 13:03:29 +09:00
|
|
|
"libnetworkstats",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
2021-01-07 13:51:18 +00:00
|
|
|
apex_available: [
|
2021-01-08 01:19:44 +00:00
|
|
|
"com.android.tethering",
|
2021-01-07 13:51:18 +00:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-21 18:40:08 +09:00
|
|
|
java_library {
|
2021-01-08 18:32:00 +08:00
|
|
|
name: "service-connectivity-pre-jarjar",
|
2021-03-22 10:25:12 +00:00
|
|
|
sdk_version: "system_server_current",
|
2021-03-23 14:45:58 +00:00
|
|
|
min_sdk_version: "30",
|
2020-12-21 18:40:08 +09:00
|
|
|
srcs: [
|
2021-05-13 12:53:15 +00:00
|
|
|
"src/**/*.java",
|
2021-01-08 18:32:00 +08:00
|
|
|
":framework-connectivity-shared-srcs",
|
2021-03-22 10:25:12 +00:00
|
|
|
":services-connectivity-shared-srcs",
|
2021-07-07 17:45:45 +09:00
|
|
|
// TODO: move to net-utils-device-common
|
|
|
|
|
":connectivity-module-utils-srcs",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
|
|
|
|
libs: [
|
2021-03-22 10:25:12 +00:00
|
|
|
"framework-annotations-lib",
|
2022-01-31 11:21:08 +09:00
|
|
|
"framework-connectivity-pre-jarjar",
|
2022-02-08 21:25:28 +08:00
|
|
|
"framework-connectivity-t.stubs.module_lib",
|
2021-03-22 10:25:12 +00:00
|
|
|
"framework-tethering.stubs.module_lib",
|
|
|
|
|
"framework-wifi.stubs.module_lib",
|
2020-12-21 18:40:08 +09:00
|
|
|
"unsupportedappusage",
|
2021-03-08 22:05:03 +09:00
|
|
|
"ServiceConnectivityResources",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
|
|
|
|
static_libs: [
|
2022-01-31 11:21:08 +09:00
|
|
|
// Do not add libs here if they are already included
|
|
|
|
|
// in framework-connectivity
|
2021-08-06 14:15:31 +09:00
|
|
|
"dnsresolver_aidl_interface-V9-java",
|
2021-08-19 12:26:52 +02:00
|
|
|
"modules-utils-shell-command-handler",
|
2020-12-21 18:40:08 +09:00
|
|
|
"net-utils-device-common",
|
2021-11-11 17:53:56 +08:00
|
|
|
"net-utils-device-common-bpf",
|
2021-07-01 14:00:34 +00:00
|
|
|
"net-utils-device-common-netlink",
|
2021-01-18 11:58:24 +08:00
|
|
|
"netd-client",
|
2021-03-22 10:25:12 +00:00
|
|
|
"networkstack-client",
|
2021-03-09 17:24:46 +08:00
|
|
|
"PlatformProperties",
|
2021-03-11 15:41:52 +09:00
|
|
|
"service-connectivity-protos",
|
2022-01-26 19:12:21 +09:00
|
|
|
"NetworkStackApiCurrentShims",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
|
|
|
|
apex_available: [
|
2021-01-08 01:19:44 +00:00
|
|
|
"com.android.tethering",
|
2020-12-21 18:40:08 +09:00
|
|
|
],
|
2021-11-25 14:17:57 +08:00
|
|
|
lint: { strict_updatability_linting: true },
|
2021-12-14 01:30:22 +00:00
|
|
|
visibility: [
|
|
|
|
|
"//packages/modules/Connectivity/service-t",
|
|
|
|
|
"//packages/modules/Connectivity/tests:__subpackages__",
|
|
|
|
|
],
|
2020-12-21 18:40:08 +09:00
|
|
|
}
|
2021-01-08 18:32:00 +08:00
|
|
|
|
2021-03-11 15:41:52 +09:00
|
|
|
java_library {
|
|
|
|
|
name: "service-connectivity-protos",
|
2021-03-22 10:25:12 +00:00
|
|
|
sdk_version: "system_current",
|
2021-03-23 14:45:58 +00:00
|
|
|
min_sdk_version: "30",
|
2021-03-11 15:41:52 +09:00
|
|
|
proto: {
|
|
|
|
|
type: "nano",
|
|
|
|
|
},
|
|
|
|
|
srcs: [
|
|
|
|
|
":system-messages-proto-src",
|
|
|
|
|
],
|
|
|
|
|
libs: ["libprotobuf-java-nano"],
|
|
|
|
|
apex_available: [
|
|
|
|
|
"com.android.tethering",
|
|
|
|
|
],
|
2021-11-25 14:17:57 +08:00
|
|
|
lint: { strict_updatability_linting: true },
|
2021-03-11 15:41:52 +09:00
|
|
|
}
|
|
|
|
|
|
2021-01-08 18:32:00 +08:00
|
|
|
java_library {
|
|
|
|
|
name: "service-connectivity",
|
2021-03-22 10:25:12 +00:00
|
|
|
sdk_version: "system_server_current",
|
2021-03-23 14:45:58 +00:00
|
|
|
min_sdk_version: "30",
|
2021-01-08 18:32:00 +08:00
|
|
|
installable: true,
|
2021-12-14 01:30:22 +00:00
|
|
|
// This library combines system server jars that have access to different bootclasspath jars.
|
|
|
|
|
// Lower SDK service jars must not depend on higher SDK jars as that would let them
|
|
|
|
|
// transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as
|
|
|
|
|
// they would transitively depend on bootclasspath jars that may not be available.
|
2021-03-09 17:24:46 +08:00
|
|
|
static_libs: [
|
2021-01-08 18:32:00 +08:00
|
|
|
"service-connectivity-pre-jarjar",
|
2021-12-14 01:30:22 +00:00
|
|
|
"service-connectivity-tiramisu-pre-jarjar",
|
2022-01-07 13:18:54 +09:00
|
|
|
"service-nearby",
|
2021-01-08 18:32:00 +08:00
|
|
|
],
|
2022-01-31 11:21:08 +09:00
|
|
|
jarjar_rules: ":connectivity-jarjar-rules",
|
2021-01-08 18:32:00 +08:00
|
|
|
apex_available: [
|
|
|
|
|
"com.android.tethering",
|
|
|
|
|
],
|
2021-11-25 14:17:57 +08:00
|
|
|
lint: { strict_updatability_linting: true },
|
2021-01-08 18:32:00 +08:00
|
|
|
}
|
2021-06-28 18:48:43 +09:00
|
|
|
|
|
|
|
|
filegroup {
|
|
|
|
|
name: "connectivity-jarjar-rules",
|
|
|
|
|
srcs: ["jarjar-rules.txt"],
|
|
|
|
|
visibility: ["//packages/modules/Connectivity:__subpackages__"],
|
|
|
|
|
}
|
2022-01-12 01:12:11 +08:00
|
|
|
|
|
|
|
|
// TODO: This filegroup temporary exposes for NetworkStats. It should be
|
|
|
|
|
// removed right after NetworkStats moves into mainline module.
|
|
|
|
|
filegroup {
|
|
|
|
|
name: "traffic-controller-utils",
|
|
|
|
|
srcs: ["src/com/android/server/BpfNetMaps.java"],
|
|
|
|
|
visibility: ["//packages/modules/Connectivity:__subpackages__"],
|
|
|
|
|
}
|