Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 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 | |
| 17 | package { |
| 18 | // See: http://go/android-license-faq |
| 19 | // A large-scale-change added 'default_applicable_licenses' to import |
| 20 | // all of the 'license_kinds' from "hardware_interfaces_license" |
| 21 | // to get the below license kinds: |
| 22 | // SPDX-license-identifier-Apache-2.0 |
| 23 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 24 | } |
| 25 | |
| 26 | cc_library_static { |
| 27 | name: "libsensorsexampleimpl", |
| 28 | vendor: true, |
| 29 | shared_libs: [ |
| 30 | "libbase", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 31 | "libfmq", |
| 32 | "libpower", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 33 | "libbinder_ndk", |
Vladimir Komsiyski | 08315cc | 2022-12-06 13:26:09 +0100 | [diff] [blame] | 34 | "android.hardware.sensors-V2-ndk", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 35 | ], |
| 36 | export_include_dirs: ["include"], |
| 37 | srcs: [ |
| 38 | "Sensors.cpp", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 39 | "Sensor.cpp", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 40 | ], |
| 41 | visibility: [ |
| 42 | ":__subpackages__", |
| 43 | "//hardware/interfaces/tests/extension/sensors:__subpackages__", |
| 44 | ], |
| 45 | } |
| 46 | |
| 47 | cc_binary { |
| 48 | name: "android.hardware.sensors-service.example", |
| 49 | relative_install_path: "hw", |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame^] | 50 | installable: false, // install APEX below |
| 51 | |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 52 | vendor: true, |
| 53 | shared_libs: [ |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 54 | "libbinder_ndk", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 55 | "liblog", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 56 | ], |
| 57 | static_libs: [ |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame^] | 58 | "android.hardware.common-V2-ndk", |
| 59 | "android.hardware.common.fmq-V1-ndk", |
| 60 | "android.hardware.sensors-V2-ndk", |
| 61 | "android.system.suspend-V1-ndk", |
| 62 | "libbase", |
| 63 | "libcutils", |
| 64 | "libfmq", |
| 65 | "libpower", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 66 | "libsensorsexampleimpl", |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame^] | 67 | "libutils", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 68 | ], |
| 69 | srcs: ["main.cpp"], |
| 70 | } |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame^] | 71 | |
| 72 | prebuilt_etc { |
| 73 | name: "sensors-default.rc", |
| 74 | src: "sensors-default.rc", |
| 75 | installable: false, |
| 76 | } |
| 77 | |
| 78 | prebuilt_etc { |
| 79 | name: "sensors-default.xml", |
| 80 | src: "sensors-default.xml", |
| 81 | sub_dir: "vintf", |
| 82 | installable: false, |
| 83 | } |
| 84 | |
| 85 | // Default vendor APEX for android.hardware.sensors. |
| 86 | // Custom implementations may use override_apex based on this APEX. |
| 87 | apex { |
| 88 | name: "com.android.hardware.sensors", |
| 89 | manifest: "apex_manifest.json", |
| 90 | key: "com.android.hardware.key", |
| 91 | certificate: ":com.android.hardware.certificate", |
| 92 | file_contexts: "file_contexts", |
| 93 | updatable: false, |
| 94 | vendor: true, |
| 95 | |
| 96 | binaries: ["android.hardware.sensors-service.example"], |
| 97 | prebuilts: [ |
| 98 | "sensors-default.rc", // init rc |
| 99 | "sensors-default.xml", // vintf fragment |
| 100 | "android.hardware.sensor.ambient_temperature.prebuilt.xml", |
| 101 | "android.hardware.sensor.barometer.prebuilt.xml", |
| 102 | "android.hardware.sensor.gyroscope.prebuilt.xml", |
| 103 | "android.hardware.sensor.hinge_angle.prebuilt.xml", |
| 104 | "android.hardware.sensor.light.prebuilt.xml", |
| 105 | "android.hardware.sensor.proximity.prebuilt.xml", |
| 106 | "android.hardware.sensor.relative_humidity.prebuilt.xml", |
| 107 | ], |
| 108 | } |