From 6d8e783d18cf3b5c20972eb9f97906e87d1cc901 Mon Sep 17 00:00:00 2001 From: Tom Ouyang Date: Thu, 30 Apr 2015 15:03:27 -0700 Subject: [PATCH] Do not learn from cursor corrections when autocorrection is disabled. Bug: 20681528 Change-Id: I80e7095b70a151f3ccc36856d7e0837613a35972 --- .../com/android/inputmethod/latin/inputlogic/InputLogic.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index f7dbc0a4d..975ed7c01 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -398,9 +398,8 @@ public final class InputLogic { if (!TextUtils.isEmpty(mWordBeingCorrectedByCursor)) { final int timeStampInSeconds = (int)TimeUnit.MILLISECONDS.toSeconds( System.currentTimeMillis()); - mDictionaryFacilitator.addToUserHistory(mWordBeingCorrectedByCursor, false, - NgramContext.EMPTY_PREV_WORDS_INFO, timeStampInSeconds, - settingsValues.mBlockPotentiallyOffensive); + performAdditionToUserHistoryDictionary(settingsValues, mWordBeingCorrectedByCursor, + NgramContext.EMPTY_PREV_WORDS_INFO); } } else { // resetEntireInputState calls resetCachesUponCursorMove, but forcing the