Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 1 | // |
| 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 Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 17 | package { |
| 18 | // See: http://go/android-license-faq |
Baligh Uddin | 2afd098 | 2021-05-24 03:50:01 +0000 | [diff] [blame] | 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 20 | } |
| 21 | |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 22 | filegroup { |
Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 23 | name: "framework-connectivity-internal-sources", |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 24 | srcs: [ |
| 25 | "src/**/*.java", |
| 26 | "src/**/*.aidl", |
| 27 | ], |
| 28 | path: "src", |
| 29 | visibility: [ |
Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 30 | "//visibility:private", |
| 31 | ], |
| 32 | } |
| 33 | |
| 34 | filegroup { |
| 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 |
| 46 | filegroup { |
| 47 | name: "framework-connectivity-sources", |
| 48 | srcs: [ |
| 49 | ":framework-connectivity-internal-sources", |
| 50 | ":framework-connectivity-aidl-export-sources", |
| 51 | ], |
| 52 | visibility: [ |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 53 | "//frameworks/base", |
| 54 | "//packages/modules/Connectivity:__subpackages__", |
| 55 | ], |
Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 56 | } |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 57 | |
Aaron Huang | 6a7e6ad | 2021-04-14 01:25:55 +0800 | [diff] [blame] | 58 | java_library { |
| 59 | name: "framework-connectivity-annotations", |
| 60 | sdk_version: "module_current", |
| 61 | srcs: [ |
| 62 | "src/android/net/ConnectivityAnnotations.java", |
| 63 | ], |
| 64 | libs: [ |
| 65 | "framework-annotations-lib", |
| 66 | "framework-connectivity", |
| 67 | ], |
| 68 | visibility: [ |
| 69 | "//frameworks/base:__subpackages__", |
| 70 | "//packages/modules/Connectivity:__subpackages__", |
| 71 | ], |
| 72 | } |
| 73 | |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 74 | java_sdk_library { |
| 75 | name: "framework-connectivity", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 76 | sdk_version: "module_current", |
| 77 | min_sdk_version: "30", |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 78 | defaults: ["framework-module-defaults"], |
Remi NGUYEN VAN | 3b52af9 | 2021-03-19 00:24:45 +0000 | [diff] [blame] | 79 | installable: true, |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 80 | srcs: [ |
| 81 | ":framework-connectivity-sources", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 82 | ":net-utils-framework-common-srcs", |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 83 | ], |
| 84 | aidl: { |
| 85 | include_dirs: [ |
| 86 | // Include directories for parcelables that are part of the stable API, and need a |
| 87 | // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces. |
| 88 | // TODO(b/180293679): remove these dependencies as they should not be necessary once |
| 89 | // the module builds against API (the parcelable declarations exist in framework.aidl) |
| 90 | "frameworks/base/core/java", // For framework parcelables |
| 91 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl |
| 92 | ], |
| 93 | }, |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 94 | impl_only_libs: [ |
| 95 | // TODO (b/183097033) remove once module_current includes core_platform |
| 96 | "stable.core.platform.api.stubs", |
| 97 | "framework-tethering.stubs.module_lib", |
| 98 | "framework-wifi.stubs.module_lib", |
| 99 | "net-utils-device-common", |
| 100 | ], |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 101 | libs: [ |
| 102 | "unsupportedappusage", |
| 103 | ], |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 104 | jarjar_rules: "jarjar-rules.txt", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 105 | permitted_packages: ["android.net"], |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 106 | impl_library_visibility: [ |
| 107 | "//packages/modules/Connectivity/Tethering/apex", |
| 108 | // In preparation for future move |
| 109 | "//packages/modules/Connectivity/apex", |
| 110 | "//packages/modules/Connectivity/service", |
| 111 | "//frameworks/base/packages/Connectivity/service", |
| 112 | "//frameworks/base", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 113 | |
| 114 | // Tests using hidden APIs |
Chiachang Wang | 3270871 | 2021-04-14 11:48:19 +0800 | [diff] [blame] | 115 | "//cts/tests/netlegacy22.api", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 116 | "//external/sl4a:__subpackages__", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 117 | "//frameworks/base/packages/Connectivity/tests:__subpackages__", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 118 | "//frameworks/libs/net/common/testutils", |
| 119 | "//frameworks/libs/net/common/tests:__subpackages__", |
| 120 | "//frameworks/opt/telephony/tests/telephonytests", |
Chiachang Wang | 426a6de | 2021-04-13 11:15:36 +0800 | [diff] [blame] | 121 | "//packages/modules/CaptivePortalLogin/tests", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 122 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", |
| 123 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 124 | "//packages/modules/NetworkStack/tests:__subpackages__", |
Chiachang Wang | e9d848e | 2021-03-31 16:11:37 +0800 | [diff] [blame] | 125 | "//packages/modules/Wifi/service/tests/wifitests", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 126 | ], |
| 127 | apex_available: [ |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 128 | "com.android.tethering", |
| 129 | ], |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 130 | } |
| 131 | |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 132 | cc_library_shared { |
| 133 | name: "libframework-connectivity-jni", |
| 134 | min_sdk_version: "30", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 135 | cflags: [ |
| 136 | "-Wall", |
| 137 | "-Werror", |
| 138 | "-Wno-unused-parameter", |
Remi NGUYEN VAN | b36fb99 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 139 | // Don't warn about S API usage even with |
| 140 | // min_sdk 30: the library is only loaded |
| 141 | // on S+ devices |
| 142 | "-Wno-unguarded-availability", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 143 | "-Wthread-safety", |
| 144 | ], |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 145 | srcs: [ |
| 146 | "jni/android_net_NetworkUtils.cpp", |
| 147 | "jni/onload.cpp", |
| 148 | ], |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 149 | shared_libs: [ |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 150 | "libandroid", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 151 | "liblog", |
| 152 | "libnativehelper", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 153 | ], |
| 154 | header_libs: [ |
| 155 | "dnsproxyd_protocol_headers", |
| 156 | ], |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 157 | stl: "none", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 158 | apex_available: [ |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 159 | "com.android.tethering", |
Remi NGUYEN VAN | 3b52af9 | 2021-03-19 00:24:45 +0000 | [diff] [blame] | 160 | ], |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 161 | } |