1// 2// Copyright (C) 2018 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// 16package { 17 default_team: "trendy_team_fwk_wifi_hal", 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21java_defaults { 22 name: "wifi-service-common", 23 defaults: ["wifi-module-sdk-version-defaults"], 24 errorprone: { 25 javacflags: ["-Xep:CheckReturnValue:ERROR"], 26 }, 27} 28 29filegroup { 30 name: "wifi-service-srcs", 31 srcs: [ 32 "java/**/*.java", 33 "java/**/*.logtags", 34 ":framework-wifi-service-shared-srcs", 35 ":statslog-wifi-java-gen", 36 ":coex-table-parser", 37 ], 38} 39 40// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi 41java_library { 42 name: "wifi-service-pre-jarjar", 43 installable: false, 44 defaults: ["wifi-service-common"], 45 srcs: [":wifi-service-srcs"], 46 47 sdk_version: "system_server_current", 48 lint: { 49 baseline_filename: "lint-baseline.xml", 50 }, 51 libs: [ 52 "androidx.annotation_annotation", 53 "error_prone_annotations", 54 "jsr305", 55 "framework-annotations-lib", 56 // load the resources from the resources APK. 57 "ServiceWifiResources", 58 // need pre-jarjar symbols so that wifi-service can reference the original class names at 59 // compile time 60 "framework-wifi-pre-jarjar", 61 "framework-bluetooth.stubs.module_lib", 62 "framework-configinfrastructure.stubs.module_lib", 63 "framework-connectivity.stubs.module_lib", 64 "framework-connectivity-b.stubs.module_lib", 65 "framework-connectivity-t.stubs.module_lib", 66 "framework-location.stubs.module_lib", 67 "framework-statsd.stubs.module_lib", 68 "framework-tethering.stubs.module_lib", 69 "framework-uwb.stubs.module_lib", 70 "unsupportedappusage", 71 "app-compat-annotations", 72 "auto_value_annotations", 73 ], 74 75 plugins: [ 76 "auto_value_plugin", 77 ], 78 79 static_libs: [ 80 // Types-only package shared across the HALs 81 "android.hardware.wifi.common-V2-java", 82 // AIDL vendor hal implementation 83 "android.hardware.wifi-V3-java", 84 // HIDL vendor hal implementation 85 "android.hardware.wifi-V1.0-java", 86 "android.hardware.wifi-V1.1-java", 87 "android.hardware.wifi-V1.2-java", 88 "android.hardware.wifi-V1.3-java", 89 "android.hardware.wifi-V1.4-java", 90 "android.hardware.wifi-V1.5-java", 91 "android.hardware.wifi-V1.6-java", 92 // AIDL hostapd implementation 93 "android.hardware.wifi.hostapd-V3-java", 94 // HIDL hostapd implementation 95 "android.hardware.wifi.hostapd-V1.0-java", 96 "android.hardware.wifi.hostapd-V1.1-java", 97 "android.hardware.wifi.hostapd-V1.2-java", 98 "android.hardware.wifi.hostapd-V1.3-java", 99 // AIDL supplicant implementation 100 "android.hardware.wifi.supplicant-V4-java", 101 // HIDL supplicant implementation 102 "android.hardware.wifi.supplicant-V1.0-java", 103 "android.hardware.wifi.supplicant-V1.1-java", 104 "android.hardware.wifi.supplicant-V1.2-java", 105 "android.hardware.wifi.supplicant-V1.3-java", 106 "android.hardware.wifi.supplicant-V1.4-java", 107 "android.hidl.manager-V1.2-java", 108 "android.system.wifi.mainline_supplicant-java", 109 "bouncycastle-unbundled", 110 "ksoap2", 111 // Note: libprotobuf-java-lite uses a few core platform APIs which 112 // does show up as @hide API usage. But, this can be safely ignored 113 // since the library uses reflection to ensure that the OS does provide 114 // the necessary core platform APIs. 115 "libprotobuf-java-lite", 116 "libnanohttpd", 117 "modules-utils-backgroundthread", 118 "modules-utils-build", 119 "modules-utils-fastxmlserializer", 120 "modules-utils-locallog", 121 "netd-client", 122 "networkstack-client", 123 "service-entitlement", 124 "wifi-lite-protos", 125 "wifi-nano-protos", 126 "android.net.wifi.flags-aconfig-java", 127 "android.security.flags-aconfig-java-export", 128 "net-utils-service-wifi", 129 ], 130 apex_available: ["com.android.wifi"], 131} 132 133// wifi-service static library 134// ============================================================ 135java_library { 136 name: "service-wifi", 137 defaults: [ 138 "wifi-service-common", 139 "standalone-system-server-module-optimize-defaults", 140 ], 141 installable: true, 142 static_libs: ["wifi-service-pre-jarjar"], 143 144 dex_preopt: { 145 // The profile is updated monthly with the bootclasspath/system_server 146 // profiles based on the data from Dogfooders, and before mainline 147 // releases. go/boot-image-profiles. 148 profile: select(release_flag("RELEASE_SERVICE_WIFI_SPEED_PROFILE_ART_COMPILATION"), { 149 true: "art-profile", 150 false: "", 151 }), 152 }, 153 154 // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring 155 libs: [ 156 "framework-wifi.impl", 157 "auto_value_annotations", 158 ], 159 160 plugins: [ 161 "auto_value_plugin", 162 ], 163 164 sdk_version: "system_server_current", 165 166 jarjar_rules: ":wifi-jarjar-rules", 167 168 visibility: [ 169 "//frameworks/opt/net/wifi/service/apex", 170 "//frameworks/opt/net/wifi/tests/wifitests/apex", 171 "//packages/modules/Wifi/apex", 172 "//packages/modules/Wifi/service/tests/wifitests/apex", 173 ], 174 apex_available: [ 175 "com.android.wifi", 176 "test_com.android.wifi", 177 ], 178} 179 180// Statsd auto-generated code 181// ============================================================ 182genrule { 183 name: "statslog-wifi-java-gen", 184 tools: ["stats-log-api-gen"], 185 cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " + 186 " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog" + 187 " --minApiLevel 30", 188 out: ["com/android/server/wifi/proto/WifiStatsLog.java"], 189} 190 191// Prebuilt for the wifi.rc file. 192prebuilt_etc { 193 name: "wifi.rc", 194 src: "wifi.rc", 195 sub_dir: "init", 196} 197