commit | 5d67346283d5a909459ed12f628a187d0b6cf22e | [log] [tgz] |
---|---|---|
author | Siarhei Vishniakou <svv@google.com> | Fri Jul 08 10:47:57 2022 -0700 |
committer | Siarhei Vishniakou <svv@google.com> | Wed Jul 20 01:26:44 2022 +0000 |
tree | d2af7730c95033375bdf2d40b412d0fc78728fc7 | |
parent | 127b45db49a447276ced2241bca10b1f2eed6209 [diff] [blame] |
Switch to resample_period instead of bool resample_touch When resampling code got upstreamed, we had to switch the 'api surface' from using a regular bool to providing a value for the resampling period. Reference: https://chromium-review.googlesource.com/c/chromium/src/+/3689765/2..8/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_model.h#b102 Update input code accordingly. To avoid having to include base::TimeDelta inside input code, in this CL im adding a custom define of the model period to the chrome's palm rejection code. We can try to upstream that again in the future. Bug: 198472780 Test: build only Merged-In: I3d57058f45b63201dc363fc0c2528e3f90090244 Change-Id: I3d57058f45b63201dc363fc0c2528e3f90090244 (cherry picked from commit c1de2b1b7a88daf83f2912cfdf6830214478bf81)
diff --git a/services/inputflinger/UnwantedInteractionBlocker.cpp b/services/inputflinger/UnwantedInteractionBlocker.cpp index 3ee60a9..725f33f 100644 --- a/services/inputflinger/UnwantedInteractionBlocker.cpp +++ b/services/inputflinger/UnwantedInteractionBlocker.cpp
@@ -517,7 +517,7 @@ AndroidPalmRejectionModel() : ::ui::OneDeviceTrainNeuralStylusPalmDetectionFilterModel(/*default version*/ "", std::vector<float>()) { - config_.resample_touch = true; + config_.resample_period = ::ui::kResamplePeriod; } };