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 { |
Aditya Choudhary | c5c6c62 | 2024-01-31 11:06:17 +0000 | [diff] [blame] | 18 | default_team: "trendy_team_android_sensors", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 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 | |
| 27 | cc_library_static { |
| 28 | name: "libsensorsexampleimpl", |
| 29 | vendor: true, |
| 30 | shared_libs: [ |
| 31 | "libbase", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 32 | "libfmq", |
| 33 | "libpower", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 34 | "libbinder_ndk", |
Vladimir Komsiyski | 08315cc | 2022-12-06 13:26:09 +0100 | [diff] [blame] | 35 | "android.hardware.sensors-V2-ndk", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 36 | ], |
| 37 | export_include_dirs: ["include"], |
| 38 | srcs: [ |
| 39 | "Sensors.cpp", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 40 | "Sensor.cpp", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 41 | ], |
| 42 | visibility: [ |
| 43 | ":__subpackages__", |
| 44 | "//hardware/interfaces/tests/extension/sensors:__subpackages__", |
| 45 | ], |
| 46 | } |
| 47 | |
| 48 | cc_binary { |
| 49 | name: "android.hardware.sensors-service.example", |
| 50 | relative_install_path: "hw", |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame] | 51 | installable: false, // install APEX below |
| 52 | |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 53 | vendor: true, |
| 54 | shared_libs: [ |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 55 | "libbinder_ndk", |
Grace Cheng | bc2a1b7 | 2021-11-09 14:26:23 +0000 | [diff] [blame] | 56 | "liblog", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 57 | ], |
| 58 | static_libs: [ |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame] | 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", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 67 | "libsensorsexampleimpl", |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame] | 68 | "libutils", |
Arthur Ishiguro | c7ac0b2 | 2021-10-13 16:12:37 +0000 | [diff] [blame] | 69 | ], |
| 70 | srcs: ["main.cpp"], |
| 71 | } |
Jooyung Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame] | 72 | |
| 73 | prebuilt_etc { |
| 74 | name: "sensors-default.rc", |
| 75 | src: "sensors-default.rc", |
| 76 | installable: false, |
| 77 | } |
| 78 | |
| 79 | prebuilt_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. |
| 88 | apex { |
| 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 Han | 621461b | 2023-12-11 13:38:14 +0900 | [diff] [blame] | 101 | ], |
| 102 | } |