parent
025a16c31c
commit
6a43e39bf0
|
@ -29,7 +29,7 @@ public class SuggestedWords {
|
||||||
|
|
||||||
public final List<CharSequence> mWords;
|
public final List<CharSequence> mWords;
|
||||||
public final boolean mTypedWordValid;
|
public final boolean mTypedWordValid;
|
||||||
public final boolean mHasAutoCorrectionCandidate;
|
private final boolean mHasAutoCorrectionCandidate;
|
||||||
public final boolean mIsPunctuationSuggestions;
|
public final boolean mIsPunctuationSuggestions;
|
||||||
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
||||||
private boolean mShouldBlockAutoCorrection;
|
private boolean mShouldBlockAutoCorrection;
|
||||||
|
@ -69,6 +69,10 @@ public class SuggestedWords {
|
||||||
return mHasAutoCorrectionCandidate && ((size() > 1 && !mTypedWordValid) || mTypedWordValid);
|
return mHasAutoCorrectionCandidate && ((size() > 1 && !mTypedWordValid) || mTypedWordValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasAutoCorrectionCandidate() {
|
||||||
|
return mHasAutoCorrectionCandidate;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPunctuationSuggestions() {
|
public boolean isPunctuationSuggestions() {
|
||||||
return mIsPunctuationSuggestions;
|
return mIsPunctuationSuggestions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -775,7 +775,7 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean willAutoCorrect(SuggestedWords suggestions) {
|
public static boolean willAutoCorrect(SuggestedWords suggestions) {
|
||||||
return !suggestions.mTypedWordValid && suggestions.mHasAutoCorrectionCandidate
|
return !suggestions.mTypedWordValid && suggestions.hasAutoCorrectionCandidate()
|
||||||
&& !suggestions.shouldBlockAutoCorrection();
|
&& !suggestions.shouldBlockAutoCorrection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
color = mColorTypedWord;
|
color = mColorTypedWord;
|
||||||
}
|
}
|
||||||
if (LatinImeLogger.sDBG) {
|
if (LatinImeLogger.sDBG) {
|
||||||
if (index == mCenterSuggestionIndex && suggestions.mHasAutoCorrectionCandidate
|
if (index == mCenterSuggestionIndex && suggestions.hasAutoCorrectionCandidate()
|
||||||
&& suggestions.shouldBlockAutoCorrection()) {
|
&& suggestions.shouldBlockAutoCorrection()) {
|
||||||
return 0xFFFF0000;
|
return 0xFFFF0000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue