Merge "switch ResearchLogger output to json."

This commit is contained in:
Kurt Partridge 2012-05-22 10:32:23 -07:00 committed by Android (Google) Code Review
commit 8ccc875754
3 changed files with 553 additions and 591 deletions

View file

@ -37,13 +37,7 @@
} }
-keep class com.android.inputmethod.latin.ResearchLogger { -keep class com.android.inputmethod.latin.ResearchLogger {
void setLogFileManager(...); void flush();
void clearAll();
com.android.inputmethod.latin.ResearchLogger$LogFileManager getLogFileManager();
}
-keep class com.android.inputmethod.latin.ResearchLogger$LogFileManager {
java.lang.String getContents();
} }
-keep class com.android.inputmethod.keyboard.KeyboardLayoutSet$Builder { -keep class com.android.inputmethod.keyboard.KeyboardLayoutSet$Builder {

View file

@ -392,7 +392,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mPrefs = prefs; mPrefs = prefs;
LatinImeLogger.init(this, prefs); LatinImeLogger.init(this, prefs);
if (ProductionFlag.IS_EXPERIMENTAL) { if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.init(this, prefs); ResearchLogger.getInstance().init(this, prefs);
} }
InputMethodManagerCompatWrapper.init(this); InputMethodManagerCompatWrapper.init(this);
SubtypeSwitcher.init(this); SubtypeSwitcher.init(this);
@ -652,6 +652,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0)); + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0));
} }
if (ProductionFlag.IS_EXPERIMENTAL) { if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.getInstance().start();
ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, mPrefs); ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, mPrefs);
} }
if (InputAttributes.inPrivateImeOptions(null, NO_MICROPHONE_COMPAT, editorInfo)) { if (InputAttributes.inPrivateImeOptions(null, NO_MICROPHONE_COMPAT, editorInfo)) {
@ -733,6 +734,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
super.onFinishInput(); super.onFinishInput();
LatinImeLogger.commit(); LatinImeLogger.commit();
if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.getInstance().stop();
}
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView(); KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
if (inputView != null) inputView.closing(); if (inputView != null) inputView.closing();
@ -1248,9 +1252,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mLastKeyTime = when; mLastKeyTime = when;
if (ProductionFlag.IS_EXPERIMENTAL) { if (ProductionFlag.IS_EXPERIMENTAL) {
if (ResearchLogger.sIsLogging) { ResearchLogger.latinIME_onCodeInput(primaryCode, x, y);
ResearchLogger.getInstance().logKeyEvent(primaryCode, x, y);
}
} }
final KeyboardSwitcher switcher = mKeyboardSwitcher; final KeyboardSwitcher switcher = mKeyboardSwitcher;

File diff suppressed because it is too large Load diff