am 3686bdfc: Fix off-device build
* commit '3686bdfcc1798066f90fbd64b26602e2ecb7bad0': Fix off-device buildmain
commit
5fe9c8f069
|
@ -84,6 +84,7 @@ 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.DistracterFilter;
|
||||
import com.android.inputmethod.latin.utils.DistracterFilterUtils;
|
||||
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
|
||||
import com.android.inputmethod.latin.utils.IntentUtils;
|
||||
import com.android.inputmethod.latin.utils.JniUtils;
|
||||
|
@ -1745,7 +1746,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
@UsedForTesting
|
||||
/* package for test */ DistracterFilter createDistracterFilter() {
|
||||
return DistracterFilter.createDistracterFilter(mInputLogic.mSuggest, mKeyboardSwitcher);
|
||||
return DistracterFilterUtils.createDistracterFilter(
|
||||
mInputLogic.mSuggest, mKeyboardSwitcher);
|
||||
}
|
||||
|
||||
public void dumpDictionaryForDebug(final String dictName) {
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.android.inputmethod.latin.utils;
|
||||
|
||||
import com.android.inputmethod.keyboard.Keyboard;
|
||||
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||
import com.android.inputmethod.keyboard.MainKeyboardView;
|
||||
import com.android.inputmethod.latin.Constants;
|
||||
import com.android.inputmethod.latin.Suggest;
|
||||
import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback;
|
||||
|
@ -54,18 +52,6 @@ public class DistracterFilter {
|
|||
mKeyboard = keyboard;
|
||||
}
|
||||
|
||||
public static DistracterFilter createDistracterFilter(final Suggest suggest,
|
||||
final KeyboardSwitcher keyboardSwitcher) {
|
||||
final MainKeyboardView mainKeyboardView = keyboardSwitcher.getMainKeyboardView();
|
||||
// TODO: Create Keyboard when mainKeyboardView is null.
|
||||
// TODO: Figure out the most reasonable keyboard for the filter. Refer to the
|
||||
// spellchecker's logic.
|
||||
final Keyboard keyboard = (mainKeyboardView != null) ?
|
||||
mainKeyboardView.getKeyboard() : null;
|
||||
final DistracterFilter distracterFilter = new DistracterFilter(suggest, keyboard);
|
||||
return distracterFilter;
|
||||
}
|
||||
|
||||
private static boolean suggestionExceedsDistracterThreshold(
|
||||
final SuggestedWordInfo suggestion, final String consideredWord,
|
||||
final float distracterThreshold) {
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.latin.utils;
|
||||
|
||||
import com.android.inputmethod.keyboard.Keyboard;
|
||||
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||
import com.android.inputmethod.keyboard.MainKeyboardView;
|
||||
import com.android.inputmethod.latin.Suggest;
|
||||
|
||||
public class DistracterFilterUtils {
|
||||
private DistracterFilterUtils() {
|
||||
// This utility class is not publicly instantiable.
|
||||
}
|
||||
|
||||
public static final DistracterFilter createDistracterFilter(final Suggest suggest,
|
||||
final KeyboardSwitcher keyboardSwitcher) {
|
||||
final MainKeyboardView mainKeyboardView = keyboardSwitcher.getMainKeyboardView();
|
||||
// TODO: Create Keyboard when mainKeyboardView is null.
|
||||
// TODO: Figure out the most reasonable keyboard for the filter. Refer to the
|
||||
// spellchecker's logic.
|
||||
final Keyboard keyboard = (mainKeyboardView != null) ?
|
||||
mainKeyboardView.getKeyboard() : null;
|
||||
final DistracterFilter distracterFilter = new DistracterFilter(suggest, keyboard);
|
||||
return distracterFilter;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue