xref: /aosp_15_r20/frameworks/native/services/inputflinger/dispatcher/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: "libinputdispatcher_headers",
27    host_supported: true,
28    export_include_dirs: [
29        "include",
30    ],
31}
32
33filegroup {
34    name: "libinputdispatcher_sources",
35    srcs: [
36        "AnrTracker.cpp",
37        "Connection.cpp",
38        "DebugConfig.cpp",
39        "DragState.cpp",
40        "Entry.cpp",
41        "FocusResolver.cpp",
42        "InjectionState.cpp",
43        "InputDispatcher.cpp",
44        "InputDispatcherFactory.cpp",
45        "InputEventTimeline.cpp",
46        "InputState.cpp",
47        "InputTarget.cpp",
48        "LatencyAggregator.cpp",
49        "LatencyAggregatorWithHistograms.cpp",
50        "LatencyTracker.cpp",
51        "Monitor.cpp",
52        "TouchedWindow.cpp",
53        "TouchState.cpp",
54        "trace/*.cpp",
55    ],
56}
57
58cc_defaults {
59    name: "libinputdispatcher_defaults",
60    srcs: [
61        ":libinputdispatcher_sources",
62    ],
63    shared_libs: [
64        "libbase",
65        "libbinder",
66        "libbinder_ndk",
67        "libcrypto",
68        "libcutils",
69        "libinput",
70        "libkll",
71        "liblog",
72        "libprotobuf-cpp-lite",
73        "libstatslog",
74        "libutils",
75        "libstatspull",
76        "libstatssocket",
77        "packagemanager_aidl-cpp",
78        "server_configurable_flags",
79    ],
80    static_libs: [
81        "libattestation",
82        "libgui_window_info_static",
83        "libperfetto_client_experimental",
84        "perfetto_winscope_extensions_zero",
85    ],
86    target: {
87        android: {
88            shared_libs: [
89                "libgui",
90            ],
91        },
92    },
93    header_libs: [
94        "libinputdispatcher_headers",
95    ],
96}
97
98cc_library_static {
99    name: "libinputdispatcher",
100    host_supported: true,
101    defaults: [
102        "inputflinger_defaults",
103        "libinputdispatcher_defaults",
104    ],
105    shared_libs: [
106        // This should consist only of dependencies from inputflinger. Other dependencies should be
107        // in cc_defaults so that they are included in the tests.
108        "libinputflinger_base",
109        "libinputreporter",
110    ],
111    export_header_lib_headers: [
112        "libinputdispatcher_headers",
113    ],
114    logtags: ["EventLogTags.logtags"],
115}
116