blob: 5d4225dc75771124f53ff0885eb816fa9350eb66 [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
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080025cc_defaults {
26 name: "inputflinger_defaults",
Siarhei Vishniakouf47c339e2021-12-30 11:22:26 -080027 cpp_std: "c++20",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080028 cflags: [
29 "-Wall",
30 "-Wextra",
31 "-Werror",
32 "-Wno-unused-parameter",
33 "-Wthread-safety",
Siarhei Vishniakoub4d960d2019-10-03 15:38:44 -050034 "-Wshadow",
Siarhei Vishniakou3cab9b62020-08-05 11:45:47 -050035 "-Wshadow-field-in-constructor-modified",
36 "-Wshadow-uncaptured-local",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080037 ],
Siarhei Vishniakoud549b252020-08-11 11:25:26 -050038 sanitize: {
39 misc_undefined: ["bounds"],
40 },
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080041}
42
Prabir Pradhan9244aea2020-02-05 20:31:40 -080043/////////////////////////////////////////////////
44// libinputflinger
45/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070046
Prabir Pradhan9244aea2020-02-05 20:31:40 -080047filegroup {
48 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070049 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080050 "InputClassifier.cpp",
Siarhei Vishniakou34d6fef2022-02-01 19:03:45 -080051 "InputCommonConverter.cpp",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070052 "UnwantedInteractionBlocker.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070053 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070054 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080055}
Colin Cross45a1b9c2017-04-19 16:56:46 -070056
Prabir Pradhan9244aea2020-02-05 20:31:40 -080057cc_defaults {
58 name: "libinputflinger_defaults",
59 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070060 shared_libs: [
Siarhei Vishniakou34d6fef2022-02-01 19:03:45 -080061 "android.hardware.input.processor-V1-ndk",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080062 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070063 "libbinder",
Siarhei Vishniakou34d6fef2022-02-01 19:03:45 -080064 "libbinder_ndk",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070065 "libchrome",
Gang Wang342c9272020-01-13 13:15:04 -050066 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070067 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080068 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070069 "libinput",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000070 "libkll",
Colin Cross45a1b9c2017-04-19 16:56:46 -070071 "liblog",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000072 "libprotobuf-cpp-lite",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050073 "libstatslog",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000074 "libstatspull",
75 "libstatssocket",
Colin Cross45a1b9c2017-04-19 16:56:46 -070076 "libutils",
77 "libui",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000078 "server_configurable_flags",
Colin Cross45a1b9c2017-04-19 16:56:46 -070079 ],
chaviw09c8d2d2020-08-24 15:48:26 -070080 static_libs: [
81 "libattestation",
Siarhei Vishniakouba0a8752021-09-14 14:43:25 -070082 "libpalmrejection",
chaviw09c8d2d2020-08-24 15:48:26 -070083 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080084}
Colin Cross45a1b9c2017-04-19 16:56:46 -070085
Prabir Pradhan9244aea2020-02-05 20:31:40 -080086cc_library_shared {
87 name: "libinputflinger",
88 defaults: [
89 "inputflinger_defaults",
90 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070091 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070092 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080093 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070094 //-fvisibility=hidden
95 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080096 shared_libs: [
97 // This should consist only of dependencies from inputflinger. Other dependencies should be
98 // in cc_defaults so that they are included in the tests.
99 "libinputflinger_base",
100 "libinputreporter",
101 "libinputreader",
chaviw15fab6f2021-06-07 14:15:52 -0500102 "libgui",
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800103 ],
104 static_libs: [
105 "libinputdispatcher",
106 ],
107 export_static_lib_headers: [
108 "libinputdispatcher",
109 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800110 export_include_dirs: [
111 ".",
112 "include",
113 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800114}
115
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800116/////////////////////////////////////////////////
117// libinputflinger_base
118/////////////////////////////////////////////////
119
Prabir Pradhan29c95332018-11-14 20:14:11 -0800120cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -0800121 name: "libinputflinger_headers",
122 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800123}
124
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800125filegroup {
126 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800127 srcs: [
128 "InputListener.cpp",
129 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700130 "InputThread.cpp",
Prabir Pradhan8b89c2f2021-07-29 16:30:14 +0000131 "VibrationElement.cpp",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800132 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800133}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800134
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800135cc_defaults {
136 name: "libinputflinger_base_defaults",
137 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800138 shared_libs: [
139 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800140 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800141 "libinput",
142 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700143 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800144 "libutils",
145 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800146 header_libs: [
147 "libinputflinger_headers",
148 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700149}
150
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800151cc_library_shared {
152 name: "libinputflinger_base",
153 defaults: [
154 "inputflinger_defaults",
155 "libinputflinger_base_defaults",
156 ],
157 export_header_lib_headers: [
158 "libinputflinger_headers",
159 ],
160}