Make ImhNoPredictiveText work on Samsung devices

Samsung does not support TYPE_TEXT_FLAG_NO_SUGGESTIONS, even
though that flag was introduced in API level 5. Therefore, we
have to use TYPE_TEXT_VARIATION_VISIBLE_PASSWORD. This effectively
makes ImhNoPredictiveText a synonym for ImhSensitiveData on Android.

Task-number: QTBUG-43297
Change-Id: I3e7139d144276462e46512445ad7b8e7114d8e32
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
bb10
Paul Olav Tvete 2014-12-12 15:18:53 +01:00
parent fff996e8ad
commit 71a63836ed
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ public class QtActivityDelegate
}
} else if ((inputHints & ImhHiddenText) != 0) {
inputType |= android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD;
} else if ((inputHints & ImhSensitiveData) != 0) {
} else if ((inputHints & ImhSensitiveData) != 0 || (inputHints & ImhNoPredictiveText) != 0) {
inputType |= android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
}