diff options
Diffstat (limited to 'java/src/com/android/inputmethod/research/Statistics.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/Statistics.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/research/Statistics.java b/java/src/com/android/inputmethod/research/Statistics.java index 90d7f38b3..f9c072967 100644 --- a/java/src/com/android/inputmethod/research/Statistics.java +++ b/java/src/com/android/inputmethod/research/Statistics.java @@ -19,10 +19,11 @@ package com.android.inputmethod.research; import android.util.Log; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.define.ProductionFlag; public class Statistics { private static final String TAG = Statistics.class.getSimpleName(); - private static final boolean DEBUG = false; + private static final boolean DEBUG = false && ProductionFlag.IS_EXPERIMENTAL_DEBUG; // Number of characters entered during a typing session int mCharCount; @@ -42,6 +43,10 @@ public class Statistics { int mSplitWordsCount; // Number of gestures that were input. int mGestureInputCount; + // Number of gestures that were deleted. + int mGesturesDeletedCount; + // Total number of characters in words entered by gesture. + int mGestureCharsCount; // Whether the text field was empty upon editing boolean mIsEmptyUponStarting; boolean mIsEmptinessStateKnown; @@ -108,6 +113,8 @@ public class Statistics { mBeforeDeleteKeyCounter.reset(); mDuringRepeatedDeleteKeysCounter.reset(); mAfterDeleteKeyCounter.reset(); + mGestureCharsCount = 0; + mGesturesDeletedCount = 0; mLastTapTime = 0; mIsLastKeyDeleteKey = false; @@ -160,12 +167,17 @@ public class Statistics { mSplitWordsCount++; } - public void recordGestureInput() { + public void recordGestureInput(final int numCharsEntered) { mGestureInputCount++; + mGestureCharsCount += numCharsEntered; } public void setIsEmptyUponStarting(final boolean isEmpty) { mIsEmptyUponStarting = isEmpty; mIsEmptinessStateKnown = true; } + + public void recordGestureDelete() { + mGesturesDeletedCount++; + } } |