• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_team: "trendy_team_input_framework",
3    default_applicable_licenses: ["external_libpalmrejection_license"],
4}
5
6license {
7    name: "external_libpalmrejection_license",
8    visibility: [":__subpackages__"],
9    license_kinds: [
10        "SPDX-license-identifier-BSD",
11    ],
12    license_text: [
13        "LICENSE",
14    ],
15}
16
17cc_library_static {
18    name: "libpalmrejection",
19    local_include_dirs: ["."],
20    export_include_dirs: ["."],
21    srcs: [
22        "chrome_to_android_compatibility.cc",
23        "ui/events/ozone/features.cc",
24        "ui/events/ozone/evdev/touch_evdev_types.cc",
25        "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter.cc",
26        "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_model.cc",
27        "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc",
28        "ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc",
29        "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.cc",
30        "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_model.cc",
31        "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference.cc",
32        "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_beta.cc",
33        "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_v2.cc",
34    ],
35    visibility: [
36        "//frameworks/native/services/inputflinger:__subpackages__",
37    ],
38    shared_libs: [
39        "libchrome",
40    ],
41    cpp_std: "c++20",
42    cflags: [
43        "-Wall",
44        "-Wextra",
45        "-Werror",
46        "-Wthread-safety",
47        "-Wshadow",
48        "-Wshadow-field-in-constructor-modified",
49        "-Wshadow-uncaptured-local",
50        "-Wno-unused-parameter",
51        "-Wno-unneeded-internal-declaration",
52    ],
53    sanitize: {
54        misc_undefined: ["bounds"],
55    },
56    host_supported: true,
57    target: {
58        host: {
59            include_dirs: [
60                "bionic/libc/kernel/uapi",
61            ],
62            cflags: [
63                "-D__ANDROID_HOST__",
64            ],
65        },
66    },
67}
68
69cc_test {
70    name: "libpalmrejection_test",
71    srcs: [
72        "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_unittest.cc",
73        "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc",
74        "chrome_to_android_compatibility_test_support.cc",
75    ],
76    shared_libs: [
77        "libbase",
78        "libchrome",
79    ],
80    static_libs: [
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    },
98    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    },
112    test_suites: ["device-tests"],
113}
114