| 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 { | 
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 18 | default_team: "trendy_team_fwk_core_networking", | 
| Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 19 | // See: http://go/android-license-faq | 
| Baligh Uddin | 2afd098 | 2021-05-24 03:50:01 +0000 | [diff] [blame] | 20 | default_applicable_licenses: ["Android-Apache-2.0"], | 
| Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 21 | } | 
|  | 22 |  | 
| Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 23 | filegroup { | 
| Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 24 | name: "framework-connectivity-internal-sources", | 
| Remi NGUYEN VAN | 66ea68e | 2021-01-15 16:22:36 +0900 | [diff] [blame] | 25 | srcs: [ | 
|  | 26 | "src/**/*.java", | 
|  | 27 | "src/**/*.aidl", | 
|  | 28 | ], | 
|  | 29 | path: "src", | 
|  | 30 | visibility: [ | 
| Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 31 | "//visibility:private", | 
|  | 32 | ], | 
|  | 33 | } | 
|  | 34 |  | 
|  | 35 | filegroup { | 
|  | 36 | name: "framework-connectivity-aidl-export-sources", | 
|  | 37 | srcs: [ | 
|  | 38 | "aidl-export/**/*.aidl", | 
|  | 39 | ], | 
|  | 40 | path: "aidl-export", | 
|  | 41 | visibility: [ | 
|  | 42 | "//visibility:private", | 
|  | 43 | ], | 
|  | 44 | } | 
|  | 45 |  | 
|  | 46 | // TODO: use a java_library in the bootclasspath instead | 
|  | 47 | filegroup { | 
|  | 48 | name: "framework-connectivity-sources", | 
| Anton Hansson | 57f3d69 | 2023-03-15 10:30:10 +0000 | [diff] [blame] | 49 | defaults: ["framework-sources-module-defaults"], | 
| Remi NGUYEN VAN | ad43ca6 | 2021-02-15 20:16:28 +0900 | [diff] [blame] | 50 | srcs: [ | 
|  | 51 | ":framework-connectivity-internal-sources", | 
|  | 52 | ":framework-connectivity-aidl-export-sources", | 
|  | 53 | ], | 
| Anton Hansson | 57f3d69 | 2023-03-15 10:30:10 +0000 | [diff] [blame] | 54 | visibility: ["//packages/modules/Connectivity:__subpackages__"], | 
| Bob Badour | 727b672 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 55 | } | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 56 |  | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 57 | java_defaults { | 
|  | 58 | name: "framework-connectivity-defaults", | 
|  | 59 | defaults: ["framework-module-defaults"], | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 60 | sdk_version: "module_current", | 
|  | 61 | min_sdk_version: "30", | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 62 | srcs: [ | 
|  | 63 | ":framework-connectivity-sources", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 64 | ":net-utils-framework-common-srcs", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 65 | ":framework-connectivity-api-shared-srcs", | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 66 | ], | 
|  | 67 | aidl: { | 
| Siim Sammul | cd4c822 | 2021-12-13 15:52:07 +0000 | [diff] [blame] | 68 | generate_get_transaction_name: true, | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 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 VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 78 | stub_only_libs: [ | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 79 | "framework-connectivity-t.stubs.module_lib", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 80 | ], | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 81 | impl_only_libs: [ | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 82 | // TODO: figure out why just using "framework-tethering" uses the stubs, even though both | 
|  | 83 | // framework-connectivity and framework-tethering are in the same APEX. | 
| Mark White | e4d4463 | 2023-07-25 23:02:43 +0000 | [diff] [blame] | 84 | "framework-location.stubs.module_lib", | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 85 | "framework-tethering.impl", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 86 | "framework-wifi.stubs.module_lib", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 87 | ], | 
| Chalard Jean | dece0d8 | 2021-11-15 18:17:33 +0900 | [diff] [blame] | 88 | static_libs: [ | 
| Ken Chen | 7da858c | 2023-11-17 12:20:53 +0800 | [diff] [blame] | 89 | // Not using the latest stable version because all functions in the latest version of | 
|  | 90 | // mdns_aidl_interface are deprecated. | 
|  | 91 | "mdns_aidl_interface-V1-java", | 
| Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 92 | "modules-utils-backgroundthread", | 
| Chalard Jean | dece0d8 | 2021-11-15 18:17:33 +0900 | [diff] [blame] | 93 | "modules-utils-build", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 94 | "modules-utils-preconditions", | 
| Vinh Tran | 6d8c1d7 | 2022-06-08 01:25:14 -0400 | [diff] [blame] | 95 | "framework-connectivity-javastream-protos", | 
| Chalard Jean | dece0d8 | 2021-11-15 18:17:33 +0900 | [diff] [blame] | 96 | ], | 
| Junyu Lai | 29b7b63 | 2023-08-23 17:35:17 +0800 | [diff] [blame] | 97 | impl_only_static_libs: [ | 
| Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 98 | "net-utils-device-common-bpf", | 
| Yang Sun | baa50fa | 2023-12-10 22:01:44 +0800 | [diff] [blame] | 99 | "net-utils-device-common-struct", | 
| Junyu Lai | 29b7b63 | 2023-08-23 17:35:17 +0800 | [diff] [blame] | 100 | ], | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 101 | libs: [ | 
| Jooyung Han | c837554 | 2022-06-24 19:16:40 +0900 | [diff] [blame] | 102 | "androidx.annotation_annotation", | 
| Taras Antoshchuk | 30d41e5 | 2021-08-02 18:06:35 +0200 | [diff] [blame] | 103 | "app-compat-annotations", | 
| paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 104 | "framework-connectivity-t.stubs.module_lib", | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 105 | "unsupportedappusage", | 
|  | 106 | ], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 107 | apex_available: [ | 
|  | 108 | "com.android.tethering", | 
|  | 109 | ], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 110 | } | 
|  | 111 |  | 
|  | 112 | java_library { | 
|  | 113 | name: "framework-connectivity-pre-jarjar", | 
| Motomu Utsumi | 73e2e87 | 2023-04-14 19:22:42 +0900 | [diff] [blame] | 114 | defaults: [ | 
|  | 115 | "framework-connectivity-defaults", | 
| Patrick Rohr | 740b1d4 | 2023-05-11 13:28:54 -0700 | [diff] [blame] | 116 | ], | 
|  | 117 | static_libs: [ | 
| Stefano Duo | 2cf4693 | 2023-07-17 14:52:16 +0000 | [diff] [blame] | 118 | "httpclient_api", | 
|  | 119 | "httpclient_impl", | 
| Stefano Duo | 2a90733 | 2023-06-29 18:08:39 +0100 | [diff] [blame] | 120 | "http_client_logging", | 
| Junyu Lai | 29b7b63 | 2023-08-23 17:35:17 +0800 | [diff] [blame] | 121 | // Framework-connectivity-pre-jarjar is identical to framework-connectivity | 
|  | 122 | // implementation, but without the jarjar rules. However, framework-connectivity | 
|  | 123 | // is not based on framework-connectivity-pre-jarjar, it's rebuilt from source | 
|  | 124 | // to generate the SDK stubs. | 
|  | 125 | // Even if the library is included in "impl_only_static_libs" of defaults. This is still | 
|  | 126 | // needed because java_library which doesn't understand "impl_only_static_libs". | 
| Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 127 | "net-utils-device-common-bpf", | 
| Yang Sun | baa50fa | 2023-12-10 22:01:44 +0800 | [diff] [blame] | 128 | "net-utils-device-common-struct", | 
| Patrick Rohr | 740b1d4 | 2023-05-11 13:28:54 -0700 | [diff] [blame] | 129 | ], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 130 | libs: [ | 
|  | 131 | // This cannot be in the defaults clause above because if it were, it would be used | 
|  | 132 | // to generate the connectivity stubs. That would create a circular dependency | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 133 | // because the tethering impl depend on the connectivity stubs (e.g., | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 134 | // TetheringRequest depends on LinkAddress). | 
| Mark White | e4d4463 | 2023-07-25 23:02:43 +0000 | [diff] [blame] | 135 | "framework-location.stubs.module_lib", | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 136 | "framework-tethering.impl", | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 137 | "framework-wifi.stubs.module_lib", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 138 | ], | 
| Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 139 | visibility: ["//packages/modules/Connectivity:__subpackages__"], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 140 | } | 
|  | 141 |  | 
| Patrick Rohr | 740b1d4 | 2023-05-11 13:28:54 -0700 | [diff] [blame] | 142 | java_defaults { | 
|  | 143 | name: "CronetJavaDefaults", | 
| Stefano Duo | 2cf4693 | 2023-07-17 14:52:16 +0000 | [diff] [blame] | 144 | srcs: [":httpclient_api_sources"], | 
| Patrick Rohr | 740b1d4 | 2023-05-11 13:28:54 -0700 | [diff] [blame] | 145 | libs: [ | 
|  | 146 | "androidx.annotation_annotation", | 
|  | 147 | ], | 
|  | 148 | impl_only_static_libs: [ | 
| Stefano Duo | 2cf4693 | 2023-07-17 14:52:16 +0000 | [diff] [blame] | 149 | "httpclient_impl", | 
| Stefano Duo | 2a90733 | 2023-06-29 18:08:39 +0100 | [diff] [blame] | 150 | "http_client_logging", | 
| Patrick Rohr | 740b1d4 | 2023-05-11 13:28:54 -0700 | [diff] [blame] | 151 | ], | 
|  | 152 | } | 
|  | 153 |  | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 154 | java_sdk_library { | 
|  | 155 | name: "framework-connectivity", | 
| Motomu Utsumi | 73e2e87 | 2023-04-14 19:22:42 +0900 | [diff] [blame] | 156 | defaults: [ | 
|  | 157 | "framework-connectivity-defaults", | 
|  | 158 | "CronetJavaDefaults", | 
|  | 159 | ], | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 160 | installable: true, | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 161 | jarjar_rules: ":framework-connectivity-jarjar-rules", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 162 | permitted_packages: ["android.net"], | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 163 | impl_library_visibility: [ | 
|  | 164 | "//packages/modules/Connectivity/Tethering/apex", | 
|  | 165 | // In preparation for future move | 
|  | 166 | "//packages/modules/Connectivity/apex", | 
| Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 167 | "//packages/modules/Connectivity/framework-t", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 168 | "//packages/modules/Connectivity/service", | 
| paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 169 | "//packages/modules/Connectivity/service-t", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 170 | "//frameworks/base/packages/Connectivity/service", | 
|  | 171 | "//frameworks/base", | 
| Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 172 |  | 
|  | 173 | // Tests using hidden APIs | 
| Chiachang Wang | 3270871 | 2021-04-14 11:48:19 +0800 | [diff] [blame] | 174 | "//cts/tests/netlegacy22.api", | 
| Lorenzo Colitti | eb8d855 | 2022-02-01 13:51:42 +0900 | [diff] [blame] | 175 | "//cts/tests/tests/app.usage", // NetworkUsageStatsTest | 
| Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 176 | "//external/sl4a:__subpackages__", | 
| Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 177 | "//frameworks/base/packages/Connectivity/tests:__subpackages__", | 
| Remi NGUYEN VAN | 85a4e07 | 2022-02-02 20:06:56 +0900 | [diff] [blame] | 178 | "//frameworks/base/core/tests/bandwidthtests", | 
|  | 179 | "//frameworks/base/core/tests/benchmarks", | 
|  | 180 | "//frameworks/base/core/tests/utillib", | 
| Aaron Huang | 720ad7c | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 181 | "//frameworks/base/tests/vcn", | 
| Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 182 | "//frameworks/opt/net/ethernet/tests:__subpackages__", | 
| Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 183 | "//frameworks/opt/telephony/tests/telephonytests", | 
| Chiachang Wang | 426a6de | 2021-04-13 11:15:36 +0800 | [diff] [blame] | 184 | "//packages/modules/CaptivePortalLogin/tests", | 
| Motomu Utsumi | c480039 | 2023-09-11 11:48:36 +0900 | [diff] [blame] | 185 | "//packages/modules/Connectivity/staticlibs/testutils", | 
|  | 186 | "//packages/modules/Connectivity/staticlibs/tests:__subpackages__", | 
| Motomu Utsumi | 73e2e87 | 2023-04-14 19:22:42 +0900 | [diff] [blame] | 187 | "//packages/modules/Connectivity/Cronet/tests:__subpackages__", | 
| Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 188 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", | 
|  | 189 | "//packages/modules/Connectivity/tests:__subpackages__", | 
| Handa Wang | 806f5a1 | 2023-12-04 12:53:39 +0800 | [diff] [blame] | 190 | "//packages/modules/Connectivity/thread/tests:__subpackages__", | 
| Aaron Huang | 720ad7c | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 191 | "//packages/modules/IPsec/tests/iketests", | 
| Remi NGUYEN VAN | 173f8b1 | 2021-03-16 01:31:07 +0000 | [diff] [blame] | 192 | "//packages/modules/NetworkStack/tests:__subpackages__", | 
| Chiachang Wang | e9d848e | 2021-03-31 16:11:37 +0800 | [diff] [blame] | 193 | "//packages/modules/Wifi/service/tests/wifitests", | 
| Remi NGUYEN VAN | 71d64e7 | 2021-03-24 22:59:50 +0900 | [diff] [blame] | 194 | ], | 
| Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 195 | lint: { | 
|  | 196 | baseline_filename: "lint-baseline.xml", | 
|  | 197 | }, | 
| Motomu Utsumi | 52f294c | 2024-02-15 15:21:39 +0900 | [diff] [blame] | 198 | aconfig_declarations: [ | 
|  | 199 | "com.android.net.flags-aconfig", | 
|  | 200 | ], | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 201 | } | 
|  | 202 |  | 
| Taras Antoshchuk | 30d41e5 | 2021-08-02 18:06:35 +0200 | [diff] [blame] | 203 | platform_compat_config { | 
|  | 204 | name: "connectivity-platform-compat-config", | 
|  | 205 | src: ":framework-connectivity", | 
|  | 206 | } | 
|  | 207 |  | 
| Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 208 | cc_library_shared { | 
|  | 209 | name: "libframework-connectivity-jni", | 
|  | 210 | min_sdk_version: "30", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 211 | cflags: [ | 
|  | 212 | "-Wall", | 
|  | 213 | "-Werror", | 
|  | 214 | "-Wno-unused-parameter", | 
| Remi NGUYEN VAN | b36fb99 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 215 | // Don't warn about S API usage even with | 
|  | 216 | // min_sdk 30: the library is only loaded | 
|  | 217 | // on S+ devices | 
|  | 218 | "-Wno-unguarded-availability", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 219 | "-Wthread-safety", | 
|  | 220 | ], | 
| Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 221 | srcs: [ | 
|  | 222 | "jni/android_net_NetworkUtils.cpp", | 
|  | 223 | "jni/onload.cpp", | 
|  | 224 | ], | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 225 | shared_libs: [ | 
| Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 226 | "libandroid", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 227 | "liblog", | 
|  | 228 | "libnativehelper", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 229 | ], | 
|  | 230 | header_libs: [ | 
| Maciej Żenczykowski | 32b46a4 | 2023-03-11 01:19:40 +0000 | [diff] [blame] | 231 | "bpf_headers", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 232 | "dnsproxyd_protocol_headers", | 
|  | 233 | ], | 
| Remi NGUYEN VAN | deed4cb | 2021-04-02 06:38:46 +0000 | [diff] [blame] | 234 | stl: "none", | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 235 | apex_available: [ | 
| Remi NGUYEN VAN | c58c993 | 2021-03-19 10:13:40 +0000 | [diff] [blame] | 236 | "com.android.tethering", | 
| Remi NGUYEN VAN | 3b52af9 | 2021-03-19 00:24:45 +0000 | [diff] [blame] | 237 | ], | 
| Remi NGUYEN VAN | 11b5a5c | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 238 | } | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 239 |  | 
| Aaron Huang | dac7e4b | 2022-02-14 21:38:14 +0800 | [diff] [blame] | 240 | filegroup { | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 241 | name: "framework-connectivity-protos", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 242 | srcs: [ | 
| Aaron Huang | dac7e4b | 2022-02-14 21:38:14 +0800 | [diff] [blame] | 243 | "proto/**/*.proto", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 244 | ], | 
| Aaron Huang | dac7e4b | 2022-02-14 21:38:14 +0800 | [diff] [blame] | 245 | visibility: ["//frameworks/base"], | 
|  | 246 | } | 
|  | 247 |  | 
| Vinh Tran | 6d8c1d7 | 2022-06-08 01:25:14 -0400 | [diff] [blame] | 248 | java_library { | 
| Aaron Huang | dac7e4b | 2022-02-14 21:38:14 +0800 | [diff] [blame] | 249 | name: "framework-connectivity-javastream-protos", | 
| Vinh Tran | 6d8c1d7 | 2022-06-08 01:25:14 -0400 | [diff] [blame] | 250 | proto: { | 
|  | 251 | type: "stream", | 
|  | 252 | }, | 
|  | 253 | srcs: [":framework-connectivity-protos"], | 
|  | 254 | installable: false, | 
|  | 255 | sdk_version: "module_current", | 
|  | 256 | min_sdk_version: "30", | 
|  | 257 | apex_available: [ | 
|  | 258 | "com.android.tethering", | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 259 | ], | 
| Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 260 | } | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 261 |  | 
|  | 262 | java_genrule { | 
|  | 263 | name: "framework-connectivity-jarjar-rules", | 
|  | 264 | tool_files: [ | 
|  | 265 | ":connectivity-hiddenapi-files", | 
|  | 266 | ":framework-connectivity-pre-jarjar{.jar}", | 
|  | 267 | ":framework-connectivity-t-pre-jarjar{.jar}", | 
|  | 268 | ":framework-connectivity.stubs.module_lib{.jar}", | 
|  | 269 | ":framework-connectivity-t.stubs.module_lib{.jar}", | 
| Motomu Utsumi | ba5dde8 | 2023-11-22 16:24:32 +0900 | [diff] [blame] | 270 | ":framework-connectivity-module-api-stubs-including-flagged{.jar}", | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 271 | "jarjar-excludes.txt", | 
|  | 272 | ], | 
|  | 273 | tools: [ | 
|  | 274 | "jarjar-rules-generator", | 
|  | 275 | ], | 
|  | 276 | out: ["framework_connectivity_jarjar_rules.txt"], | 
|  | 277 | cmd: "$(location jarjar-rules-generator) " + | 
| Remi NGUYEN VAN | 0bd90f1 | 2022-08-10 20:15:46 +0900 | [diff] [blame] | 278 | "$(location :framework-connectivity-pre-jarjar{.jar}) " + | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 279 | "$(location :framework-connectivity-t-pre-jarjar{.jar}) " + | 
|  | 280 | "--prefix android.net.connectivity " + | 
|  | 281 | "--apistubs $(location :framework-connectivity.stubs.module_lib{.jar}) " + | 
| Remi NGUYEN VAN | 0bd90f1 | 2022-08-10 20:15:46 +0900 | [diff] [blame] | 282 | "--apistubs $(location :framework-connectivity-t.stubs.module_lib{.jar}) " + | 
| Motomu Utsumi | ba5dde8 | 2023-11-22 16:24:32 +0900 | [diff] [blame] | 283 | "--apistubs $(location :framework-connectivity-module-api-stubs-including-flagged{.jar}) " + | 
| Remi NGUYEN VAN | 0bd90f1 | 2022-08-10 20:15:46 +0900 | [diff] [blame] | 284 | // Make a ":"-separated list. There will be an extra ":" but empty items are ignored. | 
|  | 285 | "--unsupportedapi $$(printf ':%s' $(locations :connectivity-hiddenapi-files)) " + | 
| Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 286 | "--excludes $(location jarjar-excludes.txt) " + | 
|  | 287 | "--output $(out)", | 
|  | 288 | visibility: [ | 
|  | 289 | "//packages/modules/Connectivity/framework:__subpackages__", | 
|  | 290 | "//packages/modules/Connectivity/framework-t:__subpackages__", | 
|  | 291 | "//packages/modules/Connectivity/service", | 
|  | 292 | ], | 
|  | 293 | } | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 294 |  | 
| Motomu Utsumi | ada9e98 | 2023-11-06 22:49:25 +0900 | [diff] [blame] | 295 | droidstubs { | 
| Motomu Utsumi | ba5dde8 | 2023-11-22 16:24:32 +0900 | [diff] [blame] | 296 | name: "framework-connectivity-module-api-stubs-including-flagged-droidstubs", | 
| Motomu Utsumi | ada9e98 | 2023-11-06 22:49:25 +0900 | [diff] [blame] | 297 | srcs: [ | 
|  | 298 | ":framework-connectivity-sources", | 
|  | 299 | ":framework-connectivity-tiramisu-updatable-sources", | 
|  | 300 | ":framework-nearby-java-sources", | 
|  | 301 | ":framework-thread-sources", | 
|  | 302 | ], | 
|  | 303 | flags: [ | 
| Motomu Utsumi | 2f2aa21 | 2023-11-09 16:34:07 +0900 | [diff] [blame] | 304 | "--show-for-stub-purposes-annotation android.annotation.SystemApi" + | 
| Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 305 | "\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)", | 
| Motomu Utsumi | 2f2aa21 | 2023-11-09 16:34:07 +0900 | [diff] [blame] | 306 | "--show-for-stub-purposes-annotation android.annotation.SystemApi" + | 
| Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 307 | "\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES\\)", | 
| Motomu Utsumi | ada9e98 | 2023-11-06 22:49:25 +0900 | [diff] [blame] | 308 | ], | 
|  | 309 | aidl: { | 
|  | 310 | include_dirs: [ | 
|  | 311 | "packages/modules/Connectivity/framework/aidl-export", | 
|  | 312 | "frameworks/native/aidl/binder", // For PersistableBundle.aidl | 
|  | 313 | ], | 
|  | 314 | }, | 
|  | 315 | } | 
|  | 316 |  | 
|  | 317 | java_library { | 
| Motomu Utsumi | ba5dde8 | 2023-11-22 16:24:32 +0900 | [diff] [blame] | 318 | name: "framework-connectivity-module-api-stubs-including-flagged", | 
|  | 319 | srcs: [":framework-connectivity-module-api-stubs-including-flagged-droidstubs"], | 
| Motomu Utsumi | ada9e98 | 2023-11-06 22:49:25 +0900 | [diff] [blame] | 320 | } | 
|  | 321 |  | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 322 | // Library providing limited APIs within the connectivity module, so that R+ components like | 
|  | 323 | // Tethering have a controlled way to depend on newer components like framework-connectivity that | 
|  | 324 | // are not loaded on R. | 
| Chalard Jean | 2fb66f1 | 2023-08-25 12:50:37 +0900 | [diff] [blame] | 325 | // Note that this target needs to have access to hidden classes, and as such needs to list | 
|  | 326 | // the full libraries instead of the .impl lib (which only expose API classes). | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 327 | java_library { | 
|  | 328 | name: "connectivity-internal-api-util", | 
|  | 329 | sdk_version: "module_current", | 
|  | 330 | libs: [ | 
|  | 331 | "androidx.annotation_annotation", | 
| Chalard Jean | 2fb66f1 | 2023-08-25 12:50:37 +0900 | [diff] [blame] | 332 | "framework-connectivity-pre-jarjar", | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 333 | ], | 
|  | 334 | jarjar_rules: ":framework-connectivity-jarjar-rules", | 
|  | 335 | srcs: [ | 
| Chalard Jean | 2fb66f1 | 2023-08-25 12:50:37 +0900 | [diff] [blame] | 336 | // Files listed here MUST all be annotated with @RequiresApi(Build.VERSION_CODES.S) | 
|  | 337 | // or above as appropriate so that API checks are enforced for R+ users of this library | 
|  | 338 | "src/android/net/RoutingCoordinatorManager.java", | 
| Chalard Jean | 674f347 | 2023-10-24 20:59:01 +0900 | [diff] [blame] | 339 | "src/android/net/connectivity/ConnectivityInternalApiUtil.java", | 
| Igor Chernyshev | 9dac660 | 2022-12-13 19:28:32 -0800 | [diff] [blame] | 340 | ], | 
|  | 341 | visibility: [ | 
|  | 342 | "//packages/modules/Connectivity/Tethering:__subpackages__", | 
|  | 343 | ], | 
|  | 344 | } |