• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2019 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
16package {
17    default_team: "trendy_team_android_sensors",
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
26cc_defaults {
27    name: "android.hardware.sensors@2.X-fakesubhal-defaults",
28    srcs: [
29        "fake_subhal/*.cpp",
30    ],
31    header_libs: [
32        "android.hardware.sensors@2.0-multihal.header",
33        "android.hardware.sensors@2.X-shared-utils",
34    ],
35    export_include_dirs: ["fake_subhal"],
36    shared_libs: [
37        "android.hardware.sensors@1.0",
38        "android.hardware.sensors@2.0",
39        "android.hardware.sensors@2.0-ScopedWakelock",
40        "android.hardware.sensors@2.1",
41        "libcutils",
42        "libfmq",
43        "libhardware",
44        "libhidlbase",
45        "liblog",
46        "libpower",
47        "libutils",
48    ],
49    static_libs: [
50        "android.hardware.sensors@1.0-convert",
51        "android.hardware.sensors@2.X-multihal",
52    ],
53    cflags: [
54        "-DLOG_TAG=\"FakeSubHal\"",
55    ],
56}
57
58cc_library {
59    name: "android.hardware.sensors@2.X-fakesubhal-config1",
60    vendor: true,
61    defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"],
62    cflags: [
63        "-DSUB_HAL_VERSION_2_0",
64        "-DSUPPORT_CONTINUOUS_SENSORS",
65        "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
66    ],
67}
68
69cc_library {
70    name: "android.hardware.sensors@2.X-fakesubhal-config2",
71    vendor: true,
72    defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"],
73    cflags: [
74        "-DSUB_HAL_VERSION_2_0",
75        "-DSUPPORT_ON_CHANGE_SENSORS",
76        "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
77    ],
78}
79
80cc_library {
81    name: "android.hardware.sensors@2.X-fakesubhal-config3",
82    vendor: true,
83    defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"],
84    cflags: [
85        "-DSUPPORT_ON_CHANGE_SENSORS",
86        "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
87    ],
88}
89
90cc_test_library {
91    name: "android.hardware.sensors@2.X-fakesubhal-unittest",
92    vendor_available: true,
93    defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"],
94    cflags: [
95        "-DSUPPORT_ON_CHANGE_SENSORS",
96        "-DSUPPORT_CONTINUOUS_SENSORS",
97        "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
98    ],
99}
100
101cc_test {
102    name: "android.hardware.sensors@2.X-halproxy-unit-tests",
103    tidy_timeout_srcs: [
104        "HalProxy_test.cpp",
105    ],
106    srcs: [
107        "HalProxy_test.cpp",
108        "ScopedWakelock_test.cpp",
109    ],
110    vendor: true,
111    header_libs: [
112        "android.hardware.sensors@2.X-shared-utils",
113    ],
114    static_libs: [
115        "android.hardware.sensors@1.0-convert",
116        "android.hardware.sensors@2.0-ScopedWakelock.testlib",
117        "android.hardware.sensors@2.X-multihal",
118        "android.hardware.sensors@2.X-fakesubhal-unittest",
119    ],
120    shared_libs: [
121        "android.hardware.sensors@1.0",
122        "android.hardware.sensors@2.0",
123        "android.hardware.sensors@2.1",
124        "libbase",
125        "libcutils",
126        "libfmq",
127        "libhardware",
128        "libhidlbase",
129        "liblog",
130        "libpower",
131        "libutils",
132    ],
133    test_suites: ["device-tests"],
134    cflags: [
135        "-DLOG_TAG=\"HalProxyUnitTests\"",
136    ],
137}
138