xref: /aosp_15_r20/frameworks/base/packages/Vcn/service-b/Android.bp (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1//
2// Copyright (C) 2024 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
17package {
18    default_team: "trendy_team_enigma",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22filegroup {
23    name: "vcn-location-sources",
24    srcs: select(release_flag("RELEASE_MOVE_VCN_TO_MAINLINE"), {
25        true: [
26            "vcn-location-flag/module/com/android/server/vcn/VcnLocation.java",
27        ],
28        default: [
29            "vcn-location-flag/platform/com/android/server/vcn/VcnLocation.java",
30        ],
31    }),
32    visibility: ["//frameworks/base/services/core"],
33}
34
35// Do not static include this lib in VCN because these files exist in
36// both service-connectivity.jar and framework.jar
37// TODO: b/374174952 After VCN moves to Connectivity/ and the modularization is done
38// this lib can be removed and "service-connectivity-b-pre-jarjar" can include
39// "service-connectivity-pre-jarjar"
40java_library {
41    name: "connectivity-utils-service-vcn-internal",
42    sdk_version: "module_current",
43    min_sdk_version: "30",
44    srcs: [
45        ":framework-connectivity-shared-srcs",
46    ],
47    libs: [
48        "framework-annotations-lib",
49        "unsupportedappusage",
50    ],
51    visibility: [
52        "//visibility:private",
53    ],
54    apex_available: [
55        // TODO: b/374174952 Remove it when VCN modularization is released
56        "//apex_available:platform",
57
58        "com.android.tethering",
59    ],
60}
61
62java_library {
63    name: "service-connectivity-b-pre-jarjar",
64    sdk_version: "system_server_current",
65    min_sdk_version: "35", // TODO: Make it Android 25Q2 when this is included in mainline
66    defaults: ["framework-system-server-module-defaults"], // This is a system server jar
67
68    srcs: [
69        "src/**/*.java",
70    ],
71
72    libs: [
73        "android.net.ipsec.ike.stubs.module_lib",
74        "connectivity-utils-service-vcn-internal",
75        "framework-annotations-lib",
76        "framework-connectivity-pre-jarjar",
77        "framework-connectivity-t-pre-jarjar",
78        "framework-connectivity-b-pre-jarjar",
79        "framework-wifi.stubs.module_lib",
80        "keepanno-annotations",
81        "modules-utils-statemachine",
82        "unsupportedappusage",
83    ],
84
85    // TODO: b/374174952 Dynamically include these libs when VCN
86    // modularization is released
87    static_libs: [
88        "net-utils-service-vcn",
89        "modules-utils-handlerexecutor",
90    ],
91
92    visibility: [
93        "//frameworks/base/services",
94    ],
95    apex_available: [
96        // TODO: b/374174952 Remove it when VCN modularization is released
97        "//apex_available:platform",
98
99        "com.android.tethering",
100    ],
101}
102