From 6029b43a3df1fa9a9baa339e2dbb984c6669d214 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Mon, 30 Jan 2012 12:19:50 +0900 Subject: [PATCH] Add "size" and "pressure" for MotionEvent logs bug: 5722703 Change-Id: I8e08942324b666de96682ce63e70c8d324535782 --- .../com/android/inputmethod/keyboard/LatinKeyboardView.java | 6 ++++-- java/src/com/android/inputmethod/latin/Utils.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java index aee356a0c..7e8a7180c 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java @@ -639,7 +639,8 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke } if (!TextUtils.isEmpty(eventTag)) { UsabilityStudyLogUtils.getInstance().write( - eventTag + eventTime + "," + id + "," + x + "," + y + "\t\t"); + eventTag + eventTime + "," + id + "," + x + "," + y + "," + + me.getSize(index) + "," + me.getPressure(index)); } } @@ -701,7 +702,8 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke tracker.onMoveEvent(px, py, eventTime); if (ENABLE_USABILITY_STUDY_LOG) { UsabilityStudyLogUtils.getInstance().write("[Move]" + eventTime + "," - + me.getPointerId(i) + "," + px + "," + py + "\t\t"); + + me.getPointerId(i) + "," + px + "," + py + "," + + me.getSize(i) + "," + me.getPressure(i)); } } } else { diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index bc8a1301c..a70808741 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -369,7 +369,7 @@ public class Utils { private UsabilityStudyLogUtils() { mDate = new Date(); - mDateFormat = new SimpleDateFormat("dd MMM HH:mm:ss.SSS"); + mDateFormat = new SimpleDateFormat("yyyyMMdd-HHmmss.SSSZ"); HandlerThread handlerThread = new HandlerThread("UsabilityStudyLogUtils logging task", Process.THREAD_PRIORITY_BACKGROUND);