Use persist property for velocitytracker strategy
Currently, setting the debug.velocitytracker.strategy property is not
convenient because it requires adb shell stop; adb shell start for the
changes to be picked up everywhere. It also does not persist across
reboots.
Putting this property into persist will allow us to fishfood these
changes more easily since the config can just be done once.
Bug: 35412046
Test: adb shell setprop persist.input.velocitytracker.strategy impulse
and observe that the strategy is being changed, after adding logging to
each strategy to distinguish them.
Change-Id: I9f6eb2113cfdeccfdf784c00d7da3ac3c186e499
diff --git a/libs/input/VelocityTracker.cpp b/libs/input/VelocityTracker.cpp
index c07a812..496158b 100644
--- a/libs/input/VelocityTracker.cpp
+++ b/libs/input/VelocityTracker.cpp
@@ -115,7 +115,7 @@
// Allow the default strategy to be overridden using a system property for debugging.
if (!strategy) {
- int length = property_get("debug.velocitytracker.strategy", value, NULL);
+ int length = property_get("persist.input.velocitytracker.strategy", value, NULL);
if (length > 0) {
strategy = value;
} else {