am 07e56e76
: Merge "Implement KIND_OOV_CORRECTION"
* commit '07e56e76a77ee4164201b7f48aa6f7c8d69a81b9': Implement KIND_OOV_CORRECTION
This commit is contained in:
commit
bdf4bc068c
2 changed files with 9 additions and 4 deletions
|
@ -2369,9 +2369,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
// Please note that if mSuggest is null, it means that everything is off: suggestion
|
||||
// and correction, so we shouldn't try to show the hint
|
||||
final boolean showingAddToDictionaryHint =
|
||||
SuggestedWordInfo.KIND_TYPED == suggestionInfo.mKind && mSuggest != null
|
||||
// If the suggestion is not in the dictionary, the hint should be shown.
|
||||
&& !AutoCorrection.isValidWord(mSuggest, suggestion, true);
|
||||
(SuggestedWordInfo.KIND_TYPED == suggestionInfo.mKind
|
||||
|| SuggestedWordInfo.KIND_OOV_CORRECTION == suggestionInfo.mKind)
|
||||
&& mSuggest != null
|
||||
// If the suggestion is not in the dictionary, the hint should be shown.
|
||||
&& !AutoCorrection.isValidWord(mSuggest, suggestion, true);
|
||||
|
||||
if (mSettings.isInternal()) {
|
||||
Stats.onSeparator((char)Constants.CODE_SPACE,
|
||||
|
|
|
@ -132,7 +132,10 @@ public final class SuggestedWords {
|
|||
public static final int KIND_APP_DEFINED = 6; // Suggested by the application
|
||||
public static final int KIND_SHORTCUT = 7; // A shortcut
|
||||
public static final int KIND_PREDICTION = 8; // A prediction (== a suggestion with no input)
|
||||
public static final int KIND_RESUMED = 9; // A resumed suggestion (comes from a span)
|
||||
// KIND_RESUMED: A resumed suggestion (comes from a span, currently this type is used only
|
||||
// in java for re-correction)
|
||||
public static final int KIND_RESUMED = 9;
|
||||
public static final int KIND_OOV_CORRECTION = 10; // Most probable string correction
|
||||
|
||||
public static final int KIND_MASK_FLAGS = 0xFFFFFF00; // Mask to get the flags
|
||||
public static final int KIND_FLAG_POSSIBLY_OFFENSIVE = 0x80000000;
|
||||
|
|
Loading…
Reference in a new issue