From 39cb0334d9c7aec68b00ba1399a5194493264709 Mon Sep 17 00:00:00 2001 From: Kurt Partridge Date: Mon, 25 Mar 2013 17:33:43 -0700 Subject: [PATCH] Avoid NPE Initialize FeedbackLog earlier to avoid NPE Change-Id: I646944c68a7d092345def16060b2a4edd8c7dbef --- .../com/android/inputmethod/research/ResearchLogger.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index a38a226f0..aa3465e5a 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -406,6 +406,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang requestIndicatorRedraw(); mStatistics.reset(); checkForEmptyEditor(); + if (mFeedbackLogBuffer == null) { + resetFeedbackLogging(); + } if (!isAllowedToLog()) { // Log.w(TAG, "not in usability mode; not logging"); return; @@ -439,9 +442,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } }; } - if (mFeedbackLogBuffer == null) { - resetFeedbackLogging(); - } } private void resetFeedbackLogging() {