xref: /aosp_15_r20/frameworks/native/services/inputflinger/reader/Android.bp (revision 38e8c45f13ce32b0dcecb25141ffecaf386fa17f)
1// Copyright (C) 2019 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
15package {
16    default_team: "trendy_team_input_framework",
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
25cc_library_headers {
26    name: "libinputreader_headers",
27    host_supported: true,
28    export_include_dirs: [
29        "controller",
30        "include",
31        "mapper",
32        "mapper/accumulator",
33        "mapper/gestures",
34    ],
35}
36
37filegroup {
38    name: "libinputreader_sources",
39    srcs: [
40        "EventHub.cpp",
41        "InputDevice.cpp",
42        "InputReader.cpp",
43        "Macros.cpp",
44        "TouchVideoDevice.cpp",
45        "controller/PeripheralController.cpp",
46        "mapper/CapturedTouchpadEventConverter.cpp",
47        "mapper/CursorInputMapper.cpp",
48        "mapper/ExternalStylusInputMapper.cpp",
49        "mapper/InputMapper.cpp",
50        "mapper/JoystickInputMapper.cpp",
51        "mapper/KeyboardInputMapper.cpp",
52        "mapper/MultiTouchInputMapper.cpp",
53        "mapper/RotaryEncoderInputMapper.cpp",
54        "mapper/SensorInputMapper.cpp",
55        "mapper/SingleTouchInputMapper.cpp",
56        "mapper/SlopController.cpp",
57        "mapper/SwitchInputMapper.cpp",
58        "mapper/TouchCursorInputMapperCommon.cpp",
59        "mapper/TouchInputMapper.cpp",
60        "mapper/TouchpadInputMapper.cpp",
61        "mapper/VibratorInputMapper.cpp",
62        "mapper/accumulator/CursorButtonAccumulator.cpp",
63        "mapper/accumulator/CursorScrollAccumulator.cpp",
64        "mapper/accumulator/HidUsageAccumulator.cpp",
65        "mapper/accumulator/MultiTouchMotionAccumulator.cpp",
66        "mapper/accumulator/SingleTouchMotionAccumulator.cpp",
67        "mapper/accumulator/TouchButtonAccumulator.cpp",
68        "mapper/gestures/GestureConverter.cpp",
69        "mapper/gestures/GesturesLogging.cpp",
70        "mapper/gestures/HardwareProperties.cpp",
71        "mapper/gestures/HardwareStateConverter.cpp",
72        "mapper/gestures/PropertyProvider.cpp",
73        "mapper/gestures/TimerProvider.cpp",
74    ],
75}
76
77cc_defaults {
78    name: "libinputreader_defaults",
79    srcs: [":libinputreader_sources"],
80    shared_libs: [
81        "android.companion.virtualdevice.flags-aconfig-cc",
82        "libbase",
83        "libcap",
84        "libcrypto",
85        "libcutils",
86        "libjsoncpp",
87        "libinput",
88        "liblog",
89        "libPlatformProperties",
90        "libstatslog",
91        "libstatspull",
92        "libutils",
93        "libstatssocket",
94    ],
95    static_libs: [
96        "libchrome-gestures",
97        "libui-types",
98        "libexpresslog",
99        "libtextclassifier_hash_static",
100        "libstatslog_express",
101    ],
102    header_libs: [
103        "libbatteryservice_headers",
104        "libchrome-gestures_headers",
105        "libinputreader_headers",
106    ],
107    target: {
108        host: {
109            static_libs: [
110                "libbinder",
111            ],
112        },
113    },
114}
115
116cc_library_static {
117    name: "libinputreader_static",
118    defaults: [
119        "inputflinger_defaults",
120        "libinputreader_defaults",
121    ],
122    shared_libs: [
123        "libinputflinger_base",
124    ],
125    export_header_lib_headers: [
126        "libbatteryservice_headers",
127        "libchrome-gestures_headers",
128        "libinputreader_headers",
129    ],
130    whole_static_libs: [
131        "libchrome-gestures",
132    ],
133}
134
135cc_library_shared {
136    name: "libinputreader",
137    host_supported: true,
138    defaults: [
139        "inputflinger_defaults",
140        "libinputreader_defaults",
141    ],
142    srcs: [
143        "InputReaderFactory.cpp",
144    ],
145    shared_libs: [
146        // This should consist only of dependencies from inputflinger. Other dependencies should be
147        // in cc_defaults so that they are included in the tests.
148        "libinputflinger_base",
149        "libjsoncpp",
150    ],
151    export_header_lib_headers: [
152        "libinputreader_headers",
153    ],
154    target: {
155        host: {
156            include_dirs: [
157                "bionic/libc/kernel/android/uapi/",
158                "bionic/libc/kernel/uapi",
159            ],
160        },
161    },
162    static_libs: [
163        "libchrome-gestures",
164    ],
165}
166