From 19d02c19d0af940af358f6f91abb314330a3c60e Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 28 Jun 2012 17:06:48 +0900 Subject: Remove a useless variable (A21) Change-Id: I901e6b0e2b994128da19d68233b9f68bb308cb95 --- java/src/com/android/inputmethod/latin/Suggest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/Suggest.java') diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 3a24c9f44..9bbc5314f 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -228,15 +228,15 @@ public class Suggest { final boolean hasAutoCorrection; if (isCorrectionEnabled) { - final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty() - ? null : suggestionsSet.first(); if (null != whitelistedWord) { hasAutoCorrection = true; } else if (!AutoCorrection.isWhitelistedOrNotAWord( mDictionaries, consideredWord, false)) { hasAutoCorrection = true; - } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion, - consideredWord, mAutoCorrectionThreshold)) { + } else if (suggestionsSet.isEmpty()) { + hasAutoCorrection = false; + } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(suggestionsSet.first(), + consideredWord, mAutoCorrectionThreshold)) { hasAutoCorrection = true; } else { hasAutoCorrection = false; -- cgit v1.2.3-83-g751a