blob: 88c174865cc810b36901d5b5c4008d0feafb150f [file] [log] [blame]
Remi NGUYEN VANc2fb3492021-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 Badour9d156242021-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 VANc2fb3492021-01-15 16:22:36 +090026filegroup {
Remi NGUYEN VAN076dcdc2021-02-15 20:16:28 +090027 name: "framework-connectivity-internal-sources",
Remi NGUYEN VANc2fb3492021-01-15 16:22:36 +090028 srcs: [
29 "src/**/*.java",
30 "src/**/*.aidl",
31 ],
32 path: "src",
33 visibility: [
Remi NGUYEN VAN076dcdc2021-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 VANc2fb3492021-01-15 16:22:36 +090057 "//frameworks/base",
58 "//packages/modules/Connectivity:__subpackages__",
59 ],
Bob Badour9d156242021-02-12 17:07:05 -080060}
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +090061
62java_sdk_library {
63 name: "framework-connectivity",
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +090064 sdk_version: "module_current",
65 min_sdk_version: "30",
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +090066 defaults: ["framework-module-defaults"],
Remi NGUYEN VAN2a311db2021-03-19 00:24:45 +000067 installable: true,
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +090068 srcs: [
69 ":framework-connectivity-sources",
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +090070 ":net-utils-framework-common-srcs",
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +090071 ],
72 aidl: {
73 include_dirs: [
74 // Include directories for parcelables that are part of the stable API, and need a
75 // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
76 // TODO(b/180293679): remove these dependencies as they should not be necessary once
77 // the module builds against API (the parcelable declarations exist in framework.aidl)
78 "frameworks/base/core/java", // For framework parcelables
79 "frameworks/native/aidl/binder", // For PersistableBundle.aidl
80 ],
81 },
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +090082 impl_only_libs: [
83 // TODO (b/183097033) remove once module_current includes core_platform
84 "stable.core.platform.api.stubs",
85 "framework-tethering.stubs.module_lib",
86 "framework-wifi.stubs.module_lib",
87 "net-utils-device-common",
88 ],
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +090089 libs: [
90 "unsupportedappusage",
91 ],
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +090092 jarjar_rules: "jarjar-rules.txt",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +000093 permitted_packages: ["android.net"],
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +090094 impl_library_visibility: [
95 "//packages/modules/Connectivity/Tethering/apex",
96 // In preparation for future move
97 "//packages/modules/Connectivity/apex",
98 "//packages/modules/Connectivity/service",
99 "//frameworks/base/packages/Connectivity/service",
100 "//frameworks/base",
101 "//packages/modules/Connectivity/Tethering/tests/unit",
102 ],
103 apex_available: [
Remi NGUYEN VAN972aa342021-03-24 22:59:50 +0900104 "com.android.tethering",
105 ],
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000106}
107
Remi NGUYEN VAN560da932021-04-02 06:38:46 +0000108cc_library_shared {
109 name: "libframework-connectivity-jni",
110 min_sdk_version: "30",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000111 cflags: [
112 "-Wall",
113 "-Werror",
114 "-Wno-unused-parameter",
Remi NGUYEN VAN4dbc3b52021-03-23 14:45:58 +0000115 // Don't warn about S API usage even with
116 // min_sdk 30: the library is only loaded
117 // on S+ devices
118 "-Wno-unguarded-availability",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000119 "-Wthread-safety",
120 ],
Remi NGUYEN VAN560da932021-04-02 06:38:46 +0000121 srcs: [
122 "jni/android_net_NetworkUtils.cpp",
123 "jni/onload.cpp",
124 ],
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000125 shared_libs: [
Remi NGUYEN VAN560da932021-04-02 06:38:46 +0000126 "libandroid",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000127 "liblog",
128 "libnativehelper",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000129 ],
130 header_libs: [
131 "dnsproxyd_protocol_headers",
132 ],
Remi NGUYEN VAN560da932021-04-02 06:38:46 +0000133 stl: "none",
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000134 apex_available: [
Remi NGUYEN VAN8f0031d2021-03-19 10:13:40 +0000135 "com.android.tethering",
Remi NGUYEN VAN2a311db2021-03-19 00:24:45 +0000136 ],
Remi NGUYEN VANc1326df2021-01-28 13:37:03 +0900137}