Loading java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +14 −19 Original line number Diff line number Diff line Loading @@ -1047,35 +1047,30 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } public boolean processMotionEvent(final MotionEvent me) { final int action = me.getActionMasked(); final int pointerCount = me.getPointerCount(); final long eventTime = me.getEventTime(); final int index = me.getActionIndex(); final int id = me.getPointerId(index); final int x = (int)me.getX(index); final int y = (int)me.getY(index); // TODO: This might be moved to the tracker.processMotionEvent() call below. if (LatinImeLogger.sUsabilityStudy) { UsabilityStudyLogUtils.writeMotionEvent(me); } // TODO: This should be moved to the tracker.processMotionEvent() call below. // Currently the same "move" event is being logged twice. if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.mainKeyboardView_processMotionEvent( me, action, eventTime, index, id, x, y); ResearchLogger.mainKeyboardView_processMotionEvent(me); } final int action = me.getActionMasked(); final long eventTime = me.getEventTime(); if (action == MotionEvent.ACTION_MOVE) { for (int i = 0; i < pointerCount; i++) { final int pointerId = me.getPointerId(i); final PointerTracker tracker = PointerTracker.getPointerTracker( pointerId, this); final int px = (int)me.getX(i); final int py = (int)me.getY(i); tracker.onMoveEvent(px, py, eventTime, me); final int pointerCount = me.getPointerCount(); for (int index = 0; index < pointerCount; index++) { final int id = me.getPointerId(index); final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); final int x = (int)me.getX(index); final int y = (int)me.getY(index); tracker.onMoveEvent(x, y, eventTime, me); } } else { final int index = me.getActionIndex(); final int id = me.getPointerId(index); final int x = (int)me.getX(index); final int y = (int)me.getY(index); final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); tracker.processMotionEvent(action, x, y, eventTime, this); } Loading java/src/com/android/inputmethod/research/ResearchLogger.java +18 −16 Original line number Diff line number Diff line Loading @@ -1066,9 +1066,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang private static final LogStatement LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT = 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) { public static void mainKeyboardView_processMotionEvent(final MotionEvent me) { if (me == null) { return; } final int action = me.getActionMasked(); final long eventTime = me.getEventTime(); final String actionString = LoggingUtils.getMotionEventActionTypeString(action); final ResearchLogger researchLogger = getInstance(); researchLogger.enqueueEvent(LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT, Loading @@ -1083,7 +1086,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang researchLogger.resetRecordingTimer(); } } } /** * Log a call to LatinIME.onCodeInput(). Loading Loading
java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +14 −19 Original line number Diff line number Diff line Loading @@ -1047,35 +1047,30 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } public boolean processMotionEvent(final MotionEvent me) { final int action = me.getActionMasked(); final int pointerCount = me.getPointerCount(); final long eventTime = me.getEventTime(); final int index = me.getActionIndex(); final int id = me.getPointerId(index); final int x = (int)me.getX(index); final int y = (int)me.getY(index); // TODO: This might be moved to the tracker.processMotionEvent() call below. if (LatinImeLogger.sUsabilityStudy) { UsabilityStudyLogUtils.writeMotionEvent(me); } // TODO: This should be moved to the tracker.processMotionEvent() call below. // Currently the same "move" event is being logged twice. if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.mainKeyboardView_processMotionEvent( me, action, eventTime, index, id, x, y); ResearchLogger.mainKeyboardView_processMotionEvent(me); } final int action = me.getActionMasked(); final long eventTime = me.getEventTime(); if (action == MotionEvent.ACTION_MOVE) { for (int i = 0; i < pointerCount; i++) { final int pointerId = me.getPointerId(i); final PointerTracker tracker = PointerTracker.getPointerTracker( pointerId, this); final int px = (int)me.getX(i); final int py = (int)me.getY(i); tracker.onMoveEvent(px, py, eventTime, me); final int pointerCount = me.getPointerCount(); for (int index = 0; index < pointerCount; index++) { final int id = me.getPointerId(index); final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); final int x = (int)me.getX(index); final int y = (int)me.getY(index); tracker.onMoveEvent(x, y, eventTime, me); } } else { final int index = me.getActionIndex(); final int id = me.getPointerId(index); final int x = (int)me.getX(index); final int y = (int)me.getY(index); final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); tracker.processMotionEvent(action, x, y, eventTime, this); } Loading
java/src/com/android/inputmethod/research/ResearchLogger.java +18 −16 Original line number Diff line number Diff line Loading @@ -1066,9 +1066,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang private static final LogStatement LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT = 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) { public static void mainKeyboardView_processMotionEvent(final MotionEvent me) { if (me == null) { return; } final int action = me.getActionMasked(); final long eventTime = me.getEventTime(); final String actionString = LoggingUtils.getMotionEventActionTypeString(action); final ResearchLogger researchLogger = getInstance(); researchLogger.enqueueEvent(LOGSTATEMENT_MAIN_KEYBOARD_VIEW_PROCESS_MOTION_EVENT, Loading @@ -1083,7 +1086,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang researchLogger.resetRecordingTimer(); } } } /** * Log a call to LatinIME.onCodeInput(). Loading