Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["external_libpalmrejection_license"], |
| 3 | } |
| 4 | |
| 5 | license { |
| 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 | |
| 16 | cc_library_static { |
| 17 | name: "libpalmrejection", |
| 18 | local_include_dirs: ["."], |
| 19 | export_include_dirs: ["."], |
| 20 | srcs: [ |
Siarhei Vishniakou | 9b40752 | 2022-09-20 23:56:57 +0000 | [diff] [blame] | 21 | "chrome_to_android_compatibility.cc", |
alanlxl | 362f08a | 2022-02-01 00:24:16 +0000 | [diff] [blame] | 22 | "ui/events/ozone/features.cc", |
Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 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", |
Siarhei Vishniakou | 58c888f | 2022-07-07 18:25:36 -0700 | [diff] [blame] | 28 | "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.cc", |
Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 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", |
Jing Wang | dbab8a9 | 2022-05-25 01:43:19 +0000 | [diff] [blame] | 31 | "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_beta.cc", |
alanlxl | 362f08a | 2022-02-01 00:24:16 +0000 | [diff] [blame] | 32 | "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference_v2.cc", |
Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 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 | }, |
Siarhei Vishniakou | 5c27932 | 2022-03-03 16:02:36 -0800 | [diff] [blame] | 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 | }, |
Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | cc_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 Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 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 | }, |
Siarhei Vishniakou | 5c27932 | 2022-03-03 16:02:36 -0800 | [diff] [blame] | 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 | }, |
Siarhei Vishniakou | b97dd69 | 2022-01-27 16:01:46 -0800 | [diff] [blame] | 112 | test_suites: ["device-tests"], |
| 113 | } |