Files
android_packages_modules_Co…/service-t/Sources.bp
Xiao Ma dbc8e0fb2b Split out the ethernet API surface and use framework-connectivity-t
Ethernet framework and service source code is going to be moved to
Connectivity mainline module, this CL contains below corresponding
changes to adapt the migration in f/b side:

1. Split out ethernet module-lib APIs to Connectivity module.
   Add the ethernet resource filegroup to tiramisu-updatable-sources
   filegroup as well, build them together. Also update the module-lib
   and system api txt to reflect the APIs change. Remove the hidden
   APIs which are moved to Connectivity module. This removal fixes the
   api inconsistent issue with Tethering/apex/hidden/.

2. Remove EthernetService from SystemServer which will be registered
   from ConnectivityServiceInitializer.

3. Replace the BackgroundThread class(imported from f/b/core/java)
   with the one in the modules-utils-backgroundthread lib, which is
   visible to Connectivity module.

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I3e13cb9c0e348333af295c2537d459aa6700ff17
Merged-In: I1956848d3248cc56e9841d221e5e4c160bed65a4
2022-03-14 13:47:01 +00:00

157 lines
4.0 KiB
Plaintext

//
// Copyright (C) 2021 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.
//
package {
// See: http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
// NetworkStats related libraries.
filegroup {
name: "services.connectivity-netstats-sources",
srcs: [
"src/com/android/server/net/NetworkIdentity*.java",
"src/com/android/server/net/NetworkStats*.java",
"src/com/android/server/net/BpfInterfaceMapUpdater.java",
"src/com/android/server/net/InterfaceMapValue.java",
"src/com/android/server/net/CookieTagMapKey.java",
"src/com/android/server/net/CookieTagMapValue.java",
"src/com/android/server/net/StatsMapKey.java",
"src/com/android/server/net/StatsMapValue.java",
"src/com/android/server/net/UidStatsMapKey.java",
],
path: "src",
visibility: [
"//visibility:private",
],
}
// For test code only.
filegroup {
name: "lib_networkStatsFactory_native",
srcs: [
"jni/com_android_server_net_NetworkStatsFactory.cpp",
],
path: "jni",
visibility: [
"//packages/modules/Connectivity:__subpackages__",
],
}
filegroup {
name: "services.connectivity-netstats-jni-sources",
srcs: [
"jni/com_android_server_net_NetworkStatsFactory.cpp",
"jni/com_android_server_net_NetworkStatsService.cpp",
],
path: "jni",
visibility: [
"//packages/modules/Connectivity:__subpackages__",
],
}
// Nsd related libraries.
filegroup {
name: "services.connectivity-nsd-sources",
srcs: [
"src/com/android/server/INativeDaemon*.java",
"src/com/android/server/NativeDaemon*.java",
"src/com/android/server/Nsd*.java",
],
path: "src",
visibility: [
"//visibility:private",
],
}
// IpSec related libraries.
filegroup {
name: "services.connectivity-ipsec-sources",
srcs: [
"src/com/android/server/IpSecService.java",
],
path: "src",
visibility: [
"//visibility:private",
],
}
// Ethernet related libraries.
filegroup {
name: "services.connectivity-ethernet-sources",
srcs: [
"src/com/android/server/net/DelayedDiskWrite.java",
"src/com/android/server/net/IpConfigStore.java",
],
path: "src",
visibility: [
"//frameworks/opt/net/ethernet/tests",
],
}
// Connectivity-T common libraries.
// TODO: remove this empty filegroup.
filegroup {
name: "services.connectivity-tiramisu-sources",
srcs: [],
path: "src",
visibility: ["//frameworks/base/services/core"],
}
filegroup {
name: "services.connectivity-tiramisu-updatable-sources",
srcs: [
":services.connectivity-ethernet-sources",
":services.connectivity-ipsec-sources",
":services.connectivity-netstats-sources",
":services.connectivity-nsd-sources",
],
path: "src",
visibility: [
"//packages/modules/Connectivity:__subpackages__",
],
}
cc_library_shared {
name: "libcom_android_net_module_util_jni",
min_sdk_version: "30",
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-Wthread-safety",
],
srcs: [
"jni/onload.cpp",
],
stl: "libc++_static",
static_libs: [
"libnet_utils_device_common_bpfjni",
],
shared_libs: [
"liblog",
"libnativehelper",
],
apex_available: [
"//apex_available:platform",
],
}