From 2d81c1f183049a74389b6c917ea5a8da780f0321 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 28 Nov 2014 12:16:55 +0900 Subject: [PATCH] Be always confident in the current language when only one Change-Id: I7ea289f7e78aa33562c7737e91024a25c02333b6 --- .../com/android/inputmethod/latin/DictionaryFacilitator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java index f2d7a8c3c..52d78c9c1 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java @@ -301,6 +301,9 @@ public class DictionaryFacilitator { if (!mostProbableDictionaryGroup.mLocale.equals(mLocale)) { return false; } + if (mDictionaryGroups.length <= 1) { + return true; + } return mostProbableDictionaryGroup.mConfidence >= CONFIDENCE_THRESHOLD; }