Add logging

- add logging for delete
- add logging for inputchar

Change-Id: I684692385f4c3acb66ab2bcd6421dae1d84feb8f
main
satok 2010-04-28 16:43:41 +09:00
parent 8677ac3586
commit 22f7ea7518
2 changed files with 5 additions and 0 deletions

View File

@ -937,6 +937,7 @@ public class LatinIME extends InputMethodService
case Keyboard.KEYCODE_DELETE:
handleBackspace();
mDeleteCount++;
LatinImeLogger.logOnDelete(1);
break;
case Keyboard.KEYCODE_SHIFT:
handleShift();
@ -982,6 +983,7 @@ public class LatinIME extends InputMethodService
} else {
handleCharacter(primaryCode, keyCodes);
}
LatinImeLogger.logOnInputChar(1);
// Cancel the just reverted state
mJustRevertedSeparator = null;
}

View File

@ -175,6 +175,9 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang
}
private void sendLogToDropBox(int tag, Object s) {
if (DBG) {
Log.d(TAG, "SendLog: " + tag + ";" + s);
}
long now = System.currentTimeMillis();
if (now - mLastTimeActive > MINIMUMSENDINTERVAL) {
// Send a log before adding an log entry if the last data is too old.