blob: d31f74fe0df12dafa522efbc83613f12667799c7 [file] [log] [blame]
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +09001//
2// Copyright (C) 2020 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
Bob Badour727b6722021-02-12 17:07:05 -080017package {
18 // See: http://go/android-license-faq
Baligh Uddin2afd0982021-05-24 03:50:01 +000019 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour727b6722021-02-12 17:07:05 -080020}
21
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090022filegroup {
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090023 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090024 srcs: [
25 "src/**/*.java",
26 "src/**/*.aidl",
27 ],
28 path: "src",
29 visibility: [
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090030 "//visibility:private",
31 ],
32}
33
34filegroup {
35 name: "framework-connectivity-aidl-export-sources",
36 srcs: [
37 "aidl-export/**/*.aidl",
38 ],
39 path: "aidl-export",
40 visibility: [
41 "//visibility:private",
42 ],
43}
44
45// TODO: use a java_library in the bootclasspath instead
46filegroup {
47 name: "framework-connectivity-sources",
48 srcs: [
49 ":framework-connectivity-internal-sources",
50 ":framework-connectivity-aidl-export-sources",
51 ],
52 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090053 "//frameworks/base",
54 "//packages/modules/Connectivity:__subpackages__",
55 ],
Bob Badour727b6722021-02-12 17:07:05 -080056}
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090057
58java_sdk_library {
59 name: "framework-connectivity",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090060 sdk_version: "module_current",
61 min_sdk_version: "30",
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090062 defaults: ["framework-module-defaults"],
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +000063 installable: true,
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090064 srcs: [
65 ":framework-connectivity-sources",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090066 ":net-utils-framework-common-srcs",
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090067 ],
68 aidl: {
69 include_dirs: [
70 // Include directories for parcelables that are part of the stable API, and need a
71 // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
72 // TODO(b/180293679): remove these dependencies as they should not be necessary once
73 // the module builds against API (the parcelable declarations exist in framework.aidl)
74 "frameworks/base/core/java", // For framework parcelables
75 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
76 ],
77 },
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090078 impl_only_libs: [
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090079 "framework-tethering.stubs.module_lib",
80 "framework-wifi.stubs.module_lib",
81 "net-utils-device-common",
82 ],
Chalard Jeandece0d82021-11-15 18:17:33 +090083 static_libs: [
84 "modules-utils-build",
85 ],
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090086 libs: [
87 "unsupportedappusage",
88 ],
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090089 jarjar_rules: "jarjar-rules.txt",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +000090 permitted_packages: ["android.net"],
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090091 impl_library_visibility: [
92 "//packages/modules/Connectivity/Tethering/apex",
93 // In preparation for future move
94 "//packages/modules/Connectivity/apex",
95 "//packages/modules/Connectivity/service",
96 "//frameworks/base/packages/Connectivity/service",
97 "//frameworks/base",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +000098
99 // Tests using hidden APIs
Chiachang Wang32708712021-04-14 11:48:19 +0800100 "//cts/tests/netlegacy22.api",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000101 "//external/sl4a:__subpackages__",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +0000102 "//frameworks/base/packages/Connectivity/tests:__subpackages__",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000103 "//frameworks/libs/net/common/testutils",
104 "//frameworks/libs/net/common/tests:__subpackages__",
105 "//frameworks/opt/telephony/tests/telephonytests",
Chiachang Wang426a6de2021-04-13 11:15:36 +0800106 "//packages/modules/CaptivePortalLogin/tests",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000107 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
108 "//packages/modules/Connectivity/tests:__subpackages__",
109 "//packages/modules/NetworkStack/tests:__subpackages__",
Chiachang Wange9d848e2021-03-31 16:11:37 +0800110 "//packages/modules/Wifi/service/tests/wifitests",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900111 ],
112 apex_available: [
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900113 "com.android.tethering",
114 ],
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000115}
116
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000117cc_library_shared {
118 name: "libframework-connectivity-jni",
119 min_sdk_version: "30",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000120 cflags: [
121 "-Wall",
122 "-Werror",
123 "-Wno-unused-parameter",
Remi NGUYEN VANb36fb992021-03-23 14:45:58 +0000124 // Don't warn about S API usage even with
125 // min_sdk 30: the library is only loaded
126 // on S+ devices
127 "-Wno-unguarded-availability",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000128 "-Wthread-safety",
129 ],
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000130 srcs: [
131 "jni/android_net_NetworkUtils.cpp",
132 "jni/onload.cpp",
133 ],
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000134 shared_libs: [
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000135 "libandroid",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000136 "liblog",
137 "libnativehelper",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000138 ],
139 header_libs: [
140 "dnsproxyd_protocol_headers",
141 ],
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000142 stl: "none",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000143 apex_available: [
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000144 "com.android.tethering",
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000145 ],
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +0900146}