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 |
| 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 VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 26 | filegroup { |
Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 27 | name: "framework-connectivity-internal-sources", |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 28 | srcs: [ |
| 29 | "src/**/*.java", |
| 30 | "src/**/*.aidl", |
| 31 | ], |
| 32 | path: "src", |
| 33 | visibility: [ |
Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 34 | "//visibility:private", |
| 35 | ], |
| 36 | } |
| 37 | |
| 38 | filegroup { |
| 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 |
| 50 | filegroup { |
| 51 | name: "framework-connectivity-sources", |
| 52 | srcs: [ |
| 53 | ":framework-connectivity-internal-sources", |
| 54 | ":framework-connectivity-aidl-export-sources", |
| 55 | ], |
| 56 | visibility: [ |
Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 57 | "//frameworks/base", |
| 58 | "//packages/modules/Connectivity:__subpackages__", |
| 59 | ], |
Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 60 | } |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 61 | |
| 62 | java_sdk_library { |
| 63 | name: "framework-connectivity", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 64 | sdk_version: "module_current", |
| 65 | min_sdk_version: "30", |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 66 | defaults: ["framework-module-defaults"], |
Remi NGUYEN VAN | 3b52af9 | 2021-03-19 00:24:45 +0000 | [diff] [blame] | 67 | installable: true, |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 68 | srcs: [ |
| 69 | ":framework-connectivity-sources", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 70 | ":net-utils-framework-common-srcs", |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 71 | ], |
| 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 VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 82 | 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 VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 89 | libs: [ |
| 90 | "unsupportedappusage", |
| 91 | ], |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 92 | jarjar_rules: "jarjar-rules.txt", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 93 | permitted_packages: ["android.net"], |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 94 | 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", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 101 | |
| 102 | // Tests using hidden APIs |
| 103 | "//external/sl4a:__subpackages__", |
| 104 | "//frameworks/base/tests/net:__subpackages__", |
| 105 | "//frameworks/libs/net/common/testutils", |
| 106 | "//frameworks/libs/net/common/tests:__subpackages__", |
| 107 | "//frameworks/opt/telephony/tests/telephonytests", |
Chiachang Wang | 426a6de | 2021-04-13 11:15:36 +0800 | [diff] [blame^] | 108 | "//packages/modules/CaptivePortalLogin/tests", |
Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 109 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", |
| 110 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 111 | "//packages/modules/NetworkStack/tests:__subpackages__", |
Chiachang Wang | e9d848e | 2021-03-31 16:11:37 +0800 | [diff] [blame] | 112 | "//packages/modules/Wifi/service/tests/wifitests", |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 113 | ], |
| 114 | apex_available: [ |
Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 115 | "com.android.tethering", |
| 116 | ], |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 117 | } |
| 118 | |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 119 | cc_library_shared { |
| 120 | name: "libframework-connectivity-jni", |
| 121 | min_sdk_version: "30", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 122 | cflags: [ |
| 123 | "-Wall", |
| 124 | "-Werror", |
| 125 | "-Wno-unused-parameter", |
Remi NGUYEN VAN | b36fb99 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 126 | // Don't warn about S API usage even with |
| 127 | // min_sdk 30: the library is only loaded |
| 128 | // on S+ devices |
| 129 | "-Wno-unguarded-availability", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 130 | "-Wthread-safety", |
| 131 | ], |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 132 | srcs: [ |
| 133 | "jni/android_net_NetworkUtils.cpp", |
| 134 | "jni/onload.cpp", |
| 135 | ], |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 136 | shared_libs: [ |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 137 | "libandroid", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 138 | "liblog", |
| 139 | "libnativehelper", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 140 | ], |
| 141 | header_libs: [ |
| 142 | "dnsproxyd_protocol_headers", |
| 143 | ], |
Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 144 | stl: "none", |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 145 | apex_available: [ |
Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 146 | "com.android.tethering", |
Remi NGUYEN VAN | 3b52af9 | 2021-03-19 00:24:45 +0000 | [diff] [blame] | 147 | ], |
Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 148 | } |