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