SlopController: fix formatting of logged values
While checking b/396858976 I noticed some of these log messages with
strange formatting of the values:
InputReader: SlopController: dropping event with value .-1.000000
InputReader: SlopController: dropping event with value .3.000000
It looks like these format strings were intended to specify the
precision after the decimal point, rather than the field width.
Bug: 245989146
Change-Id: I71691d025cc5f03b26e95f96f90ab0a2281ed43b
Test: TreeHugger
Flag: EXEMPT logs only change
diff --git a/services/inputflinger/reader/mapper/SlopController.cpp b/services/inputflinger/reader/mapper/SlopController.cpp
index 9ec02a6..d55df51 100644
--- a/services/inputflinger/reader/mapper/SlopController.cpp
+++ b/services/inputflinger/reader/mapper/SlopController.cpp
@@ -54,13 +54,13 @@
mCumulativeValue += value;
if (abs(mCumulativeValue) >= mSlopThreshold) {
- ALOGD("SlopController: did not drop event with value .%3f", value);
+ ALOGD("SlopController: did not drop event with value %.3f", value);
mHasSlopBeenMet = true;
// Return the amount of value that exceeds the slop.
return signOf(value) * (abs(mCumulativeValue) - mSlopThreshold);
}
- ALOGD("SlopController: dropping event with value .%3f", value);
+ ALOGD("SlopController: dropping event with value %.3f", value);
return 0;
}