Fix regression in handling the 'Go' button
This was introduced in CL https://android-git.corp.google.com/g/6460. Bug: http://b/issue?id=1970776
This commit is contained in:
@@ -962,10 +962,10 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
|
|||||||
&& event.getAction() == KeyEvent.ACTION_UP) {
|
&& event.getAction() == KeyEvent.ACTION_UP) {
|
||||||
v.cancelLongPress();
|
v.cancelLongPress();
|
||||||
|
|
||||||
if (mSearchable.autoUrlDetect()) {
|
|
||||||
// If this is a url entered by the user & we displayed the 'Go' button which
|
// If this is a url entered by the user & we displayed the 'Go' button which
|
||||||
// the user clicked, launch the url instead of using it as a search query.
|
// the user clicked, launch the url instead of using it as a search query.
|
||||||
if ((mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
|
if (mSearchable.autoUrlDetect() &&
|
||||||
|
(mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
|
||||||
== EditorInfo.IME_ACTION_GO) {
|
== EditorInfo.IME_ACTION_GO) {
|
||||||
Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
|
Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||||
@@ -975,7 +975,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
|
|||||||
// Launch as a regular search.
|
// Launch as a regular search.
|
||||||
launchQuerySearch();
|
launchQuerySearch();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||||
|
|||||||
Reference in New Issue
Block a user