blob: 61bfb92363bd85a1e25b15ceaa76edefcf5642a0 [file] [log] [blame]
markchien932da862019-08-27 10:19:38 +08001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17java_defaults {
18 name: "TetheringAndroidLibraryDefaults",
19 platform_apis: true,
20 srcs: [
21 "src/**/*.java",
markchien43e97e02019-09-03 15:58:06 +080022 ":framework-tethering-shared-srcs",
23 ":services-tethering-shared-srcs",
markchiendd6177b2019-09-23 20:29:54 +080024 ":servicescore-tethering-src",
markchien932da862019-08-27 10:19:38 +080025 ],
26 static_libs: [
27 "androidx.annotation_annotation",
markchien74a4fa92019-09-09 20:50:49 +080028 "netd_aidl_interface-java",
29 "networkstack-aidl-interfaces-java",
markchien6aa38892019-09-25 14:33:39 +080030 "android.hardware.tetheroffload.control-V1.0-java",
markchien932da862019-08-27 10:19:38 +080031 "tethering-client",
32 ],
33 manifest: "AndroidManifestBase.xml",
34}
35
36// Build tethering static library, used to compile both variants of the tethering.
37android_library {
38 name: "TetheringApiCurrentLib",
39 defaults: ["TetheringAndroidLibraryDefaults"],
40}
41
markchien6aa38892019-09-25 14:33:39 +080042cc_library_shared {
43 name: "libtetheroffloadjni",
44 srcs: [
45 "jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp",
46 ],
47 shared_libs: [
48 "libnativehelper",
49 "libcutils",
50 "android.hardware.tetheroffload.config@1.0",
51 ],
52 static_libs: [
53 "liblog",
54 "libbase",
55 "libhidlbase",
56 "libutils",
57 ],
58
59 cflags: [
60 "-Wall",
61 "-Werror",
62 "-Wno-unused-parameter",
63 "-Wthread-safety",
64 ],
65}
66
markchien932da862019-08-27 10:19:38 +080067// Common defaults for compiling the actual APK.
68java_defaults {
69 name: "TetheringAppDefaults",
70 platform_apis: true,
71 privileged: true,
markchien6aa38892019-09-25 14:33:39 +080072 jni_libs: [
73 "libtetheroffloadjni",
74 ],
markchien932da862019-08-27 10:19:38 +080075 resource_dirs: [
76 "res",
77 ],
78 optimize: {
79 proguard_flags_files: ["proguard.flags"],
80 },
81}
82
83// Non-updatable tethering running in the system server process for devices not using the module
84// TODO: build in-process tethering APK here.
85
86// Updatable tethering packaged as an application
87android_app {
88 name: "Tethering",
89 defaults: ["TetheringAppDefaults"],
90 static_libs: ["TetheringApiCurrentLib"],
91 certificate: "networkstack",
92 manifest: "AndroidManifest.xml",
93 use_embedded_native_libs: true,
94 // The permission configuration *must* be included to ensure security of the device
95 required: ["NetworkPermissionConfig"],
96}
markchien43e97e02019-09-03 15:58:06 +080097
98// This group will be removed when tethering migration is done.
99filegroup {
markchiendd6177b2019-09-23 20:29:54 +0800100 name: "tethering-servicescore-srcs",
markchien43e97e02019-09-03 15:58:06 +0800101 srcs: [
markchiendd6177b2019-09-23 20:29:54 +0800102 "src/com/android/server/connectivity/tethering/EntitlementManager.java",
markchien6aa38892019-09-25 14:33:39 +0800103 "src/com/android/server/connectivity/tethering/OffloadController.java",
104 "src/com/android/server/connectivity/tethering/OffloadHardwareInterface.java",
markchien43e97e02019-09-03 15:58:06 +0800105 "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
markchienf11a5da2019-09-23 21:39:39 +0800106 "src/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java",
markchiendd6177b2019-09-23 20:29:54 +0800107 ],
108}
109
110// This group will be removed when tethering migration is done.
111filegroup {
112 name: "tethering-servicesnet-srcs",
113 srcs: [
markchien74a4fa92019-09-09 20:50:49 +0800114 "src/android/net/dhcp/DhcpServerCallbacks.java",
115 "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
116 "src/android/net/ip/IpServer.java",
117 "src/android/net/ip/RouterAdvertisementDaemon.java",
118 "src/android/net/util/InterfaceSet.java",
markchienf11a5da2019-09-23 21:39:39 +0800119 "src/android/net/util/PrefixUtils.java",
markchien43e97e02019-09-03 15:58:06 +0800120 ],
121}
markchien6aa38892019-09-25 14:33:39 +0800122
123// This group would be removed when tethering migration is done.
124filegroup {
125 name: "tethering-jni-srcs",
126 srcs: [
127 "jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp",
128 ],
129}