• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2020 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_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_defaults {
21    name: "modules-utils-defaults",
22    sdk_version: "module_current",
23    min_sdk_version: "29",
24    libs: ["framework-annotations-lib"],
25    visibility: ["//visibility:public"],
26    apex_available: [
27        "//apex_available:anyapex",
28        "//apex_available:platform",
29    ],
30    defaults_visibility: [":__subpackages__"],
31}
32
33java_library {
34    name: "modules-utils-os",
35    defaults: ["modules-utils-defaults"],
36    min_sdk_version: "30",
37    static_libs: [
38        "modules-utils-list-slice",
39        "modules-utils-shell-command-handler",
40    ],
41    visibility: [
42        // NOTE: Do not add new rules to this list. New users should use the separate libraries it
43        // consists of.
44        "//visibility:override",
45        "//frameworks/base",
46        "//packages/modules/Connectivity/service",
47        "//packages/modules/Permission/service",
48        "//packages/modules/Scheduling/service",
49        "//packages/modules/Wifi/framework",
50        "//packages/modules/Wifi/service",
51        "//packages/services/Car/service",
52        "//packages/services/Telephony",
53    ],
54}
55
56java_library {
57    name: "modules-utils-handlerexecutor",
58    defaults: ["modules-utils-defaults"],
59    srcs: ["HandlerExecutor.java"],
60}
61
62java_library {
63    name: "modules-utils-backgroundthread",
64    defaults: ["modules-utils-defaults"],
65    srcs: ["BackgroundThread.java"],
66    static_libs: ["modules-utils-handlerexecutor"],
67}
68
69java_library {
70    name: "modules-utils-bytesmatcher",
71    defaults: ["modules-utils-defaults"],
72    srcs: ["BytesMatcher.java"],
73}
74
75java_library {
76    name: "modules-utils-list-slice",
77    defaults: ["modules-utils-defaults"],
78    srcs: [
79        ":module-utils-os-aidls",
80        "BaseParceledListSlice.java",
81        "ParceledListSlice.java",
82        "StringParceledListSlice.java",
83    ],
84    min_sdk_version: "30",
85}
86
87java_library {
88    name: "modules-utils-shell-command-handler",
89    defaults: ["modules-utils-defaults"],
90    srcs: ["BasicShellCommandHandler.java"],
91}
92
93java_library {
94    name: "modules-utils-synchronous-result-receiver",
95    defaults: ["modules-utils-defaults"],
96    srcs: [
97        ":modules-utils-synchronous-result-receiver-aidl",
98        "SynchronousResultReceiver.java",
99    ],
100}
101