Skip to content

Commit 93145fb

Browse files
committed
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
1 parent 00ff628 commit 93145fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/inputflinger/reader/mapper/SlopController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ float SlopController::consumeEvent(nsecs_t eventTimeNanos, float value) {
5454
mCumulativeValue += value;
5555

5656
if (abs(mCumulativeValue) >= mSlopThreshold) {
57-
ALOGD("SlopController: did not drop event with value .%3f", value);
57+
ALOGD("SlopController: did not drop event with value %.3f", value);
5858
mHasSlopBeenMet = true;
5959
// Return the amount of value that exceeds the slop.
6060
return signOf(value) * (abs(mCumulativeValue) - mSlopThreshold);
6161
}
6262

63-
ALOGD("SlopController: dropping event with value .%3f", value);
63+
ALOGD("SlopController: dropping event with value %.3f", value);
6464
return 0;
6565
}
6666

0 commit comments

Comments
 (0)