From c0a732f0320b0d125610adf23d14d742860b5fd3 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 5 Aug 2013 18:39:07 +0900 Subject: Remove CODE_RESEARCH Instead of CODE_RESEARCH, special outputText ".research." is used to invoke a research feedback dialog. Change-Id: Ic95c956ab4f2b5f0c3f2205c9bbcdcfb67db5d6e --- java/src/com/android/inputmethod/research/ResearchLogger.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'java/src/com/android/inputmethod/research/ResearchLogger.java') diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index 25187ced1..0bd493970 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -132,6 +132,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang // FEEDBACK_WORD_BUFFER_SIZE should add 1 because it must also hold the feedback LogUnit itself. public static final int FEEDBACK_WORD_BUFFER_SIZE = (Integer.MAX_VALUE - 1) + 1; + // The special output text to invoke a research feedback dialog. + public static final String RESEARCH_KEY_OUTPUT_TEXT = ".research."; + // constants related to specific log points private static final String WHITESPACE_SEPARATORS = " \t\n\r"; private static final int MAX_INPUTVIEW_LENGTH_TO_CAPTURE = 8192; // must be >=1 @@ -402,6 +405,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } public void onResearchKeySelected(final LatinIME latinIME) { + mCurrentLogUnit.removeResearchButtonInvocation(); if (mInFeedbackDialog) { Toast.makeText(latinIME, R.string.research_please_exit_feedback_form, Toast.LENGTH_LONG).show(); @@ -1506,16 +1510,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang Constants.printableCode(scrubDigitFromCodePoint(code)), outputText == null ? null : scrubDigitsFromString(outputText.toString()), x, y, ignoreModifierKey, altersCode, key.isEnabled()); - if (code == Constants.CODE_RESEARCH) { - researchLogger.suppressResearchKeyMotionData(); - } } } - private void suppressResearchKeyMotionData() { - mCurrentLogUnit.removeResearchButtonInvocation(); - } - /** * Log a call to PointerTracker.callListenerCallListenerOnRelease(). * -- cgit v1.2.3-83-g751a