2020-12-21 09:40:08 +00: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-13 01:07:05 +00: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-13 01:07:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-01 20:22:00 +00:00
|
|
|
aidl_interface {
|
|
|
|
name: "connectivity_native_aidl_interface",
|
|
|
|
local_include_dir: "binder",
|
|
|
|
vendor_available: true,
|
|
|
|
srcs: [
|
|
|
|
"binder/android/net/connectivity/aidl/*.aidl",
|
|
|
|
],
|
|
|
|
backend: {
|
|
|
|
java: {
|
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
|
|
|
min_sdk_version: "30",
|
|
|
|
},
|
|
|
|
ndk: {
|
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
|
|
|
min_sdk_version: "30",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
versions: ["1"],
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "connectivity_native_aidl_interface-lateststable-ndk",
|
|
|
|
min_sdk_version: "30",
|
|
|
|
whole_static_libs: [
|
|
|
|
"connectivity_native_aidl_interface-V1-ndk",
|
|
|
|
],
|
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
java_library {
|
|
|
|
name: "connectivity_native_aidl_interface-lateststable-java",
|
|
|
|
sdk_version: "system_current",
|
|
|
|
min_sdk_version: "30",
|
|
|
|
static_libs: [
|
|
|
|
"connectivity_native_aidl_interface-V1-java",
|
|
|
|
],
|
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2021-11-11 09:53:56 +00:00
|
|
|
// The library name match the service-connectivity jarjar rules that put the JNI utils in the
|
2022-01-31 02:21:08 +00:00
|
|
|
// android.net.connectivity.com.android.net.module.util package.
|
2021-11-11 09:53:56 +00:00
|
|
|
cc_library_shared {
|
2022-01-31 02:21:08 +00:00
|
|
|
name: "libandroid_net_connectivity_com_android_net_module_util_jni",
|
2021-11-11 09:53:56 +00: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",
|
2021-10-01 20:22:00 +00:00
|
|
|
"libnet_utils_device_common_bpfutils",
|
2021-11-11 09:53:56 +00:00
|
|
|
],
|
|
|
|
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 09:40:08 +00:00
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wthread-safety",
|
|
|
|
],
|
|
|
|
srcs: [
|
2022-02-02 04:03:29 +00:00
|
|
|
":services.connectivity-netstats-jni-sources",
|
2022-01-28 14:39:17 +00:00
|
|
|
"jni/com_android_server_BpfNetMaps.cpp",
|
2021-12-25 09:05:41 +00:00
|
|
|
"jni/com_android_server_connectivity_ClatCoordinator.cpp",
|
2022-01-28 14:39:17 +00:00
|
|
|
"jni/com_android_server_TestNetworkService.cpp",
|
2021-01-08 01:19:44 +00:00
|
|
|
"jni/onload.cpp",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
2021-03-23 14:45:58 +00:00
|
|
|
header_libs: [
|
2022-01-28 14:39:17 +00:00
|
|
|
"bpf_connectivity_headers",
|
2021-03-23 14:45:58 +00:00
|
|
|
],
|
2021-12-25 09:05:41 +00:00
|
|
|
static_libs: [
|
|
|
|
"libclat",
|
|
|
|
"libip_checksum",
|
2022-02-02 04:03:29 +00:00
|
|
|
"libmodules-utils-build",
|
2021-12-25 09:05:41 +00:00
|
|
|
"libnetjniutils",
|
2022-02-02 04:03:29 +00:00
|
|
|
"libnet_utils_device_common_bpfjni",
|
2022-01-28 14:39:17 +00:00
|
|
|
"libtraffic_controller",
|
|
|
|
"netd_aidl_interface-lateststable-ndk",
|
2021-12-25 09:05:41 +00:00
|
|
|
],
|
2020-12-21 09:40:08 +00:00
|
|
|
shared_libs: [
|
2022-02-01 03:59:32 +00:00
|
|
|
"libbase",
|
2022-02-02 04:03:29 +00:00
|
|
|
"libcutils",
|
2022-02-01 03:59:32 +00:00
|
|
|
"libnetdutils",
|
2020-12-21 09:40:08 +00:00
|
|
|
"liblog",
|
|
|
|
"libnativehelper",
|
2022-02-02 04:03:29 +00:00
|
|
|
"libnetworkstats",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
|
|
|
apex_available: [
|
2021-01-08 01:19:44 +00:00
|
|
|
"com.android.tethering",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
java_library {
|
2021-01-08 10:32:00 +00: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 09:40:08 +00:00
|
|
|
srcs: [
|
2021-05-13 12:53:15 +00:00
|
|
|
"src/**/*.java",
|
2021-01-08 10:32:00 +00:00
|
|
|
":framework-connectivity-shared-srcs",
|
2021-03-22 10:25:12 +00:00
|
|
|
":services-connectivity-shared-srcs",
|
2021-07-07 08:45:45 +00:00
|
|
|
// TODO: move to net-utils-device-common
|
|
|
|
":connectivity-module-utils-srcs",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
|
|
|
libs: [
|
2021-03-22 10:25:12 +00:00
|
|
|
"framework-annotations-lib",
|
2022-01-31 02:21:08 +00:00
|
|
|
"framework-connectivity-pre-jarjar",
|
2022-02-08 13:25:28 +00: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 09:40:08 +00:00
|
|
|
"unsupportedappusage",
|
2021-03-08 13:05:03 +00:00
|
|
|
"ServiceConnectivityResources",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
|
|
|
static_libs: [
|
2022-01-31 02:21:08 +00:00
|
|
|
// Do not add libs here if they are already included
|
|
|
|
// in framework-connectivity
|
2021-10-01 20:22:00 +00:00
|
|
|
"connectivity_native_aidl_interface-lateststable-java",
|
2021-08-06 05:15:31 +00:00
|
|
|
"dnsresolver_aidl_interface-V9-java",
|
2021-08-19 10:26:52 +00:00
|
|
|
"modules-utils-shell-command-handler",
|
2020-12-21 09:40:08 +00:00
|
|
|
"net-utils-device-common",
|
2021-11-11 09:53:56 +00:00
|
|
|
"net-utils-device-common-bpf",
|
2021-07-01 14:00:34 +00:00
|
|
|
"net-utils-device-common-netlink",
|
2022-01-23 16:14:51 +00:00
|
|
|
"net-utils-services-common",
|
2021-01-18 03:58:24 +00:00
|
|
|
"netd-client",
|
2021-03-22 10:25:12 +00:00
|
|
|
"networkstack-client",
|
2021-03-09 09:24:46 +00:00
|
|
|
"PlatformProperties",
|
2021-03-11 06:41:52 +00:00
|
|
|
"service-connectivity-protos",
|
2022-01-26 10:12:21 +00:00
|
|
|
"NetworkStackApiCurrentShims",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
|
|
|
apex_available: [
|
2021-01-08 01:19:44 +00:00
|
|
|
"com.android.tethering",
|
2020-12-21 09:40:08 +00:00
|
|
|
],
|
2021-11-25 06:17:57 +00: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 09:40:08 +00:00
|
|
|
}
|
2021-01-08 10:32:00 +00:00
|
|
|
|
2021-03-11 06:41:52 +00: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 06:41:52 +00:00
|
|
|
proto: {
|
|
|
|
type: "nano",
|
|
|
|
},
|
|
|
|
srcs: [
|
|
|
|
":system-messages-proto-src",
|
|
|
|
],
|
|
|
|
libs: ["libprotobuf-java-nano"],
|
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
2021-11-25 06:17:57 +00:00
|
|
|
lint: { strict_updatability_linting: true },
|
2021-03-11 06:41:52 +00:00
|
|
|
}
|
|
|
|
|
2021-01-08 10:32:00 +00: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 10:32:00 +00: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 09:24:46 +00:00
|
|
|
static_libs: [
|
2021-01-08 10:32:00 +00:00
|
|
|
"service-connectivity-pre-jarjar",
|
2021-12-14 01:30:22 +00:00
|
|
|
"service-connectivity-tiramisu-pre-jarjar",
|
2022-03-10 04:32:15 +00:00
|
|
|
"service-nearby-pre-jarjar",
|
2021-01-08 10:32:00 +00:00
|
|
|
],
|
2022-01-31 02:21:08 +00:00
|
|
|
jarjar_rules: ":connectivity-jarjar-rules",
|
2021-01-08 10:32:00 +00:00
|
|
|
apex_available: [
|
|
|
|
"com.android.tethering",
|
|
|
|
],
|
2022-04-20 09:58:53 +00:00
|
|
|
optimize: {
|
|
|
|
enabled: true,
|
|
|
|
shrink: true,
|
|
|
|
proguard_flags_files: ["proguard.flags"],
|
|
|
|
},
|
2021-11-25 06:17:57 +00:00
|
|
|
lint: { strict_updatability_linting: true },
|
2021-01-08 10:32:00 +00:00
|
|
|
}
|
2021-06-28 09:48:43 +00:00
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "connectivity-jarjar-rules",
|
|
|
|
srcs: ["jarjar-rules.txt"],
|
|
|
|
visibility: ["//packages/modules/Connectivity:__subpackages__"],
|
|
|
|
}
|
2022-01-11 17:12:11 +00: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__"],
|
|
|
|
}
|