summaryrefslogtreecommitdiff
path: root/service/Android.bp
blob: 520ef7b230b5863a17c342a7c473fa173f448c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package {
    default_team: "trendy_team_fwk_wifi_hal",
    default_applicable_licenses: ["Android-Apache-2.0"],
}

java_defaults {
    name: "wifi-service-common",
    defaults: ["wifi-module-sdk-version-defaults"],
    errorprone: {
        javacflags: ["-Xep:CheckReturnValue:ERROR"],
    },
}

filegroup {
    name: "wifi-service-srcs",
    srcs: [
        "java/**/*.java",
        "java/**/*.logtags",
        ":framework-wifi-service-shared-srcs",
        ":statslog-wifi-java-gen",
        ":coex-table-parser",
    ],
}

// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
java_library {
    name: "wifi-service-pre-jarjar",
    installable: false,
    defaults: ["wifi-service-common"],
    srcs: [":wifi-service-srcs"],

    sdk_version: "system_server_current",
    lint: {
        baseline_filename: "lint-baseline.xml",
    },
    libs: [
        "androidx.annotation_annotation",
        "error_prone_annotations",
        "jsr305",
        "framework-annotations-lib",
        // load the resources from the resources APK.
        "ServiceWifiResources",
        // need pre-jarjar symbols so that wifi-service can reference the original class names at
        // compile time
        "framework-wifi-pre-jarjar",
        "framework-bluetooth.stubs.module_lib",
        "framework-configinfrastructure.stubs.module_lib",
        "framework-connectivity.stubs.module_lib",
        "framework-connectivity-b.stubs.module_lib",
        "framework-connectivity-t.stubs.module_lib",
        "framework-location.stubs.module_lib",
        "framework-statsd.stubs.module_lib",
        "framework-tethering.stubs.module_lib",
        "framework-uwb.stubs.module_lib",
        "unsupportedappusage",
        "app-compat-annotations",
        "auto_value_annotations",
    ],

    plugins: [
        "auto_value_plugin",
    ],

    static_libs: [
        // Types-only package shared across the HALs
        "android.hardware.wifi.common-V2-java",
        // AIDL vendor hal implementation
        "android.hardware.wifi-V3-java",
        // HIDL vendor hal implementation
        "android.hardware.wifi-V1.0-java",
        "android.hardware.wifi-V1.1-java",
        "android.hardware.wifi-V1.2-java",
        "android.hardware.wifi-V1.3-java",
        "android.hardware.wifi-V1.4-java",
        "android.hardware.wifi-V1.5-java",
        "android.hardware.wifi-V1.6-java",
        // AIDL hostapd implementation
        "android.hardware.wifi.hostapd-V3-java",
        // HIDL hostapd implementation
        "android.hardware.wifi.hostapd-V1.0-java",
        "android.hardware.wifi.hostapd-V1.1-java",
        "android.hardware.wifi.hostapd-V1.2-java",
        "android.hardware.wifi.hostapd-V1.3-java",
        // AIDL supplicant implementation
        "android.hardware.wifi.supplicant-V4-java",
        // HIDL supplicant implementation
        "android.hardware.wifi.supplicant-V1.0-java",
        "android.hardware.wifi.supplicant-V1.1-java",
        "android.hardware.wifi.supplicant-V1.2-java",
        "android.hardware.wifi.supplicant-V1.3-java",
        "android.hardware.wifi.supplicant-V1.4-java",
        "android.hidl.manager-V1.2-java",
        "android.system.wifi.mainline_supplicant-java",
        "bouncycastle-unbundled",
        "ksoap2",
        // Note: libprotobuf-java-lite uses a few core platform APIs which
        // does show up as @hide API usage. But, this can be safely ignored
        // since the library uses reflection to ensure that the OS does provide
        // the necessary core platform APIs.
        "libprotobuf-java-lite",
        "libnanohttpd",
        "modules-utils-backgroundthread",
        "modules-utils-build",
        "modules-utils-fastxmlserializer",
        "modules-utils-locallog",
        "netd-client",
        "networkstack-client",
        "service-entitlement",
        "wifi-lite-protos",
        "wifi-nano-protos",
        "com.android.net.flags-aconfig-java-export",
        "android.net.wifi.flags-aconfig-java",
        "android.security.flags-aconfig-java-export",
        "telephony_flags_core_java_exported_lib",
        "net-utils-service-wifi",
    ],
    apex_available: ["com.android.wifi"],
}

// wifi-service static library
// ============================================================
java_library {
    name: "service-wifi",
    defaults: [
        "wifi-service-common",
        "standalone-system-server-module-optimize-defaults",
    ],
    installable: true,
    static_libs: ["wifi-service-pre-jarjar"],

    dex_preopt: {
        // The profile is updated monthly with the bootclasspath/system_server
        // profiles based on the data from Dogfooders, and before mainline
        // releases. go/boot-image-profiles.
        profile: select(release_flag("RELEASE_SERVICE_WIFI_SPEED_PROFILE_ART_COMPILATION"), {
            true: "art-profile",
            false: "",
        }),
    },

    // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring
    libs: [
        "framework-wifi.impl",
        "auto_value_annotations",
    ],

    plugins: [
        "auto_value_plugin",
    ],

    sdk_version: "system_server_current",

    jarjar_rules: ":wifi-jarjar-rules",

    visibility: [
        "//frameworks/opt/net/wifi/service/apex",
        "//frameworks/opt/net/wifi/tests/wifitests/apex",
        "//packages/modules/Wifi/apex",
        "//packages/modules/Wifi/service/tests/wifitests/apex",
    ],
    apex_available: [
        "com.android.wifi",
        "test_com.android.wifi",
    ],
}

// Statsd auto-generated code
// ============================================================
genrule {
    name: "statslog-wifi-java-gen",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " +
        " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog" +
        " --minApiLevel 30",
    out: ["com/android/server/wifi/proto/WifiStatsLog.java"],
}

// Prebuilt for the wifi.rc file.
prebuilt_etc {
    name: "wifi.rc",
    src: "wifi.rc",
    sub_dir: "init",
}