• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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 {
18    default_team: "trendy_team_android_sensors",
19    // 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",
32        "libfmq",
33        "libpower",
34        "libbinder_ndk",
35        "android.hardware.sensors-V2-ndk",
36    ],
37    export_include_dirs: ["include"],
38    srcs: [
39        "Sensors.cpp",
40        "Sensor.cpp",
41    ],
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",
51    installable: false, // install APEX below
52
53    vendor: true,
54    shared_libs: [
55        "libbinder_ndk",
56        "liblog",
57    ],
58    static_libs: [
59        "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",
67        "libsensorsexampleimpl",
68        "libutils",
69    ],
70    srcs: ["main.cpp"],
71}
72
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
101    ],
102}
103