summaryrefslogtreecommitdiff
path: root/packages/Vcn/service-b/Android.bp
blob: aad534c3289c802b5e46cf99806d4e3056d7414b (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
//
// Copyright (C) 2024 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_enigma",
    default_applicable_licenses: ["Android-Apache-2.0"],
}

filegroup {
    name: "vcn-location-sources",
    srcs: select(release_flag("RELEASE_MOVE_VCN_TO_MAINLINE"), {
        true: [
            "vcn-location-flag/module/com/android/server/vcn/VcnLocation.java",
        ],
        default: [
            "vcn-location-flag/platform/com/android/server/vcn/VcnLocation.java",
        ],
    }),
    visibility: [
        "//frameworks/base/services/core",
        "//packages/modules/Connectivity/service-t",
    ],
}

// TODO: b/374174952 This library is only used in "service-connectivity-b-platform"
// After VCN moves to Connectivity/ and the modularization is done, this lib and
// "service-connectivity-b-platform" can both be removed
java_library {
    name: "connectivity-utils-service-vcn-internal",
    sdk_version: "module_current",
    min_sdk_version: "30",
    srcs: ["service-utils/**/*.java"],
    libs: [
        "framework-annotations-lib",
        "unsupportedappusage",
    ],
    visibility: ["//visibility:private"],
}

filegroup {
    name: "service-vcn-sources",
    srcs: ["src/**/*.java"],
    path: "src",
    visibility: [
        "//packages/modules/Connectivity/service-b",
    ],
}

// This java_defaults will be used for "service-connectivity-b-platform" and
// "service-connectivity-b-pre-jarjar"
java_defaults {
    name: "service-connectivity-b-pre-jarjar-defaults",
    defaults: ["framework-system-server-module-defaults"], // This is a system server jar

    srcs: [
        ":service-vcn-sources",
    ],

    libs: [
        "android.net.ipsec.ike.stubs.module_lib",
        "framework-annotations-lib",
        "framework-connectivity-pre-jarjar",
        "framework-connectivity-t-pre-jarjar",
        "framework-connectivity-b-pre-jarjar",
        "framework-wifi.stubs.module_lib",
        "keepanno-annotations",
        "modules-utils-statemachine",
        "unsupportedappusage",
    ],

    // TODO: b/374174952 Dynamically include these libs when VCN
    // modularization is released
    static_libs: [
        "net-utils-service-vcn",
        "modules-utils-handlerexecutor",
    ],

    defaults_visibility: [
        "//packages/modules/Connectivity/service-b",
    ],
}

// This library is only used to be included into services.jar when the build system
// flag RELEASE_MOVE_VCN_TO_MAINLINE is disabled. When the flag is enabled, a module
// version of this library will be included in Tethering module
java_library {
    name: "service-connectivity-b-platform",
    defaults: ["service-connectivity-b-pre-jarjar-defaults"],
    static_libs: ["connectivity-utils-service-vcn-internal"],

    sdk_version: "system_server_current",
    min_sdk_version: "35",

    // TODO (b/374174952 ): This file is for jarjaring files in
    // "connectivity-utils-service-vcn-internal".
    jarjar_rules: "service-vcn-platform-jarjar-rules.txt",

    visibility: [
        "//frameworks/base/services",
    ],
    apex_available: [
        "//apex_available:platform",
    ],
}