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 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "hardware_interfaces_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["hardware_interfaces_license"], 23} 24 25cc_defaults { 26 name: "android.hardware.sensors@2.X-fakesubhal-defaults", 27 srcs: [ 28 "fake_subhal/*.cpp", 29 ], 30 header_libs: [ 31 "android.hardware.sensors@2.0-multihal.header", 32 "android.hardware.sensors@2.X-shared-utils", 33 ], 34 export_include_dirs: ["fake_subhal"], 35 shared_libs: [ 36 "android.hardware.sensors@1.0", 37 "android.hardware.sensors@2.0", 38 "android.hardware.sensors@2.0-ScopedWakelock", 39 "android.hardware.sensors@2.1", 40 "libcutils", 41 "libfmq", 42 "libhardware", 43 "libhidlbase", 44 "liblog", 45 "libpower", 46 "libutils", 47 ], 48 static_libs: [ 49 "android.hardware.sensors@1.0-convert", 50 "android.hardware.sensors@2.X-multihal", 51 ], 52 cflags: [ 53 "-DLOG_TAG=\"FakeSubHal\"", 54 ], 55} 56 57cc_library { 58 name: "android.hardware.sensors@2.X-fakesubhal-config1", 59 vendor: true, 60 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 61 cflags: [ 62 "-DSUB_HAL_VERSION_2_0", 63 "-DSUPPORT_CONTINUOUS_SENSORS", 64 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"", 65 ], 66} 67 68cc_library { 69 name: "android.hardware.sensors@2.X-fakesubhal-config2", 70 vendor: true, 71 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 72 cflags: [ 73 "-DSUB_HAL_VERSION_2_0", 74 "-DSUPPORT_ON_CHANGE_SENSORS", 75 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"", 76 ], 77} 78 79cc_library { 80 name: "android.hardware.sensors@2.X-fakesubhal-config3", 81 vendor: true, 82 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 83 cflags: [ 84 "-DSUPPORT_ON_CHANGE_SENSORS", 85 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"", 86 ], 87} 88 89cc_test_library { 90 name: "android.hardware.sensors@2.X-fakesubhal-unittest", 91 vendor_available: true, 92 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 93 cflags: [ 94 "-DSUPPORT_ON_CHANGE_SENSORS", 95 "-DSUPPORT_CONTINUOUS_SENSORS", 96 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"", 97 ], 98} 99 100cc_test { 101 name: "android.hardware.sensors@2.X-halproxy-unit-tests", 102 tidy_timeout_srcs: [ 103 "HalProxy_test.cpp", 104 ], 105 srcs: [ 106 "HalProxy_test.cpp", 107 "ScopedWakelock_test.cpp", 108 ], 109 vendor: true, 110 header_libs: [ 111 "android.hardware.sensors@2.X-shared-utils", 112 ], 113 static_libs: [ 114 "android.hardware.sensors@1.0-convert", 115 "android.hardware.sensors@2.0-ScopedWakelock.testlib", 116 "android.hardware.sensors@2.X-multihal", 117 "android.hardware.sensors@2.X-fakesubhal-unittest", 118 ], 119 shared_libs: [ 120 "android.hardware.sensors@1.0", 121 "android.hardware.sensors@2.0", 122 "android.hardware.sensors@2.1", 123 "libbase", 124 "libcutils", 125 "libfmq", 126 "libhardware", 127 "libhidlbase", 128 "liblog", 129 "libpower", 130 "libutils", 131 ], 132 test_suites: ["device-tests"], 133 cflags: [ 134 "-DLOG_TAG=\"HalProxyUnitTests\"", 135 ], 136} 137