aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/ResearchLog.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-04-21 16:41:03 -0700
committerKurt Partridge <kep@google.com>2013-05-09 18:38:32 -0700
commita68cace7d150660f98991e2e4340be4eacc22a3c (patch)
tree52ec226c16a0320e420844e7c1d9d6bed0b95bcf /java/src/com/android/inputmethod/research/ResearchLog.java
parent104bb70c65bb06702654f72cf2d12a2da547dc93 (diff)
downloadlatinime-a68cace7d150660f98991e2e4340be4eacc22a3c.tar.gz
latinime-a68cace7d150660f98991e2e4340be4eacc22a3c.tar.xz
latinime-a68cace7d150660f98991e2e4340be4eacc22a3c.zip
Avoid NPE by fixing ResearchLogger initialization
Previously, mMainResearchLog and mMainLogBuffer were set up when the user moved to a new TextView, and set to null when the user left the TextView. This change causes mMainResearchLog, mMainLogBuffer, mFeedbackLog, and mFeedbackLogBuffer to be non-null forever after init() is called. start() no longer sets up these fields; instead they are cleared and reset every time stop() is called. Checks for null values are now removed. The earlier code just didn't initialize these variables if the user disabled logging, but since the new version invariantly keeps these variables valid, we add a check for whether the user has enabled logging in publishLogUnits(). Change-Id: Ifde3517f1cf924cfa33cda95fec24529b52b3c08
Diffstat (limited to 'java/src/com/android/inputmethod/research/ResearchLog.java')
0 files changed, 0 insertions, 0 deletions