1// Copyright 2017 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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_av_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_av_license"],
22}
23
24cc_library {
25    name: "libmediautils",
26
27    srcs: [
28        "AImageReaderUtils.cpp",
29        "BatteryNotifier.cpp",
30        "ISchedulingPolicyService.cpp",
31        "LimitProcessMemory.cpp",
32        "MemoryLeakTrackUtil.cpp",
33        "ProcessInfo.cpp",
34        "SchedulingPolicyService.cpp",
35        "ServiceUtilities.cpp",
36        "TimeCheck.cpp",
37    ],
38    static_libs: [
39        "libc_malloc_debug_backtrace",
40        "libbatterystats_aidl",
41        "libprocessinfoservice_aidl",
42    ],
43    shared_libs: [
44        "libaudioclient_aidl_conversion",
45        "libaudioutils", // for clock.h
46        "libbinder",
47        "libcutils",
48        "liblog",
49        "libutils",
50        "libhidlbase",
51        "libpermission",
52        "android.hardware.graphics.bufferqueue@1.0",
53        "android.hidl.token@1.0-utils",
54    ],
55    export_static_lib_headers: [
56        "libbatterystats_aidl",
57    ],
58
59    logtags: ["EventLogTags.logtags"],
60
61    cflags: [
62        "-Wall",
63        "-Wextra",
64        "-Werror",
65    ],
66
67    header_libs: [
68        "bionic_libc_platform_headers",
69        "libmedia_headers",
70    ],
71
72    export_shared_lib_headers: [
73        "libpermission",
74    ],
75
76    include_dirs: [
77        // For DEBUGGER_SIGNAL
78        "system/core/debuggerd/include",
79    ],
80    local_include_dirs: ["include"],
81    export_include_dirs: ["include"],
82}
83
84cc_library {
85    name: "libmediautils_vendor",
86    vendor_available: true,  // required for platform/hardware/interfaces
87    srcs: [
88        "MemoryLeakTrackUtil.cpp",
89    ],
90
91    cflags: [
92        "-Wall",
93        "-Wextra",
94        "-Werror",
95    ],
96    shared_libs: [
97        "liblog",
98        "libutils",
99    ],
100
101    static_libs: [
102        "libc_malloc_debug_backtrace",
103    ],
104
105    header_libs: [
106        "bionic_libc_platform_headers",
107    ],
108
109    local_include_dirs: ["include"],
110    export_include_dirs: ["include"],
111}
112
113
114cc_library_headers {
115    name: "libmediautils_headers",
116    vendor_available: true,  // required for platform/hardware/interfaces
117
118    export_include_dirs: ["include"],
119}
120