| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 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 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 15 | // Default flags to be used throughout all libraries in inputflinger. | 
| Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 16 | package { | 
|  | 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 |  | 
| Michael Wright | 8e9a856 | 2022-02-09 13:44:29 +0000 | [diff] [blame] | 25 | inputflinger_tidy_checks = [ | 
|  | 26 | "android-*", | 
|  | 27 | ] | 
|  | 28 |  | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 29 | cc_defaults { | 
|  | 30 | name: "inputflinger_defaults", | 
| Siarhei Vishniakou | f47c339e | 2021-12-30 11:22:26 -0800 | [diff] [blame] | 31 | cpp_std: "c++20", | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 32 | cflags: [ | 
|  | 33 | "-Wall", | 
|  | 34 | "-Wextra", | 
|  | 35 | "-Werror", | 
|  | 36 | "-Wno-unused-parameter", | 
|  | 37 | "-Wthread-safety", | 
| Siarhei Vishniakou | b4d960d | 2019-10-03 15:38:44 -0500 | [diff] [blame] | 38 | "-Wshadow", | 
| Siarhei Vishniakou | 3cab9b6 | 2020-08-05 11:45:47 -0500 | [diff] [blame] | 39 | "-Wshadow-field-in-constructor-modified", | 
|  | 40 | "-Wshadow-uncaptured-local", | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 41 | ], | 
| Siarhei Vishniakou | d549b25 | 2020-08-11 11:25:26 -0500 | [diff] [blame] | 42 | sanitize: { | 
|  | 43 | misc_undefined: ["bounds"], | 
|  | 44 | }, | 
| Michael Wright | 8e9a856 | 2022-02-09 13:44:29 +0000 | [diff] [blame] | 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, | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 50 | } | 
|  | 51 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 52 | ///////////////////////////////////////////////// | 
|  | 53 | // libinputflinger | 
|  | 54 | ///////////////////////////////////////////////// | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 55 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 56 | filegroup { | 
|  | 57 | name: "libinputflinger_sources", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 58 | srcs: [ | 
| Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 59 | "InputClassifier.cpp", | 
| Siarhei Vishniakou | 34d6fef | 2022-02-01 19:03:45 -0800 | [diff] [blame] | 60 | "InputCommonConverter.cpp", | 
| Siarhei Vishniakou | f6db4c3 | 2022-02-10 19:46:34 -0800 | [diff] [blame] | 61 | "PreferStylusOverTouchBlocker.cpp", | 
| Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 62 | "UnwantedInteractionBlocker.cpp", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 63 | "InputManager.cpp", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 64 | ], | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 65 | } | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 66 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 67 | cc_defaults { | 
|  | 68 | name: "libinputflinger_defaults", | 
|  | 69 | srcs: [":libinputflinger_sources"], | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 70 | shared_libs: [ | 
| Siarhei Vishniakou | 34d6fef | 2022-02-01 19:03:45 -0800 | [diff] [blame] | 71 | "android.hardware.input.processor-V1-ndk", | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 72 | "libbase", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 73 | "libbinder", | 
| Siarhei Vishniakou | 34d6fef | 2022-02-01 19:03:45 -0800 | [diff] [blame] | 74 | "libbinder_ndk", | 
| Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 75 | "libchrome", | 
| Gang Wang | 342c927 | 2020-01-13 13:15:04 -0500 | [diff] [blame] | 76 | "libcrypto", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 77 | "libcutils", | 
| Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 78 | "libhidlbase", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 79 | "libinput", | 
| Siarhei Vishniakou | 99b9d38 | 2021-04-01 08:03:41 +0000 | [diff] [blame] | 80 | "libkll", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 81 | "liblog", | 
| Siarhei Vishniakou | 99b9d38 | 2021-04-01 08:03:41 +0000 | [diff] [blame] | 82 | "libprotobuf-cpp-lite", | 
| Siarhei Vishniakou | de4bf15 | 2019-08-16 11:12:52 -0500 | [diff] [blame] | 83 | "libstatslog", | 
| Siarhei Vishniakou | a04181f | 2021-03-26 05:56:49 +0000 | [diff] [blame] | 84 | "libstatspull", | 
|  | 85 | "libstatssocket", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 86 | "libutils", | 
|  | 87 | "libui", | 
| Siarhei Vishniakou | a04181f | 2021-03-26 05:56:49 +0000 | [diff] [blame] | 88 | "server_configurable_flags", | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 89 | ], | 
| chaviw | 09c8d2d | 2020-08-24 15:48:26 -0700 | [diff] [blame] | 90 | static_libs: [ | 
|  | 91 | "libattestation", | 
| Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 92 | "libpalmrejection", | 
| chaviw | 09c8d2d | 2020-08-24 15:48:26 -0700 | [diff] [blame] | 93 | ], | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 94 | } | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 95 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 96 | cc_library_shared { | 
|  | 97 | name: "libinputflinger", | 
|  | 98 | defaults: [ | 
|  | 99 | "inputflinger_defaults", | 
|  | 100 | "libinputflinger_defaults", | 
| Garfield Tan | e84e6f9 | 2019-08-29 17:28:41 -0700 | [diff] [blame] | 101 | ], | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 102 | cflags: [ | 
| Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 103 | // TODO(b/23084678): Move inputflinger to its own process and mark it hidden | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 104 | //-fvisibility=hidden | 
|  | 105 | ], | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 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", | 
| chaviw | 15fab6f | 2021-06-07 14:15:52 -0500 | [diff] [blame] | 112 | "libgui", | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 113 | ], | 
|  | 114 | static_libs: [ | 
|  | 115 | "libinputdispatcher", | 
|  | 116 | ], | 
|  | 117 | export_static_lib_headers: [ | 
|  | 118 | "libinputdispatcher", | 
|  | 119 | ], | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 120 | export_include_dirs: [ | 
|  | 121 | ".", | 
|  | 122 | "include", | 
|  | 123 | ], | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 124 | } | 
|  | 125 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 126 | ///////////////////////////////////////////////// | 
|  | 127 | // libinputflinger_base | 
|  | 128 | ///////////////////////////////////////////////// | 
|  | 129 |  | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 130 | cc_library_headers { | 
| Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 131 | name: "libinputflinger_headers", | 
|  | 132 | export_include_dirs: ["include"], | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 133 | } | 
|  | 134 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 135 | filegroup { | 
|  | 136 | name: "libinputflinger_base_sources", | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 137 | srcs: [ | 
|  | 138 | "InputListener.cpp", | 
|  | 139 | "InputReaderBase.cpp", | 
| Prabir Pradhan | 5a57cff | 2019-10-31 18:40:33 -0700 | [diff] [blame] | 140 | "InputThread.cpp", | 
| Prabir Pradhan | 8b89c2f | 2021-07-29 16:30:14 +0000 | [diff] [blame] | 141 | "VibrationElement.cpp", | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 142 | ], | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 143 | } | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 144 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 145 | cc_defaults { | 
|  | 146 | name: "libinputflinger_base_defaults", | 
|  | 147 | srcs: [":libinputflinger_base_sources"], | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 148 | shared_libs: [ | 
|  | 149 | "libbase", | 
| Zim | 23457d0 | 2022-08-17 12:57:41 +0100 | [diff] [blame] | 150 | "libbinder", | 
| Garfield Tan | ff1f1bb | 2020-01-28 13:24:04 -0800 | [diff] [blame] | 151 | "libcutils", | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 152 | "libinput", | 
|  | 153 | "liblog", | 
| chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 154 | "libui", | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 155 | "libutils", | 
|  | 156 | ], | 
| Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 157 | header_libs: [ | 
|  | 158 | "libinputflinger_headers", | 
|  | 159 | ], | 
| Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 160 | } | 
|  | 161 |  | 
| Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 162 | cc_library_shared { | 
|  | 163 | name: "libinputflinger_base", | 
|  | 164 | defaults: [ | 
|  | 165 | "inputflinger_defaults", | 
|  | 166 | "libinputflinger_base_defaults", | 
|  | 167 | ], | 
|  | 168 | export_header_lib_headers: [ | 
|  | 169 | "libinputflinger_headers", | 
|  | 170 | ], | 
|  | 171 | } |