1// Copyright (C) 2013 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Default flags to be used throughout all libraries in inputflinger. 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 "frameworks_native_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["frameworks_native_license"], 23} 24 25inputflinger_tidy_checks = [ 26 "android-*", 27] 28 29cc_defaults { 30 name: "inputflinger_defaults", 31 cpp_std: "c++20", 32 cflags: [ 33 "-Wall", 34 "-Wextra", 35 "-Werror", 36 "-Wno-unused-parameter", 37 "-Wthread-safety", 38 "-Wshadow", 39 "-Wshadow-field-in-constructor-modified", 40 "-Wshadow-uncaptured-local", 41 ], 42 sanitize: { 43 misc_undefined: ["bounds"], 44 }, 45 tidy: true, 46 tidy_checks: [ 47 "-*", // Disable all checks not explicitly enabled for now 48 ] + inputflinger_tidy_checks, 49 tidy_checks_as_errors: inputflinger_tidy_checks, 50} 51 52///////////////////////////////////////////////// 53// libinputflinger 54///////////////////////////////////////////////// 55 56filegroup { 57 name: "libinputflinger_sources", 58 srcs: [ 59 "InputClassifier.cpp", 60 "InputCommonConverter.cpp", 61 "PreferStylusOverTouchBlocker.cpp", 62 "UnwantedInteractionBlocker.cpp", 63 "InputManager.cpp", 64 ], 65} 66 67cc_defaults { 68 name: "libinputflinger_defaults", 69 srcs: [":libinputflinger_sources"], 70 shared_libs: [ 71 "android.hardware.input.processor-V1-ndk", 72 "libbase", 73 "libbinder", 74 "libbinder_ndk", 75 "libchrome", 76 "libcrypto", 77 "libcutils", 78 "libhidlbase", 79 "libinput", 80 "libkll", 81 "liblog", 82 "libprotobuf-cpp-lite", 83 "libstatslog", 84 "libstatspull", 85 "libstatssocket", 86 "libutils", 87 "libui", 88 "server_configurable_flags", 89 ], 90 static_libs: [ 91 "libattestation", 92 "libpalmrejection", 93 ], 94} 95 96cc_library_shared { 97 name: "libinputflinger", 98 defaults: [ 99 "inputflinger_defaults", 100 "libinputflinger_defaults", 101 ], 102 cflags: [ 103 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden 104 //-fvisibility=hidden 105 ], 106 shared_libs: [ 107 // This should consist only of dependencies from inputflinger. Other dependencies should be 108 // in cc_defaults so that they are included in the tests. 109 "libinputflinger_base", 110 "libinputreporter", 111 "libinputreader", 112 "libgui", 113 ], 114 static_libs: [ 115 "libinputdispatcher", 116 ], 117 export_static_lib_headers: [ 118 "libinputdispatcher", 119 ], 120 export_include_dirs: [ 121 ".", 122 "include", 123 ], 124} 125 126///////////////////////////////////////////////// 127// libinputflinger_base 128///////////////////////////////////////////////// 129 130cc_library_headers { 131 name: "libinputflinger_headers", 132 export_include_dirs: ["include"], 133} 134 135filegroup { 136 name: "libinputflinger_base_sources", 137 srcs: [ 138 "InputListener.cpp", 139 "InputReaderBase.cpp", 140 "InputThread.cpp", 141 "VibrationElement.cpp", 142 ], 143} 144 145cc_defaults { 146 name: "libinputflinger_base_defaults", 147 srcs: [":libinputflinger_base_sources"], 148 shared_libs: [ 149 "libbase", 150 "libcutils", 151 "libinput", 152 "liblog", 153 "libui", 154 "libutils", 155 ], 156 header_libs: [ 157 "libinputflinger_headers", 158 ], 159} 160 161cc_library_shared { 162 name: "libinputflinger_base", 163 defaults: [ 164 "inputflinger_defaults", 165 "libinputflinger_base_defaults", 166 ], 167 export_header_lib_headers: [ 168 "libinputflinger_headers", 169 ], 170} 171