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_native_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_native_license"],
8}
9
10aconfig_declarations {
11    name: "sensorservice_flags",
12    package: "com.android.frameworks.sensorservice.flags",
13    container: "system",
14    srcs: ["senserservice_flags.aconfig"],
15}
16
17cc_aconfig_library {
18    name: "sensorservice_flags_c_lib",
19    aconfig_declarations: "sensorservice_flags",
20    host_supported: true,
21}
22
23cc_library {
24    name: "libsensorservice",
25
26    srcs: [
27        "AidlSensorHalWrapper.cpp",
28        "BatteryService.cpp",
29        "CorrectedGyroSensor.cpp",
30        "Fusion.cpp",
31        "GravitySensor.cpp",
32        "HidlSensorHalWrapper.cpp",
33        "LimitedAxesImuSensor.cpp",
34        "LinearAccelerationSensor.cpp",
35        "OrientationSensor.cpp",
36        "RecentEventLogger.cpp",
37        "RotationVectorSensor.cpp",
38        "SensorDevice.cpp",
39        "SensorDeviceUtils.cpp",
40        "SensorDirectConnection.cpp",
41        "SensorEventConnection.cpp",
42        "SensorFusion.cpp",
43        "SensorInterface.cpp",
44        "SensorList.cpp",
45        "SensorRecord.cpp",
46        "SensorService.cpp",
47        "SensorServiceUtils.cpp",
48    ],
49
50    cflags: [
51        "-DLOG_TAG=\"SensorService\"",
52        "-Wall",
53        "-Werror",
54        "-Wextra",
55        "-fvisibility=hidden",
56    ],
57
58    header_libs: [
59        "android.hardware.sensors@2.X-shared-utils",
60    ],
61
62    shared_libs: [
63        "libcutils",
64        "libhardware",
65        "libhardware_legacy",
66        "libutils",
67        "liblog",
68        "libactivitymanager_aidl",
69        "libbatterystats_aidl",
70        "libbinder",
71        "libsensor",
72        "libsensorprivacy",
73        "libpermission",
74        "libprotoutil",
75        "libcrypto",
76        "libbase",
77        "libhidlbase",
78        "libfmq",
79        "libbinder_ndk",
80        "packagemanager_aidl-cpp",
81        "android.hardware.sensors@1.0",
82        "android.hardware.sensors@2.0",
83        "android.hardware.sensors@2.1",
84        "android.hardware.common-V2-ndk",
85        "android.hardware.common.fmq-V1-ndk",
86        "server_configurable_flags",
87        "libaconfig_storage_read_api_cc",
88    ],
89
90    static_libs: [
91        "libaidlcommonsupport",
92        "android.hardware.sensors@1.0-convert",
93        "android.hardware.sensors-V1-convert",
94        "android.hardware.sensors-V2-ndk",
95        "sensorservice_flags_c_lib",
96    ],
97
98    generated_headers: ["framework-cppstream-protos"],
99
100    export_shared_lib_headers: [
101        "libactivitymanager_aidl",
102        "libsensor",
103        "libsensorprivacy",
104        "libpermission",
105    ],
106
107    afdo: true,
108}
109
110cc_library_headers {
111    name: "libsensorservice_headers",
112    export_include_dirs: ["."],
113    visibility: ["//frameworks/native/services/sensorservice/fuzzer"],
114}
115
116cc_binary {
117    name: "sensorservice",
118
119    srcs: ["main_sensorservice.cpp"],
120
121    shared_libs: [
122        "libsensorservice",
123        "libsensorprivacy",
124        "libbinder",
125        "libutils",
126    ],
127
128    cflags: [
129        "-Wall",
130        "-Werror",
131        "-Wextra",
132    ],
133}
134