Loading java/src/com/android/inputmethod/research/LogStatement.java +4 −5 Original line number Diff line number Diff line Loading @@ -29,13 +29,12 @@ class LogStatement { "PointerTrackerCallListenerOnCodeInput"; public static final String KEY_CODE = "code"; public static final String VALUE_RESEARCH = "research"; public static final String TYPE_LATIN_KEYBOARD_VIEW_ON_LONG_PRESS = "LatinKeyboardViewOnLongPress"; public static final String TYPE_MAIN_KEYBOARD_VIEW_ON_LONG_PRESS = "MainKeyboardViewOnLongPress"; public static final String ACTION = "action"; public static final String VALUE_DOWN = "DOWN"; public static final String TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS = "LatinKeyboardViewProcessMotionEvents"; public static final String KEY_LOGGING_RELATED = "loggingRelated"; public static final String TYPE_MOTION_EVENT = "MotionEvent"; public static final String KEY_IS_LOGGING_RELATED = "isLoggingRelated"; // Name specifying the LogStatement type. private final String mType; Loading java/src/com/android/inputmethod/research/LogUnit.java +4 −5 Original line number Diff line number Diff line Loading @@ -453,13 +453,12 @@ import java.util.List; // Look for the long press that started the invocation of the research key code input. final int indexOfLastLongPressBeforeResearchKey = findLastIndexBefore(LogStatement.TYPE_LATIN_KEYBOARD_VIEW_ON_LONG_PRESS, findLastIndexBefore(LogStatement.TYPE_MAIN_KEYBOARD_VIEW_ON_LONG_PRESS, indexOfLastResearchKey); // Look for DOWN event preceding the long press final int indexOfLastDownEventBeforeLongPress = findLastIndexContainingKeyValueBefore( LogStatement.TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS, findLastIndexContainingKeyValueBefore(LogStatement.TYPE_MOTION_EVENT, LogStatement.ACTION, LogStatement.VALUE_DOWN, indexOfLastLongPressBeforeResearchKey); Loading @@ -471,8 +470,8 @@ import java.util.List; final LogStatement logStatement = mLogStatementList.get(index); final String type = logStatement.getType(); final Object[] values = mValuesList.get(index); if (type.equals(LogStatement.TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS)) { logStatement.setValue(LogStatement.KEY_LOGGING_RELATED, values, true); if (type.equals(LogStatement.TYPE_MOTION_EVENT)) { logStatement.setValue(LogStatement.KEY_IS_LOGGING_RELATED, values, true); } } return true; Loading java/src/com/android/inputmethod/research/MotionEventReader.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class MotionEventReader { jsonReader.endObject(); if (logStatementType != null && time != null && x != null && y != null && actionType != null && logStatementType.equals("MainKeyboardViewProcessMotionEvent") && logStatementType.equals("MotionEvent") && !loggingRelated) { replayData.mActions.add(actionType); replayData.mXCoords.add(x); Loading java/src/com/android/inputmethod/research/ResearchLogger.java +3 −2 Original line number Diff line number Diff line Loading @@ -1162,7 +1162,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang * */ private static final LogStatement LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT = new LogStatement("MotionEvent", true, false, "action", "MotionEvent", "loggingRelated"); new LogStatement("MotionEvent", true, false, "action", LogStatement.KEY_IS_LOGGING_RELATED, "motionEvent"); public static void mainKeyboardView_processMotionEvent(final MotionEvent me, final int action, final long eventTime, final int index, final int id, final int x, final int y) { if (me != null) { Loading @@ -1179,7 +1180,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } final ResearchLogger researchLogger = getInstance(); researchLogger.enqueueEvent(LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT, actionString, MotionEvent.obtain(me), false); actionString, false /* IS_LOGGING_RELATED */, MotionEvent.obtain(me)); if (action == MotionEvent.ACTION_DOWN) { // Subtract 1 from eventTime so the down event is included in the later // LogUnit, not the earlier (the test is for inequality). Loading Loading
java/src/com/android/inputmethod/research/LogStatement.java +4 −5 Original line number Diff line number Diff line Loading @@ -29,13 +29,12 @@ class LogStatement { "PointerTrackerCallListenerOnCodeInput"; public static final String KEY_CODE = "code"; public static final String VALUE_RESEARCH = "research"; public static final String TYPE_LATIN_KEYBOARD_VIEW_ON_LONG_PRESS = "LatinKeyboardViewOnLongPress"; public static final String TYPE_MAIN_KEYBOARD_VIEW_ON_LONG_PRESS = "MainKeyboardViewOnLongPress"; public static final String ACTION = "action"; public static final String VALUE_DOWN = "DOWN"; public static final String TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS = "LatinKeyboardViewProcessMotionEvents"; public static final String KEY_LOGGING_RELATED = "loggingRelated"; public static final String TYPE_MOTION_EVENT = "MotionEvent"; public static final String KEY_IS_LOGGING_RELATED = "isLoggingRelated"; // Name specifying the LogStatement type. private final String mType; Loading
java/src/com/android/inputmethod/research/LogUnit.java +4 −5 Original line number Diff line number Diff line Loading @@ -453,13 +453,12 @@ import java.util.List; // Look for the long press that started the invocation of the research key code input. final int indexOfLastLongPressBeforeResearchKey = findLastIndexBefore(LogStatement.TYPE_LATIN_KEYBOARD_VIEW_ON_LONG_PRESS, findLastIndexBefore(LogStatement.TYPE_MAIN_KEYBOARD_VIEW_ON_LONG_PRESS, indexOfLastResearchKey); // Look for DOWN event preceding the long press final int indexOfLastDownEventBeforeLongPress = findLastIndexContainingKeyValueBefore( LogStatement.TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS, findLastIndexContainingKeyValueBefore(LogStatement.TYPE_MOTION_EVENT, LogStatement.ACTION, LogStatement.VALUE_DOWN, indexOfLastLongPressBeforeResearchKey); Loading @@ -471,8 +470,8 @@ import java.util.List; final LogStatement logStatement = mLogStatementList.get(index); final String type = logStatement.getType(); final Object[] values = mValuesList.get(index); if (type.equals(LogStatement.TYPE_LATIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENTS)) { logStatement.setValue(LogStatement.KEY_LOGGING_RELATED, values, true); if (type.equals(LogStatement.TYPE_MOTION_EVENT)) { logStatement.setValue(LogStatement.KEY_IS_LOGGING_RELATED, values, true); } } return true; Loading
java/src/com/android/inputmethod/research/MotionEventReader.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class MotionEventReader { jsonReader.endObject(); if (logStatementType != null && time != null && x != null && y != null && actionType != null && logStatementType.equals("MainKeyboardViewProcessMotionEvent") && logStatementType.equals("MotionEvent") && !loggingRelated) { replayData.mActions.add(actionType); replayData.mXCoords.add(x); Loading
java/src/com/android/inputmethod/research/ResearchLogger.java +3 −2 Original line number Diff line number Diff line Loading @@ -1162,7 +1162,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang * */ private static final LogStatement LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT = new LogStatement("MotionEvent", true, false, "action", "MotionEvent", "loggingRelated"); new LogStatement("MotionEvent", true, false, "action", LogStatement.KEY_IS_LOGGING_RELATED, "motionEvent"); public static void mainKeyboardView_processMotionEvent(final MotionEvent me, final int action, final long eventTime, final int index, final int id, final int x, final int y) { if (me != null) { Loading @@ -1179,7 +1180,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } final ResearchLogger researchLogger = getInstance(); researchLogger.enqueueEvent(LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT, actionString, MotionEvent.obtain(me), false); actionString, false /* IS_LOGGING_RELATED */, MotionEvent.obtain(me)); if (action == MotionEvent.ACTION_DOWN) { // Subtract 1 from eventTime so the down event is included in the later // LogUnit, not the earlier (the test is for inequality). Loading