am ab9f4fd3: Merge "[Rlog7] ResearchLog improve gesture tracking"
* commit 'ab9f4fd35932a6f513f36d14dc77f559209b1131': [Rlog7] ResearchLog improve gesture trackingmain
commit
d3cd23932f
|
@ -1681,6 +1681,9 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
if (mWordComposer.isBatchMode()) {
|
if (mWordComposer.isBatchMode()) {
|
||||||
mWordComposer.reset();
|
mWordComposer.reset();
|
||||||
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
|
ResearchLogger.latinIME_handleBackspace_batch(mWordComposer.getTypedWord());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mWordComposer.deleteLast();
|
mWordComposer.deleteLast();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1221,7 +1221,15 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
final ResearchLogger researchLogger = getInstance();
|
final ResearchLogger researchLogger = getInstance();
|
||||||
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONENDBATCHINPUT, enteredText,
|
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONENDBATCHINPUT, enteredText,
|
||||||
enteredWordPos);
|
enteredWordPos);
|
||||||
researchLogger.mStatistics.recordGestureInput();
|
researchLogger.mStatistics.recordGestureInput(enteredText.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final LogStatement LOGSTATEMENT_LATINIME_HANDLEBACKSPACE_BATCH =
|
||||||
|
new LogStatement("LatinIMEHandleBackspaceBatch", true, false, "deletedText");
|
||||||
|
public static void latinIME_handleBackspace_batch(final CharSequence deletedText) {
|
||||||
|
final ResearchLogger researchLogger = getInstance();
|
||||||
|
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_HANDLEBACKSPACE_BATCH, deletedText);
|
||||||
|
researchLogger.mStatistics.recordGestureDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final LogStatement LOGSTATEMENT_STATISTICS =
|
private static final LogStatement LOGSTATEMENT_STATISTICS =
|
||||||
|
@ -1229,7 +1237,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
"spaceCount", "deleteOpsCount", "wordCount", "isEmptyUponStarting",
|
"spaceCount", "deleteOpsCount", "wordCount", "isEmptyUponStarting",
|
||||||
"isEmptinessStateKnown", "averageTimeBetweenKeys", "averageTimeBeforeDelete",
|
"isEmptinessStateKnown", "averageTimeBetweenKeys", "averageTimeBeforeDelete",
|
||||||
"averageTimeDuringRepeatedDelete", "averageTimeAfterDelete",
|
"averageTimeDuringRepeatedDelete", "averageTimeAfterDelete",
|
||||||
"dictionaryWordCount", "splitWordsCount", "gestureInputCount");
|
"dictionaryWordCount", "splitWordsCount", "gestureInputCount",
|
||||||
|
"gestureCharsCount", "gesturesDeletedCount");
|
||||||
private static void logStatistics() {
|
private static void logStatistics() {
|
||||||
final ResearchLogger researchLogger = getInstance();
|
final ResearchLogger researchLogger = getInstance();
|
||||||
final Statistics statistics = researchLogger.mStatistics;
|
final Statistics statistics = researchLogger.mStatistics;
|
||||||
|
@ -1241,6 +1250,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
statistics.mDuringRepeatedDeleteKeysCounter.getAverageTime(),
|
statistics.mDuringRepeatedDeleteKeysCounter.getAverageTime(),
|
||||||
statistics.mAfterDeleteKeyCounter.getAverageTime(),
|
statistics.mAfterDeleteKeyCounter.getAverageTime(),
|
||||||
statistics.mDictionaryWordCount, statistics.mSplitWordsCount,
|
statistics.mDictionaryWordCount, statistics.mSplitWordsCount,
|
||||||
statistics.mGestureInputCount);
|
statistics.mGestureInputCount,
|
||||||
|
statistics.mGestureCharsCount,
|
||||||
|
statistics.mGesturesDeletedCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,10 @@ public class Statistics {
|
||||||
int mSplitWordsCount;
|
int mSplitWordsCount;
|
||||||
// Number of gestures that were input.
|
// Number of gestures that were input.
|
||||||
int mGestureInputCount;
|
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
|
// Whether the text field was empty upon editing
|
||||||
boolean mIsEmptyUponStarting;
|
boolean mIsEmptyUponStarting;
|
||||||
boolean mIsEmptinessStateKnown;
|
boolean mIsEmptinessStateKnown;
|
||||||
|
@ -109,6 +113,8 @@ public class Statistics {
|
||||||
mBeforeDeleteKeyCounter.reset();
|
mBeforeDeleteKeyCounter.reset();
|
||||||
mDuringRepeatedDeleteKeysCounter.reset();
|
mDuringRepeatedDeleteKeysCounter.reset();
|
||||||
mAfterDeleteKeyCounter.reset();
|
mAfterDeleteKeyCounter.reset();
|
||||||
|
mGestureCharsCount = 0;
|
||||||
|
mGesturesDeletedCount = 0;
|
||||||
|
|
||||||
mLastTapTime = 0;
|
mLastTapTime = 0;
|
||||||
mIsLastKeyDeleteKey = false;
|
mIsLastKeyDeleteKey = false;
|
||||||
|
@ -161,12 +167,17 @@ public class Statistics {
|
||||||
mSplitWordsCount++;
|
mSplitWordsCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void recordGestureInput() {
|
public void recordGestureInput(final int numCharsEntered) {
|
||||||
mGestureInputCount++;
|
mGestureInputCount++;
|
||||||
|
mGestureCharsCount += numCharsEntered;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsEmptyUponStarting(final boolean isEmpty) {
|
public void setIsEmptyUponStarting(final boolean isEmpty) {
|
||||||
mIsEmptyUponStarting = isEmpty;
|
mIsEmptyUponStarting = isEmpty;
|
||||||
mIsEmptinessStateKnown = true;
|
mIsEmptinessStateKnown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void recordGestureDelete() {
|
||||||
|
mGesturesDeletedCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue