From fa0bac9057e2dbb0b1aacc6d748a8bcf12ac1462 Mon Sep 17 00:00:00 2001 From: Kurt Partridge Date: Mon, 6 Aug 2012 18:29:51 -0700 Subject: [PATCH] ResearchLogging log when preferences change Bug: 6188932 Change-Id: I82a115aed30d7693f92d784a32b038996d8b71e3 --- .../inputmethod/research/ResearchLogger.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index 45a33eaee..129a04dbf 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -417,6 +417,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang abort(); } requestIndicatorRedraw(); + mPrefs = prefs; + prefsChanged(prefs); } public void presentResearchDialog(final LatinIME latinIME) { @@ -741,6 +743,17 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang "UserFeedback", "FeedbackContents" }; + private static final String[] EVENTKEYS_PREFS_CHANGED = { + "PrefsChanged", "prefs" + }; + public static void prefsChanged(final SharedPreferences prefs) { + final ResearchLogger researchLogger = getInstance(); + final Object[] values = { + prefs + }; + researchLogger.enqueueEvent(EVENTKEYS_PREFS_CHANGED, values); + } + // Regular logging methods private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_PROCESSMOTIONEVENT = {