commit | dc60efd900f7feb6f5c6d8840109ca5a84667edc | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Fri Aug 20 19:16:22 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Aug 20 19:16:22 2021 +0000 |
tree | 2ce4ff5444cf6cc0b45fc82033bbc99cdfb8b077 | |
parent | caec8590023032e03fa38409adee5b83f0ec02e9 [diff] | |
parent | a2a13d9edc72658ff06a94eea9d595c6e190f8ac [diff] |
Merge "fix long overflow when enable DEBUG_ACCELERATION" am: 0bd3275a71 am: 4fbb9e0055 am: 5d855b9b7c am: a2a13d9edc Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1802131 Change-Id: I8a676c05d4d3bf6c1b82ae3a8dab047bd8bae16c
diff --git a/libs/input/VelocityControl.cpp b/libs/input/VelocityControl.cpp index 2c04d42..255e08f 100644 --- a/libs/input/VelocityControl.cpp +++ b/libs/input/VelocityControl.cpp
@@ -53,8 +53,10 @@ if ((deltaX && *deltaX) || (deltaY && *deltaY)) { if (eventTime >= mLastMovementTime + STOP_TIME) { #if DEBUG_ACCELERATION - ALOGD("VelocityControl: stopped, last movement was %0.3fms ago", - (eventTime - mLastMovementTime) * 0.000001f); + if (mLastMovementTime != LLONG_MIN) { + ALOGD("VelocityControl: stopped, last movement was %0.3fms ago", + (eventTime - mLastMovementTime) * 0.000001f); + } #endif reset(); }