Stop error log during touch-up
Horizontal swipe will cause touch-up event without touch-down, so
error log for the negative touch count is just inappropriate.
Change-Id: I83c8e548d633d5df2f989711a6baac26dbdc5693
diff --git a/src/com/android/contacts/dialpad/DialpadFragment.java b/src/com/android/contacts/dialpad/DialpadFragment.java
index 5f5a855..9a3f3e7 100644
--- a/src/com/android/contacts/dialpad/DialpadFragment.java
+++ b/src/com/android/contacts/dialpad/DialpadFragment.java
@@ -801,9 +801,9 @@
view.jumpDrawablesToCurrentState();
mDialpadPressCount--;
if (mDialpadPressCount < 0) {
- // This must be a very buggy situation in which the number of touch-down events
- // don't match that of touch-up. We should tolerate the situation anyway.
- Log.e(TAG, "mKeyPressCount become negative.");
+ // May happen when the user action is detected as horizontal swipe, at which only
+ // "up" event is thrown.
+ if (DEBUG) Log.d(TAG, "mKeyPressCount become negative.");
stopTone();
mDialpadPressCount = 0;
} else if (mDialpadPressCount == 0) {