• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "frameworks_av_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_av_license"],
8}
9
10filegroup {
11    name: "resourcemanager_aidl",
12    srcs: [
13        "aidl/android/media/IResourceManagerClient.aidl",
14        "aidl/android/media/IResourceManagerService.aidl",
15        "aidl/android/media/MediaResourceType.aidl",
16        "aidl/android/media/MediaResourceSubType.aidl",
17        "aidl/android/media/MediaResourceParcel.aidl",
18        "aidl/android/media/MediaResourcePolicyParcel.aidl",
19        "aidl/android/media/ClientInfoParcel.aidl",
20        "aidl/android/media/ClientConfigParcel.aidl",
21    ],
22    path: "aidl",
23}
24
25filegroup {
26    name: "resourceobserver_aidl",
27    srcs: [
28        "aidl/android/media/IResourceObserver.aidl",
29        "aidl/android/media/IResourceObserverService.aidl",
30        "aidl/android/media/MediaObservableEvent.aidl",
31        "aidl/android/media/MediaObservableFilter.aidl",
32        "aidl/android/media/MediaObservableType.aidl",
33        "aidl/android/media/MediaObservableParcel.aidl",
34    ],
35    path: "aidl",
36}
37
38aidl_interface {
39    name: "resourcemanager_aidl_interface",
40    unstable: true,
41    local_include_dir: "aidl",
42    srcs: [
43        ":resourcemanager_aidl",
44    ],
45}
46
47aidl_interface {
48    name: "resourceobserver_aidl_interface",
49    local_include_dir: "aidl",
50    srcs: [
51        ":resourceobserver_aidl",
52    ],
53    backend: {
54        java: {
55            enabled: false,
56        },
57        cpp: {
58            enabled: false,
59        },
60        ndk: {
61            apex_available: [
62                "//apex_available:platform",
63                "com.android.media",
64                "test_com.android.media",
65            ],
66            min_sdk_version: "29",
67            enabled: true,
68        },
69    },
70    versions: ["1"],
71}
72
73cc_library {
74    name: "libresourcemanagerservice",
75
76    srcs: [
77        "ResourceManagerMetrics.cpp",
78        "ResourceManagerService.cpp",
79        "ResourceObserverService.cpp",
80        "ServiceLog.cpp",
81        "UidObserver.cpp",
82
83        // TODO: convert to AIDL?
84        "IMediaResourceMonitor.cpp",
85    ],
86
87    shared_libs: [
88        "libmedia",
89        "libmediautils",
90        "libbinder",
91        "libbinder_ndk",
92        "libutils",
93        "liblog",
94        "libstats_media_metrics",
95        "libstatspull",
96        "libstatssocket",
97        "libprotobuf-cpp-lite",
98        "libactivitymanager_aidl",
99    ],
100
101    static_libs: [
102        "resourceobserver_aidl_interface-V1-ndk",
103        "libplatformprotos",
104    ],
105
106    include_dirs: ["frameworks/av/include"],
107
108    cflags: [
109        "-Werror",
110        "-Wall",
111    ],
112
113    export_include_dirs: ["."],
114
115    export_shared_lib_headers: [
116        "libstats_media_metrics",
117        "libstatspull",
118        "libstatssocket",
119    ],
120}
121