1package { 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: [ 21 "chrome_to_android_compatibility.cc", 22 "ui/events/ozone/features.cc", 23 "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", 28 "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.cc", 29 "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", 31 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_beta.cc", 32 "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_v2.cc", 33 ], 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 }, 55 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 }, 66} 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 ], 79 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 }, 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