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 srcs: [ 103 "HalProxy_test.cpp", 104 "ScopedWakelock_test.cpp", 105 ], 106 vendor: true, 107 header_libs: [ 108 "android.hardware.sensors@2.X-shared-utils", 109 ], 110 static_libs: [ 111 "android.hardware.sensors@1.0-convert", 112 "android.hardware.sensors@2.0-ScopedWakelock.testlib", 113 "android.hardware.sensors@2.X-multihal", 114 "android.hardware.sensors@2.X-fakesubhal-unittest", 115 ], 116 shared_libs: [ 117 "android.hardware.sensors@1.0", 118 "android.hardware.sensors@2.0", 119 "android.hardware.sensors@2.1", 120 "libbase", 121 "libcutils", 122 "libfmq", 123 "libhardware", 124 "libhidlbase", 125 "liblog", 126 "libpower", 127 "libutils", 128 ], 129 test_suites: ["device-tests"], 130 cflags: [ 131 "-DLOG_TAG=\"HalProxyUnitTests\"", 132 ], 133} 134