blob: 6eb83484ccc848a757ce17981dbf406fb3a40018 [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
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "frameworks_base_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["frameworks_base_license"],
24}
25
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090026filegroup {
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090027 name: "framework-connectivity-internal-sources",
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090028 srcs: [
29 "src/**/*.java",
30 "src/**/*.aidl",
31 ],
32 path: "src",
33 visibility: [
Remi NGUYEN VANad43ca62021-02-15 20:16:28 +090034 "//visibility:private",
35 ],
36}
37
38filegroup {
39 name: "framework-connectivity-aidl-export-sources",
40 srcs: [
41 "aidl-export/**/*.aidl",
42 ],
43 path: "aidl-export",
44 visibility: [
45 "//visibility:private",
46 ],
47}
48
49// TODO: use a java_library in the bootclasspath instead
50filegroup {
51 name: "framework-connectivity-sources",
52 srcs: [
53 ":framework-connectivity-internal-sources",
54 ":framework-connectivity-aidl-export-sources",
55 ],
56 visibility: [
Remi NGUYEN VAN66ea68e2021-01-15 16:22:36 +090057 "//frameworks/base",
58 "//packages/modules/Connectivity:__subpackages__",
59 ],
Bob Badour727b6722021-02-12 17:07:05 -080060}
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090061
Aaron Huang6a7e6ad2021-04-14 01:25:55 +080062java_library {
63 name: "framework-connectivity-annotations",
64 sdk_version: "module_current",
65 srcs: [
66 "src/android/net/ConnectivityAnnotations.java",
67 ],
68 libs: [
69 "framework-annotations-lib",
70 "framework-connectivity",
71 ],
72 visibility: [
73 "//frameworks/base:__subpackages__",
74 "//packages/modules/Connectivity:__subpackages__",
75 ],
76}
77
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090078java_sdk_library {
79 name: "framework-connectivity",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090080 sdk_version: "module_current",
81 min_sdk_version: "30",
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090082 defaults: ["framework-module-defaults"],
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +000083 installable: true,
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090084 srcs: [
85 ":framework-connectivity-sources",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090086 ":net-utils-framework-common-srcs",
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +090087 ],
88 aidl: {
89 include_dirs: [
90 // Include directories for parcelables that are part of the stable API, and need a
91 // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
92 // TODO(b/180293679): remove these dependencies as they should not be necessary once
93 // the module builds against API (the parcelable declarations exist in framework.aidl)
94 "frameworks/base/core/java", // For framework parcelables
95 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
96 ],
97 },
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +090098 impl_only_libs: [
99 // TODO (b/183097033) remove once module_current includes core_platform
100 "stable.core.platform.api.stubs",
101 "framework-tethering.stubs.module_lib",
102 "framework-wifi.stubs.module_lib",
103 "net-utils-device-common",
104 ],
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +0900105 libs: [
106 "unsupportedappusage",
107 ],
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900108 jarjar_rules: "jarjar-rules.txt",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000109 permitted_packages: ["android.net"],
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900110 impl_library_visibility: [
111 "//packages/modules/Connectivity/Tethering/apex",
112 // In preparation for future move
113 "//packages/modules/Connectivity/apex",
114 "//packages/modules/Connectivity/service",
115 "//frameworks/base/packages/Connectivity/service",
116 "//frameworks/base",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000117
118 // Tests using hidden APIs
Chiachang Wang32708712021-04-14 11:48:19 +0800119 "//cts/tests/netlegacy22.api",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000120 "//external/sl4a:__subpackages__",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +0000121 "//frameworks/base/packages/Connectivity/tests:__subpackages__",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000122 "//frameworks/libs/net/common/testutils",
123 "//frameworks/libs/net/common/tests:__subpackages__",
124 "//frameworks/opt/telephony/tests/telephonytests",
Chiachang Wang426a6de2021-04-13 11:15:36 +0800125 "//packages/modules/CaptivePortalLogin/tests",
Remi NGUYEN VAN173f8b12021-03-16 01:31:07 +0000126 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
127 "//packages/modules/Connectivity/tests:__subpackages__",
128 "//packages/modules/NetworkStack/tests:__subpackages__",
Chiachang Wange9d848e2021-03-31 16:11:37 +0800129 "//packages/modules/Wifi/service/tests/wifitests",
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900130 ],
131 apex_available: [
Remi NGUYEN VAN71d64e72021-03-24 22:59:50 +0900132 "com.android.tethering",
133 ],
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000134}
135
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000136cc_library_shared {
137 name: "libframework-connectivity-jni",
138 min_sdk_version: "30",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000139 cflags: [
140 "-Wall",
141 "-Werror",
142 "-Wno-unused-parameter",
Remi NGUYEN VANb36fb992021-03-23 14:45:58 +0000143 // Don't warn about S API usage even with
144 // min_sdk 30: the library is only loaded
145 // on S+ devices
146 "-Wno-unguarded-availability",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000147 "-Wthread-safety",
148 ],
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000149 srcs: [
150 "jni/android_net_NetworkUtils.cpp",
151 "jni/onload.cpp",
152 ],
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000153 shared_libs: [
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000154 "libandroid",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000155 "liblog",
156 "libnativehelper",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000157 ],
158 header_libs: [
159 "dnsproxyd_protocol_headers",
160 ],
Remi NGUYEN VANdeed4cb2021-04-02 06:38:46 +0000161 stl: "none",
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000162 apex_available: [
Remi NGUYEN VANc58c9932021-03-19 10:13:40 +0000163 "com.android.tethering",
Remi NGUYEN VAN3b52af92021-03-19 00:24:45 +0000164 ],
Remi NGUYEN VAN11b5a5c2021-01-28 13:37:03 +0900165}