From e05eb2182602dd62e2bfa5b78ab6df7f331cff24 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Fri, 8 Aug 2014 12:31:02 +0900 Subject: [PATCH] Rename distracter filter class. Bug: 13142176 Bug: 15531638 Change-Id: I89cef5264073eed25ffb5be10fdff731df0a3138 --- java/src/com/android/inputmethod/latin/LatinIME.java | 5 +++-- ...istracterFilterCheckingExactMatchesAndSuggestions.java} | 7 ++++--- .../android/inputmethod/latin/DistracterFilterTest.java | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) rename java/src/com/android/inputmethod/latin/utils/{DistracterFilterCheckingExactMatches.java => DistracterFilterCheckingExactMatchesAndSuggestions.java} (97%) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 3a5f85d63..2e3cd6b6f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -84,7 +84,7 @@ import com.android.inputmethod.latin.utils.ApplicationUtils; import com.android.inputmethod.latin.utils.CapsModeUtils; import com.android.inputmethod.latin.utils.CoordinateUtils; import com.android.inputmethod.latin.utils.DialogUtils; -import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatches; +import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions; import com.android.inputmethod.latin.utils.ImportantNoticeUtils; import com.android.inputmethod.latin.utils.IntentUtils; import com.android.inputmethod.latin.utils.JniUtils; @@ -126,7 +126,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private final Settings mSettings; private final DictionaryFacilitator mDictionaryFacilitator = - new DictionaryFacilitator(new DistracterFilterCheckingExactMatches(this /* context */)); + new DictionaryFacilitator( + new DistracterFilterCheckingExactMatchesAndSuggestions(this /* context */)); // TODO: Move from LatinIME. private final PersonalizationDictionaryUpdater mPersonalizationDictionaryUpdater = new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator); diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatches.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java similarity index 97% rename from java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatches.java rename to java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java index 845b73961..27973287d 100644 --- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatches.java +++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java @@ -43,8 +43,9 @@ import com.android.inputmethod.latin.settings.SettingsValuesForSuggestion; * This class is used to prevent distracters being added to personalization * or user history dictionaries */ -public class DistracterFilterCheckingExactMatches implements DistracterFilter { - private static final String TAG = DistracterFilterCheckingExactMatches.class.getSimpleName(); +public class DistracterFilterCheckingExactMatchesAndSuggestions implements DistracterFilter { + private static final String TAG = + DistracterFilterCheckingExactMatchesAndSuggestions.class.getSimpleName(); private static final boolean DEBUG = false; private static final long TIMEOUT_TO_WAIT_LOADING_DICTIONARIES_IN_SECONDS = 120; @@ -70,7 +71,7 @@ public class DistracterFilterCheckingExactMatches implements DistracterFilter { * * @param context the context. */ - public DistracterFilterCheckingExactMatches(final Context context) { + public DistracterFilterCheckingExactMatchesAndSuggestions(final Context context) { mContext = context; mLocaleToSubtypeMap = new HashMap<>(); mLocaleToKeyboardMap = new HashMap<>(); diff --git a/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java b/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java index 6285d16f0..e6fb28260 100644 --- a/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java +++ b/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java @@ -24,20 +24,20 @@ import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.LargeTest; import android.view.inputmethod.InputMethodSubtype; -import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatches; +import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions; /** * Unit test for DistracterFilter */ @LargeTest public class DistracterFilterTest extends AndroidTestCase { - private DistracterFilterCheckingExactMatches mDistracterFilter; + private DistracterFilterCheckingExactMatchesAndSuggestions mDistracterFilter; @Override protected void setUp() throws Exception { super.setUp(); final Context context = getContext(); - mDistracterFilter = new DistracterFilterCheckingExactMatches(context); + mDistracterFilter = new DistracterFilterCheckingExactMatchesAndSuggestions(context); RichInputMethodManager.init(context); final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); final ArrayList subtypes = new ArrayList<>();