blob: d0ab4dd2c9e263bf66d3ac9b8f83990786a267ce [file] [log] [blame]
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -08001package {
2 default_applicable_licenses: ["external_libpalmrejection_license"],
3}
4
5license {
6 name: "external_libpalmrejection_license",
7 visibility: [":__subpackages__"],
8 license_kinds: [
9 "SPDX-license-identifier-BSD",
10 ],
11 license_text: [
12 "LICENSE",
13 ],
14}
15
16cc_library_static {
17 name: "libpalmrejection",
18 local_include_dirs: ["."],
19 export_include_dirs: ["."],
20 srcs: [
Siarhei Vishniakou9b407522022-09-20 23:56:57 +000021 "chrome_to_android_compatibility.cc",
alanlxl362f08a2022-02-01 00:24:16 +000022 "ui/events/ozone/features.cc",
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -080023 "ui/events/ozone/evdev/touch_evdev_types.cc",
24 "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter.cc",
25 "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_model.cc",
26 "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc",
27 "ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc",
Siarhei Vishniakou58c888f2022-07-07 18:25:36 -070028 "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.cc",
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -080029 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_model.cc",
30 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference.cc",
Jing Wangdbab8a92022-05-25 01:43:19 +000031 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_beta.cc",
alanlxl362f08a2022-02-01 00:24:16 +000032 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_v2.cc",
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -080033 ],
34 visibility: [
35 "//frameworks/native/services/inputflinger:__subpackages__",
36 ],
37 shared_libs: [
38 "libchrome",
39 ],
40 cpp_std: "c++20",
41 cflags: [
42 "-Wall",
43 "-Wextra",
44 "-Werror",
45 "-Wthread-safety",
46 "-Wshadow",
47 "-Wshadow-field-in-constructor-modified",
48 "-Wshadow-uncaptured-local",
49 "-Wno-unused-parameter",
50 "-Wno-unneeded-internal-declaration",
51 ],
52 sanitize: {
53 misc_undefined: ["bounds"],
54 },
Siarhei Vishniakou5c279322022-03-03 16:02:36 -080055 host_supported: true,
56 target: {
57 host: {
58 include_dirs: [
59 "bionic/libc/kernel/uapi",
60 ],
61 cflags: [
62 "-D__ANDROID_HOST__",
63 ],
64 },
65 },
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -080066}
67
68cc_test {
69 name: "libpalmrejection_test",
70 srcs: [
71 "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_unittest.cc",
72 "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc",
73 "chrome_to_android_compatibility_test_support.cc",
74 ],
75 shared_libs: [
76 "libbase",
77 "libchrome",
78 ],
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -080079 static_libs: [
80 "libc++fs",
81 "libgmock",
82 "liblog",
83 "libpalmrejection",
84 ],
85 cpp_std: "c++20",
86 cflags: [
87 "-Wall",
88 "-Wextra",
89 "-Werror",
90 "-Wthread-safety",
91 "-Wshadow",
92 "-Wshadow-field-in-constructor-modified",
93 "-Wshadow-uncaptured-local",
94 ],
95 sanitize: {
96 misc_undefined: ["bounds"],
97 },
Siarhei Vishniakou5c279322022-03-03 16:02:36 -080098 host_supported: true,
99 target: {
100 host: {
101 include_dirs: [
102 "bionic/libc/kernel/uapi",
103 ],
104 cflags: [
105 "-D__ANDROID_HOST__",
106 ],
107 },
108 },
109 test_options: {
110 unit_test: true,
111 },
Siarhei Vishniakoub97dd692022-01-27 16:01:46 -0800112 test_suites: ["device-tests"],
113}