blob: 6f011eefeb360947fc499f8a9cdf51ccd714e71d [file] [log] [blame]
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +00001/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
Aditya Choudharyc5c6c622024-01-31 11:06:17 +000018 default_team: "trendy_team_android_sensors",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000019 // See: http://go/android-license-faq
20 // A large-scale-change added 'default_applicable_licenses' to import
21 // all of the 'license_kinds' from "hardware_interfaces_license"
22 // to get the below license kinds:
23 // SPDX-license-identifier-Apache-2.0
24 default_applicable_licenses: ["hardware_interfaces_license"],
25}
26
27cc_library_static {
28 name: "libsensorsexampleimpl",
29 vendor: true,
30 shared_libs: [
31 "libbase",
Grace Chengbc2a1b72021-11-09 14:26:23 +000032 "libfmq",
33 "libpower",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000034 "libbinder_ndk",
Vladimir Komsiyski08315cc2022-12-06 13:26:09 +010035 "android.hardware.sensors-V2-ndk",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000036 ],
37 export_include_dirs: ["include"],
38 srcs: [
39 "Sensors.cpp",
Grace Chengbc2a1b72021-11-09 14:26:23 +000040 "Sensor.cpp",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000041 ],
42 visibility: [
43 ":__subpackages__",
44 "//hardware/interfaces/tests/extension/sensors:__subpackages__",
45 ],
46}
47
48cc_binary {
49 name: "android.hardware.sensors-service.example",
50 relative_install_path: "hw",
Jooyung Han621461b2023-12-11 13:38:14 +090051 installable: false, // install APEX below
52
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000053 vendor: true,
54 shared_libs: [
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000055 "libbinder_ndk",
Grace Chengbc2a1b72021-11-09 14:26:23 +000056 "liblog",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000057 ],
58 static_libs: [
Jooyung Han621461b2023-12-11 13:38:14 +090059 "android.hardware.common-V2-ndk",
60 "android.hardware.common.fmq-V1-ndk",
61 "android.hardware.sensors-V2-ndk",
62 "android.system.suspend-V1-ndk",
63 "libbase",
64 "libcutils",
65 "libfmq",
66 "libpower",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000067 "libsensorsexampleimpl",
Jooyung Han621461b2023-12-11 13:38:14 +090068 "libutils",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000069 ],
70 srcs: ["main.cpp"],
71}
Jooyung Han621461b2023-12-11 13:38:14 +090072
73prebuilt_etc {
74 name: "sensors-default.rc",
75 src: "sensors-default.rc",
76 installable: false,
77}
78
79prebuilt_etc {
80 name: "sensors-default.xml",
81 src: "sensors-default.xml",
82 sub_dir: "vintf",
83 installable: false,
84}
85
86// Default vendor APEX for android.hardware.sensors.
87// Custom implementations may use override_apex based on this APEX.
88apex {
89 name: "com.android.hardware.sensors",
90 manifest: "apex_manifest.json",
91 key: "com.android.hardware.key",
92 certificate: ":com.android.hardware.certificate",
93 file_contexts: "file_contexts",
94 updatable: false,
95 vendor: true,
96
97 binaries: ["android.hardware.sensors-service.example"],
98 prebuilts: [
99 "sensors-default.rc", // init rc
100 "sensors-default.xml", // vintf fragment
Jooyung Han621461b2023-12-11 13:38:14 +0900101 ],
102}