Bug 1404206 - Part 3: Make GeckoInputConnection handle "mozAwesomebar" inputmode value as "url". r=jchen, r=gijs

Although, Firefox for Android doesn't use urlbarBindings.xml for declaring its
awesome bar, for consistency with widget code for desktop OSes,
GeckoInputConnection should treat "mozAwesomebar" inputmode value as "url"
since Android doesn't have any special input type for "search" and we should
keep current behavior.

MozReview-Commit-ID: DpUnUx4E2Sp
This commit is contained in:
Masayuki Nakano 2017-09-29 16:11:20 +09:00
Родитель 5726ada8a0
Коммит 9a85312d4a
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -556,7 +556,8 @@ class GeckoInputConnection
outAttrs.inputType |= InputType.TYPE_TEXT_VARIATION_PASSWORD;
else if (mIMEState == IME_STATE_PLUGIN)
outAttrs.inputType = InputType.TYPE_NULL; // "send key events" mode
else if (mIMETypeHint.equalsIgnoreCase("url"))
else if (mIMETypeHint.equalsIgnoreCase("url") ||
mIMETypeHint.equalsIgnoreCase("mozAwesomebar"))
outAttrs.inputType |= InputType.TYPE_TEXT_VARIATION_URI;
else if (mIMETypeHint.equalsIgnoreCase("email"))
outAttrs.inputType |= InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;