am 0c60d7c1: am 0e74d71f: am a848c094: Merge "Rename distracter filter class." into lmp-dev
* commit '0c60d7c16cfe02b9a174fa01f7a58d3605c26966': Rename distracter filter class.main
commit
ea2f274318
|
@ -84,7 +84,7 @@ import com.android.inputmethod.latin.utils.ApplicationUtils;
|
||||||
import com.android.inputmethod.latin.utils.CapsModeUtils;
|
import com.android.inputmethod.latin.utils.CapsModeUtils;
|
||||||
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
||||||
import com.android.inputmethod.latin.utils.DialogUtils;
|
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.ImportantNoticeUtils;
|
||||||
import com.android.inputmethod.latin.utils.IntentUtils;
|
import com.android.inputmethod.latin.utils.IntentUtils;
|
||||||
import com.android.inputmethod.latin.utils.JniUtils;
|
import com.android.inputmethod.latin.utils.JniUtils;
|
||||||
|
@ -126,7 +126,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private final Settings mSettings;
|
private final Settings mSettings;
|
||||||
private final DictionaryFacilitator mDictionaryFacilitator =
|
private final DictionaryFacilitator mDictionaryFacilitator =
|
||||||
new DictionaryFacilitator(new DistracterFilterCheckingExactMatches(this /* context */));
|
new DictionaryFacilitator(
|
||||||
|
new DistracterFilterCheckingExactMatchesAndSuggestions(this /* context */));
|
||||||
// TODO: Move from LatinIME.
|
// TODO: Move from LatinIME.
|
||||||
private final PersonalizationDictionaryUpdater mPersonalizationDictionaryUpdater =
|
private final PersonalizationDictionaryUpdater mPersonalizationDictionaryUpdater =
|
||||||
new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator);
|
new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator);
|
||||||
|
|
|
@ -43,8 +43,9 @@ import com.android.inputmethod.latin.settings.SettingsValuesForSuggestion;
|
||||||
* This class is used to prevent distracters being added to personalization
|
* This class is used to prevent distracters being added to personalization
|
||||||
* or user history dictionaries
|
* or user history dictionaries
|
||||||
*/
|
*/
|
||||||
public class DistracterFilterCheckingExactMatches implements DistracterFilter {
|
public class DistracterFilterCheckingExactMatchesAndSuggestions implements DistracterFilter {
|
||||||
private static final String TAG = DistracterFilterCheckingExactMatches.class.getSimpleName();
|
private static final String TAG =
|
||||||
|
DistracterFilterCheckingExactMatchesAndSuggestions.class.getSimpleName();
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
private static final long TIMEOUT_TO_WAIT_LOADING_DICTIONARIES_IN_SECONDS = 120;
|
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.
|
* @param context the context.
|
||||||
*/
|
*/
|
||||||
public DistracterFilterCheckingExactMatches(final Context context) {
|
public DistracterFilterCheckingExactMatchesAndSuggestions(final Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mLocaleToSubtypeMap = new HashMap<>();
|
mLocaleToSubtypeMap = new HashMap<>();
|
||||||
mLocaleToKeyboardMap = new HashMap<>();
|
mLocaleToKeyboardMap = new HashMap<>();
|
|
@ -24,20 +24,20 @@ import android.test.AndroidTestCase;
|
||||||
import android.test.suitebuilder.annotation.LargeTest;
|
import android.test.suitebuilder.annotation.LargeTest;
|
||||||
import android.view.inputmethod.InputMethodSubtype;
|
import android.view.inputmethod.InputMethodSubtype;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatches;
|
import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test for DistracterFilter
|
* Unit test for DistracterFilter
|
||||||
*/
|
*/
|
||||||
@LargeTest
|
@LargeTest
|
||||||
public class DistracterFilterTest extends AndroidTestCase {
|
public class DistracterFilterTest extends AndroidTestCase {
|
||||||
private DistracterFilterCheckingExactMatches mDistracterFilter;
|
private DistracterFilterCheckingExactMatchesAndSuggestions mDistracterFilter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
mDistracterFilter = new DistracterFilterCheckingExactMatches(context);
|
mDistracterFilter = new DistracterFilterCheckingExactMatchesAndSuggestions(context);
|
||||||
RichInputMethodManager.init(context);
|
RichInputMethodManager.init(context);
|
||||||
final RichInputMethodManager richImm = RichInputMethodManager.getInstance();
|
final RichInputMethodManager richImm = RichInputMethodManager.getInstance();
|
||||||
final ArrayList<InputMethodSubtype> subtypes = new ArrayList<>();
|
final ArrayList<InputMethodSubtype> subtypes = new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue