blob: 6c77c8c64718188a6d100034322781e47032449b [file] [log] [blame]
Colin Cross45a1b9c2017-04-19 16:56:46 -07001// 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 Pradhan9244aea2020-02-05 20:31:40 -080015// Default flags to be used throughout all libraries in inputflinger.
Bob Badour3306e492021-02-25 15:35:37 -080016package {
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 Wright8e9a8562022-02-09 13:44:29 +000025inputflinger_tidy_checks = [
26 "android-*",
27]
28
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080029cc_defaults {
30 name: "inputflinger_defaults",
Siarhei Vishniakouf47c339e2021-12-30 11:22:26 -080031 cpp_std: "c++20",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080032 cflags: [
33 "-Wall",
34 "-Wextra",
35 "-Werror",
36 "-Wno-unused-parameter",
37 "-Wthread-safety",
Siarhei Vishniakoub4d960d2019-10-03 15:38:44 -050038 "-Wshadow",
Siarhei Vishniakou3cab9b62020-08-05 11:45:47 -050039 "-Wshadow-field-in-constructor-modified",
40 "-Wshadow-uncaptured-local",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080041 ],
Siarhei Vishniakoud549b252020-08-11 11:25:26 -050042 sanitize: {
43 misc_undefined: ["bounds"],
44 },
Michael Wright8e9a8562022-02-09 13:44:29 +000045 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 Vishniakou61291d42019-02-11 18:13:20 -080050}
51
Prabir Pradhan9244aea2020-02-05 20:31:40 -080052/////////////////////////////////////////////////
53// libinputflinger
54/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070055
Prabir Pradhan9244aea2020-02-05 20:31:40 -080056filegroup {
57 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070058 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080059 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070060 "InputClassifierConverter.cpp",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070061 "UnwantedInteractionBlocker.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070062 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070063 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080064}
Colin Cross45a1b9c2017-04-19 16:56:46 -070065
Prabir Pradhan9244aea2020-02-05 20:31:40 -080066cc_defaults {
67 name: "libinputflinger_defaults",
68 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070069 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080070 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080071 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070072 "libbinder",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070073 "libchrome",
Gang Wang342c9272020-01-13 13:15:04 -050074 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070075 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080076 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070077 "libinput",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000078 "libkll",
Colin Cross45a1b9c2017-04-19 16:56:46 -070079 "liblog",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000080 "libprotobuf-cpp-lite",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050081 "libstatslog",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000082 "libstatspull",
83 "libstatssocket",
Colin Cross45a1b9c2017-04-19 16:56:46 -070084 "libutils",
85 "libui",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000086 "server_configurable_flags",
Colin Cross45a1b9c2017-04-19 16:56:46 -070087 ],
chaviw09c8d2d2020-08-24 15:48:26 -070088 static_libs: [
89 "libattestation",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070090 "libpalmrejection",
chaviw09c8d2d2020-08-24 15:48:26 -070091 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080092}
Colin Cross45a1b9c2017-04-19 16:56:46 -070093
Prabir Pradhan9244aea2020-02-05 20:31:40 -080094cc_library_shared {
95 name: "libinputflinger",
96 defaults: [
97 "inputflinger_defaults",
98 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070099 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700100 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -0800101 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -0700102 //-fvisibility=hidden
103 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800104 shared_libs: [
105 // This should consist only of dependencies from inputflinger. Other dependencies should be
106 // in cc_defaults so that they are included in the tests.
107 "libinputflinger_base",
108 "libinputreporter",
109 "libinputreader",
chaviw15fab6f2021-06-07 14:15:52 -0500110 "libgui",
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800111 ],
112 static_libs: [
113 "libinputdispatcher",
114 ],
115 export_static_lib_headers: [
116 "libinputdispatcher",
117 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800118 export_include_dirs: [
119 ".",
120 "include",
121 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800122}
123
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800124/////////////////////////////////////////////////
125// libinputflinger_base
126/////////////////////////////////////////////////
127
Prabir Pradhan29c95332018-11-14 20:14:11 -0800128cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -0800129 name: "libinputflinger_headers",
130 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800131}
132
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800133filegroup {
134 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800135 srcs: [
136 "InputListener.cpp",
137 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700138 "InputThread.cpp",
Prabir Pradhan8b89c2f2021-07-29 16:30:14 +0000139 "VibrationElement.cpp",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800140 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800141}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800142
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800143cc_defaults {
144 name: "libinputflinger_base_defaults",
145 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800146 shared_libs: [
147 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800148 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800149 "libinput",
150 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700151 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800152 "libutils",
153 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800154 header_libs: [
155 "libinputflinger_headers",
156 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700157}
158
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800159cc_library_shared {
160 name: "libinputflinger_base",
161 defaults: [
162 "inputflinger_defaults",
163 "libinputflinger_base_defaults",
164 ],
165 export_header_lib_headers: [
166 "libinputflinger_headers",
167 ],
168}