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_base_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_base_license"],
8}
9
10cc_library_static {
11    name: "libservices.core",
12    defaults: ["libservices.core-libs"],
13
14    cpp_std: "c++2a",
15    cflags: [
16        "-Wall",
17        "-Werror",
18        "-Wno-unused-parameter",
19        "-Wthread-safety",
20
21        "-DEGL_EGLEXT_PROTOTYPES",
22        "-DGL_GLEXT_PROTOTYPES",
23    ],
24
25    srcs: [
26        "BroadcastRadio/JavaRef.cpp",
27        "BroadcastRadio/NativeCallbackThread.cpp",
28        "BroadcastRadio/BroadcastRadioService.cpp",
29        "BroadcastRadio/Tuner.cpp",
30        "BroadcastRadio/TunerCallback.cpp",
31        "BroadcastRadio/convert.cpp",
32        "BroadcastRadio/regions.cpp",
33        "stats/SurfaceFlingerPuller.cpp",
34        "tvinput/BufferProducerThread.cpp",
35        "tvinput/JTvInputHal.cpp",
36        "tvinput/TvInputHal_hidl.cpp",
37        "com_android_server_accessibility_BrailleDisplayConnection.cpp",
38        "com_android_server_adb_AdbDebuggingManager.cpp",
39        "com_android_server_am_BatteryStatsService.cpp",
40        "com_android_server_biometrics_SurfaceToNativeHandleConverter.cpp",
41        "com_android_server_ConsumerIrService.cpp",
42        "com_android_server_companion_virtual_InputController.cpp",
43        "com_android_server_companion_virtual_VirtualDeviceImpl.cpp",
44        "com_android_server_devicepolicy_CryptoTestHelper.cpp",
45        "com_android_server_display_DisplayControl.cpp",
46        "com_android_server_display_SmallAreaDetectionController.cpp",
47        "com_android_server_connectivity_Vpn.cpp",
48        "com_android_server_gpu_GpuService.cpp",
49        "com_android_server_HardwarePropertiesManagerService.cpp",
50        "com_android_server_input_InputManagerService.cpp",
51        "com_android_server_lights_LightsService.cpp",
52        "com_android_server_location_GnssLocationProvider.cpp",
53        "com_android_server_locksettings_SyntheticPasswordManager.cpp",
54        "com_android_server_power_PowerManagerService.cpp",
55        "com_android_server_powerstats_PowerStatsService.cpp",
56        "com_android_server_power_stats_CpuPowerStatsCollector.cpp",
57        "com_android_server_hint_HintManagerService.cpp",
58        "com_android_server_SerialService.cpp",
59        "com_android_server_soundtrigger_middleware_AudioSessionProviderImpl.cpp",
60        "com_android_server_soundtrigger_middleware_ExternalCaptureStateTracker.cpp",
61        "com_android_server_stats_pull_StatsPullAtomService.cpp",
62        "com_android_server_storage_AppFuseBridge.cpp",
63        "com_android_server_SystemClockTime.cpp",
64        "com_android_server_SystemServer.cpp",
65        "com_android_server_tv_TvUinputBridge.cpp",
66        "com_android_server_tv_TvInputHal.cpp",
67        "com_android_server_vr_VrManagerService.cpp",
68        "com_android_server_UsbAlsaJackDetector.cpp",
69        "com_android_server_UsbAlsaMidiDevice.cpp",
70        "com_android_server_UsbDeviceManager.cpp",
71        "com_android_server_UsbDescriptorParser.cpp",
72        "com_android_server_UsbHostManager.cpp",
73        "com_android_server_vibrator_VibratorController.cpp",
74        "com_android_server_vibrator_VibratorManagerService.cpp",
75        "com_android_server_pdb_PersistentDataBlockService.cpp",
76        "com_android_server_am_LowMemDetector.cpp",
77        "com_android_server_pm_PackageManagerShellCommandDataLoader.cpp",
78        "com_android_server_sensor_SensorService.cpp",
79        "com_android_server_wm_TaskFpsCallbackController.cpp",
80        "onload.cpp",
81        ":lib_cachedAppOptimizer_native",
82        ":lib_gameManagerService_native",
83        ":lib_oomConnection_native",
84        ":lib_anrTimer_native",
85    ],
86
87    include_dirs: [
88        "frameworks/base/libs",
89        "frameworks/native/services",
90        "frameworks/native/libs/math/include",
91        "frameworks/native/libs/ui/include",
92        "system/gatekeeper/include",
93        "system/memory/libmeminfo/include",
94    ],
95
96    header_libs: [
97        "bionic_libc_platform_headers",
98    ],
99}
100
101cc_defaults {
102    name: "libservices.core-libs",
103    defaults: [
104        "android.hardware.graphics.common-ndk_shared",
105        "android.hardware.power-ndk_shared",
106    ],
107    shared_libs: [
108        "libadb_pairing_server",
109        "libadb_pairing_connection",
110        "libandroid",
111        "libandroid_runtime",
112        "libandroidfw",
113        "libaudioclient",
114        "libbase",
115        "libappfuse",
116        "libbinder_ndk",
117        "libbinder",
118        "libchrome",
119        "libcutils",
120        "libcrypto",
121        "libfmq",
122        "liblog",
123        "libgraphicsenv",
124        "libgralloctypes",
125        "libhardware",
126        "libhardware_legacy",
127        "libhidlbase",
128        "libmeminfo",
129        "libmemevents",
130        "libmemtrackproxy",
131        "libmtp",
132        "libnativehelper",
133        "libnativewindow",
134        "libpowermanager",
135        "libprocessgroup",
136        "libutils",
137        "libui",
138        "libvibratorservice",
139        "libPlatformProperties",
140        "libinput",
141        "libinputflinger",
142        "libinputflinger_base",
143        "libinputservice",
144        "libservices.core-gnss",
145        "libstatshidl",
146        "libstatspull",
147        "libstatssocket",
148        "libstatslog",
149        "libschedulerservicehidl",
150        "libsensorservice",
151        "libsensorservicehidl",
152        "libsensorserviceaidl",
153        "libgui",
154        "libtimeinstate",
155        "libtimestats_atoms_proto",
156        "libusbhost",
157        "libtinyalsa",
158        "libEGL",
159        "libGLESv2",
160        "libnetutils",
161        "libhidlbase",
162        "libutils",
163        "libhwui",
164        "libpsi",
165        "libdataloader",
166        "libincfs",
167        "android.hardware.audio.common@2.0",
168        "android.media.audio.common.types-V1-ndk",
169        "android.hardware.broadcastradio@1.0",
170        "android.hardware.broadcastradio@1.1",
171        "android.hardware.contexthub@1.0",
172        "android.hardware.common.fmq-V1-ndk",
173        "android.hardware.gnss-V3-cpp",
174        "android.hardware.gnss@1.0",
175        "android.hardware.gnss@1.1",
176        "android.hardware.gnss@2.0",
177        "android.hardware.gnss@2.1",
178        "android.hardware.gnss.measurement_corrections@1.0",
179        "android.hardware.graphics.bufferqueue@1.0",
180        "android.hardware.graphics.bufferqueue@2.0",
181        "android.hardware.graphics.common@1.2",
182        "android.hardware.input.processor-V1-ndk",
183        "android.hardware.ir@1.0",
184        "android.hardware.light@2.0",
185        "android.hardware.memtrack-V1-ndk",
186        "android.hardware.power@1.0",
187        "android.hardware.power@1.1",
188        "android.hardware.power@1.2",
189        "android.hardware.power@1.3",
190        "android.hardware.power.stats@1.0",
191        "android.hardware.power.stats-V1-ndk",
192        "android.hardware.thermal@1.0",
193        "android.hardware.thermal-V2-ndk",
194        "android.hardware.tv.input@1.0",
195        "android.hardware.tv.input-V2-ndk",
196        "android.hardware.vibrator-V2-cpp",
197        "android.hardware.vibrator@1.0",
198        "android.hardware.vibrator@1.1",
199        "android.hardware.vibrator@1.2",
200        "android.hardware.vibrator@1.3",
201        "android.hardware.vr@1.0",
202        "android.hidl.token@1.0-utils",
203        "android.frameworks.schedulerservice@1.0",
204        "android.frameworks.sensorservice@1.0",
205        "android.frameworks.sensorservice-V1-ndk",
206        "android.frameworks.stats@1.0",
207        "android.frameworks.stats-V2-ndk",
208        "android.system.suspend.control-V1-cpp",
209        "android.system.suspend.control.internal-cpp",
210        "android.system.suspend-V1-ndk",
211        "server_configurable_flags",
212        "service.incremental",
213    ],
214
215    static_libs: [
216        "android.hardware.broadcastradio@common-utils-1x-lib",
217        "libaidlcommonsupport",
218        "libvirtualdevicebuildflags",
219    ],
220
221    product_variables: {
222        arc: {
223            shared_libs: [
224                "libarcbridge",
225                "libarcbridgeservice",
226                "libbase",
227                "libcap",
228                "libchrome",
229                "libmojo",
230            ],
231        },
232    },
233}
234
235filegroup {
236    name: "lib_cachedAppOptimizer_native",
237    srcs: [
238        "com_android_server_am_CachedAppOptimizer.cpp",
239    ],
240}
241
242filegroup {
243    name: "lib_gameManagerService_native",
244    srcs: [
245        "com_android_server_app_GameManagerService.cpp",
246    ],
247}
248
249filegroup {
250    name: "lib_oomConnection_native",
251    srcs: ["com_android_server_am_OomConnection.cpp"],
252}
253
254filegroup {
255    name: "lib_anrTimer_native",
256    srcs: [
257        "com_android_server_utils_AnrTimer.cpp",
258    ],
259}
260