Make tracking_id const inside PalmFilterStroke

An instance of PalmFilterStroke is only supposed to be used for a specific tracking_id. This is enforced by checking (and crashing) that
the tracking_id of the slot always matches the current tracking_id.

The api 'SetTrackingId' is used to establish this for the stroke, but
it's easy to misuse, because there's no way to force the user to always set it before adding a sample.

To simplify the code, provide the tracking_id in the constructor and
make it const. This way, the user is forced to decide what the value
will be for the lifetime of the object, and won't be able to change it
after the fact.

Bug: 198472780
Test: (on android) atest libpalmrejection_test
Test: autoninja -C out/Default evdev
Merged-In: Ia3f281946ffa82ea48c3f4c32f9563b294e9221a
Change-Id: Ia3f281946ffa82ea48c3f4c32f9563b294e9221a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3328909
Reviewed-by: Xinglong Luan <alanlxl@chromium.org>
Commit-Queue: Siarhei Vishniakou <svv@google.com>
Cr-Commit-Position: refs/heads/main@{#1024112}
(cherry picked from commit 49b0d6a8296303c4dc497b5e1d30399b2002328f)
4 files changed