blob: c93c2fc485693f928bfb0cae0baf86d68a25e108 [file] [log] [blame]
markchien38c32482021-09-29 12:19:44 +08001// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15java_library {
16 name: "netd_aidl_interface-lateststable-java",
17 sdk_version: "system_current",
18 min_sdk_version: "29",
19 static_libs: [
20 "netd_aidl_interface-V7-java",
21 ],
22 apex_available: [
23 "//apex_available:platform", // used from services.net
24 "com.android.bluetooth.updatable",
25 "com.android.tethering",
26 "com.android.wifi",
27 ],
28}
29
30cc_library_static {
31 name: "netd_event_listener_interface-lateststable-ndk",
32 whole_static_libs: [
33 "netd_event_listener_interface-V1-ndk",
34 ],
35 apex_available: [
36 "com.android.resolv",
37 ],
38 min_sdk_version: "29",
39}
40
41cc_library_static {
42 name: "netd_aidl_interface-lateststable-ndk",
43 whole_static_libs: [
44 "netd_aidl_interface-V7-ndk",
45 ],
46 apex_available: [
47 "com.android.resolv",
48 ],
49 min_sdk_version: "29",
50}
51
52cc_library_static {
53 name: "netd_aidl_interface-lateststable-cpp",
54 whole_static_libs: [
55 "netd_aidl_interface-V7-cpp",
56 ],
57}
58
59aidl_interface {
60 name: "netd_aidl_interface",
61 local_include_dir: "binder",
62 srcs: [
63 "binder/android/net/INetd.aidl",
64 // AIDL interface that callers can implement to receive networking events from netd.
65 "binder/android/net/INetdUnsolicitedEventListener.aidl",
66 "binder/android/net/InterfaceConfigurationParcel.aidl",
67 "binder/android/net/MarkMaskParcel.aidl",
68 "binder/android/net/NativeNetworkConfig.aidl",
69 "binder/android/net/NativeNetworkType.aidl",
70 "binder/android/net/NativeVpnType.aidl",
71 "binder/android/net/RouteInfoParcel.aidl",
72 "binder/android/net/TetherConfigParcel.aidl",
73 "binder/android/net/TetherOffloadRuleParcel.aidl",
74 "binder/android/net/TetherStatsParcel.aidl",
75 "binder/android/net/UidRangeParcel.aidl",
76 // Add new AIDL classes in android.net.netd.aidl to consist with other network modules.
77 "binder/android/net/netd/aidl/**/*.aidl",
78 ],
79 backend: {
80 cpp: {
81 gen_log: true,
82 },
83 java: {
84 // TODO: Remove apex_available and restrict visibility to only mainline modules that are
85 // either outside the system server or use jarjar to rename the generated AIDL classes.
86 apex_available: [
87 "//apex_available:platform", // used from services.net
88 "com.android.bluetooth.updatable",
89 "com.android.tethering",
90 "com.android.wifi",
91 ],
92 // this is part of updatable modules(NetworkStack) which targets 29(Q)
93 min_sdk_version: "29",
94 },
95 ndk: {
96 apex_available: [
97 "//apex_available:platform",
98 ],
99 // This is necessary for the DnsResovler tests to run in Android Q.
100 // Soong would recognize this value and produce the Q compatible aidl library.
101 min_sdk_version: "29",
102 },
103 },
104 versions: [
105 "1",
106 "2",
107 "3",
108 "4",
109 "5",
110 "6",
111 "7",
112 ],
113}
114
115java_library {
116 name: "netd_event_listener_interface-lateststable-java",
117 sdk_version: "system_current",
118 min_sdk_version: "29",
119 static_libs: [
120 "netd_event_listener_interface-V1-java",
121 ],
122 apex_available: [
123 "//apex_available:platform",
124 "com.android.bluetooth.updatable",
125 "com.android.wifi",
126 "com.android.tethering",
127 ],
128}
129
130aidl_interface {
131 name: "netd_event_listener_interface",
132 local_include_dir: "binder",
133 srcs: [
134 "binder/android/net/metrics/INetdEventListener.aidl",
135 ],
136 versions: ["1"],
137 backend: {
138 ndk: {
139 apex_available: [
140 "//apex_available:platform",
141 "com.android.resolv",
142 ],
143 min_sdk_version: "29",
144 },
145 java: {
146 apex_available: [
147 "//apex_available:platform",
148 "com.android.bluetooth.updatable",
149 "com.android.wifi",
150 "com.android.tethering",
151 ],
152 min_sdk_version: "29",
153 },
154 },
155}