From 653dbfb8ed4dfa17b2d10865a04185b1e15f4e43 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 15 Aug 2012 16:09:38 +0900 Subject: Ensure #offer always actually offers something. This will allow remaining requests after a call to terminate correctly. Bug: 6963142 Change-Id: Iff67058bb8a39f2f1b468d3894861e8125de6659 --- .../latin/spellcheck/AndroidWordLevelSpellCheckerSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java') diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java index 06f5db749..317fe7cd3 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java @@ -194,7 +194,7 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session { DictAndProximity dictInfo = null; try { dictInfo = mDictionaryPool.pollWithDefaultTimeout(); - if (null == dictInfo) { + if (!DictionaryPool.isAValidDictionary(dictInfo)) { return AndroidSpellCheckerService.getNotInDictEmptySuggestions(); } return dictInfo.mDictionary.isValidWord(inText) @@ -237,7 +237,7 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session { DictAndProximity dictInfo = null; try { dictInfo = mDictionaryPool.pollWithDefaultTimeout(); - if (null == dictInfo) { + if (!DictionaryPool.isAValidDictionary(dictInfo)) { return AndroidSpellCheckerService.getNotInDictEmptySuggestions(); } final ArrayList suggestions = -- cgit v1.2.3-83-g751a