am 543dbdfd: Always present suggestion strip whenever in appropriate mode.
Merge commit '543dbdfdbda259aa56be9670480c7d802beba332' into gingerbread-plus-aosp * commit '543dbdfdbda259aa56be9670480c7d802beba332': Always present suggestion strip whenever in appropriate mode.main
commit
7bb640c1e0
|
@ -647,16 +647,14 @@ public class LatinIME extends InputMethodService
|
||||||
(attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) == 0) {
|
(attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) == 0) {
|
||||||
mInputTypeNoAutoCorrect = true;
|
mInputTypeNoAutoCorrect = true;
|
||||||
}
|
}
|
||||||
if ((attribute.inputType&EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
|
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
|
||||||
mPredictionOn = false;
|
mPredictionOn = false;
|
||||||
mCompletionOn = true && isFullscreenMode();
|
mCompletionOn = isFullscreenMode();
|
||||||
}
|
}
|
||||||
updateShiftKeyState(attribute);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
|
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
|
||||||
attribute.imeOptions, enableVoiceButton);
|
attribute.imeOptions, enableVoiceButton);
|
||||||
updateShiftKeyState(attribute);
|
|
||||||
}
|
}
|
||||||
inputView.closing();
|
inputView.closing();
|
||||||
mComposing.setLength(0);
|
mComposing.setLength(0);
|
||||||
|
@ -666,8 +664,9 @@ public class LatinIME extends InputMethodService
|
||||||
loadSettings();
|
loadSettings();
|
||||||
updateShiftKeyState(attribute);
|
updateShiftKeyState(attribute);
|
||||||
|
|
||||||
setCandidatesViewShown(false);
|
setCandidatesViewShownInternal(isCandidateStripVisible() || mCompletionOn,
|
||||||
setSuggestions(null, false, false, false);
|
false /* needsInputViewShown */ );
|
||||||
|
updateSuggestions();
|
||||||
|
|
||||||
// If the dictionary is not big enough, don't auto correct
|
// If the dictionary is not big enough, don't auto correct
|
||||||
mHasDictionary = mSuggest.hasMainDictionary();
|
mHasDictionary = mSuggest.hasMainDictionary();
|
||||||
|
@ -831,18 +830,21 @@ public class LatinIME extends InputMethodService
|
||||||
// When in fullscreen mode, show completions generated by the application
|
// When in fullscreen mode, show completions generated by the application
|
||||||
setSuggestions(stringList, true, true, true);
|
setSuggestions(stringList, true, true, true);
|
||||||
mBestWord = null;
|
mBestWord = null;
|
||||||
setCandidatesViewShown(isCandidateStripVisible() || mCompletionOn);
|
setCandidatesViewShown(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setCandidatesViewShownInternal(boolean shown, boolean needsInputViewShown) {
|
||||||
|
// TODO: Remove this if we support candidates with hard keyboard
|
||||||
|
if (onEvaluateInputViewShown()) {
|
||||||
|
super.setCandidatesViewShown(shown && mKeyboardSwitcher.getInputView() != null
|
||||||
|
&& (needsInputViewShown ? mKeyboardSwitcher.getInputView().isShown() : true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCandidatesViewShown(boolean shown) {
|
public void setCandidatesViewShown(boolean shown) {
|
||||||
// TODO: Remove this if we support candidates with hard keyboard
|
setCandidatesViewShownInternal(shown, true /* needsInputViewShown */ );
|
||||||
if (onEvaluateInputViewShown()) {
|
|
||||||
// Show the candidates view only if input view is showing
|
|
||||||
super.setCandidatesViewShown(shown && mKeyboardSwitcher.getInputView() != null
|
|
||||||
&& mKeyboardSwitcher.getInputView().isShown());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1430,8 +1432,7 @@ public class LatinIME extends InputMethodService
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPredictionOn() {
|
private boolean isPredictionOn() {
|
||||||
boolean predictionOn = mPredictionOn;
|
return mPredictionOn;
|
||||||
return predictionOn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isCandidateStripVisible() {
|
private boolean isCandidateStripVisible() {
|
||||||
|
|
Loading…
Reference in New Issue