From c58f5d904bceab9b33840a7de4e3de4323b2126b 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 DO NOT MERGE Bug: 6188932 Change-Id: Ia7ee65e7f3be10d031a065aaa6c3d18610c7dff0 --- .../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 3cad2d099..bd62ca35e 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -407,6 +407,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang abort(); } requestIndicatorRedraw(); + mPrefs = prefs; + prefsChanged(prefs); } public void presentResearchDialog(final LatinIME latinIME) { @@ -735,6 +737,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 = {