forked from GitHub/gf-core
bugfix: the keyboard should not show completions when entering web passwords
This commit is contained in:
@@ -135,15 +135,16 @@ public class TranslatorInputMethodService extends InputMethodService
|
|||||||
// modify our behavior.
|
// modify our behavior.
|
||||||
int variation = attribute.inputType & InputType.TYPE_MASK_VARIATION;
|
int variation = attribute.inputType & InputType.TYPE_MASK_VARIATION;
|
||||||
if (variation == InputType.TYPE_TEXT_VARIATION_PASSWORD ||
|
if (variation == InputType.TYPE_TEXT_VARIATION_PASSWORD ||
|
||||||
variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {
|
variation == InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD ||
|
||||||
|
variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {
|
||||||
// Do not display predictions / what the user is typing
|
// Do not display predictions / what the user is typing
|
||||||
// when they are entering a password.
|
// when they are entering a password.
|
||||||
mPredictionOn = false;
|
mPredictionOn = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variation == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
|
if (variation == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS ||
|
||||||
|| variation == InputType.TYPE_TEXT_VARIATION_URI
|
variation == InputType.TYPE_TEXT_VARIATION_URI ||
|
||||||
|| variation == InputType.TYPE_TEXT_VARIATION_FILTER) {
|
variation == InputType.TYPE_TEXT_VARIATION_FILTER) {
|
||||||
// Our predictions are not useful for e-mail addresses
|
// Our predictions are not useful for e-mail addresses
|
||||||
// or URIs.
|
// or URIs.
|
||||||
mPredictionOn = false;
|
mPredictionOn = false;
|
||||||
@@ -475,7 +476,8 @@ public class TranslatorInputMethodService extends InputMethodService
|
|||||||
if (wordLength > 1) {
|
if (wordLength > 1) {
|
||||||
mComposingWord.delete(wordLength - 1, wordLength);
|
mComposingWord.delete(wordLength - 1, wordLength);
|
||||||
getCurrentInputConnection().setComposingText(getComposingString(), 1);
|
getCurrentInputConnection().setComposingText(getComposingString(), 1);
|
||||||
updateCandidates();
|
if (mPredictionOn)
|
||||||
|
updateCandidates();
|
||||||
} else if (wordLength > 0) {
|
} else if (wordLength > 0) {
|
||||||
mComposingWord.setLength(0);
|
mComposingWord.setLength(0);
|
||||||
getCurrentInputConnection().setComposingText(getComposingString(), 1);
|
getCurrentInputConnection().setComposingText(getComposingString(), 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user