1// Copyright 2010 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_native_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_native_license"],
22}
23
24aconfig_declarations {
25    name: "libsensor_flags",
26    package: "com.android.hardware.libsensor.flags",
27    container: "system",
28    srcs: ["libsensor_flags.aconfig"],
29}
30
31cc_aconfig_library {
32    name: "libsensor_flags_c_lib",
33    host_supported: true,
34    aconfig_declarations: "libsensor_flags",
35}
36
37cc_library {
38    name: "libsensor",
39
40    host_supported: true,
41    cflags: [
42        "-Wall",
43        "-Werror",
44    ],
45    cppflags: [
46        "-Wextra",
47    ],
48
49    srcs: [
50        "BitTube.cpp",
51        "ISensorEventConnection.cpp",
52        "ISensorServer.cpp",
53        "Sensor.cpp",
54        "SensorEventQueue.cpp",
55        "SensorManager.cpp",
56    ],
57
58    shared_libs: [
59        "libbinder",
60        "libcutils",
61        "libutils",
62        "liblog",
63        "libhardware",
64        "libpermission",
65        "android.companion.virtual.virtualdevice_aidl-cpp",
66    ],
67
68    static_libs: [
69        "libsensor_flags_c_lib",
70    ],
71
72    export_include_dirs: ["include"],
73
74    export_shared_lib_headers: [
75        "libbinder",
76        "libpermission",
77        "libhardware",
78    ],
79}
80