commit | 127b45db49a447276ced2241bca10b1f2eed6209 | [log] [tgz] |
---|---|---|
author | Siarhei Vishniakou <svv@google.com> | Mon Jun 13 13:56:56 2022 -0700 |
committer | Siarhei Vishniakou <svv@google.com> | Wed Jul 20 01:26:31 2022 +0000 |
tree | e0073c8be4127c83afef220832cba6960f2272b0 | |
parent | 4aeef8c4eddd447d532665e364fcc297221f9cba [diff] [blame] |
Enable resampling for palm rejection To ensure the model works well for all devices, and not just limited to 120Hz, enable resampling. Bug: 198472780 Test: verified on a tablet device Merged-In: I2e42959134276277037887b7bbb2f83e070b545f Change-Id: I2e42959134276277037887b7bbb2f83e070b545f (cherry picked from commit d5a4763037fb3c1145c5de306718b313bee9c5b2)
diff --git a/services/inputflinger/UnwantedInteractionBlocker.cpp b/services/inputflinger/UnwantedInteractionBlocker.cpp index e8930e3..3ee60a9 100644 --- a/services/inputflinger/UnwantedInteractionBlocker.cpp +++ b/services/inputflinger/UnwantedInteractionBlocker.cpp
@@ -516,7 +516,9 @@ public: AndroidPalmRejectionModel() : ::ui::OneDeviceTrainNeuralStylusPalmDetectionFilterModel(/*default version*/ "", - std::vector<float>()) {} + std::vector<float>()) { + config_.resample_touch = true; + } }; PalmRejector::PalmRejector(const AndroidPalmFilterDeviceInfo& info,