summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Satish Sampath <satish@android.com> 2009-07-10 15:43:38 +0100
committer Satish Sampath <satish@android.com> 2009-07-10 22:35:48 +0100
commitb1665f2e15439f693b1ef75cb1c07593f99edde7 (patch)
tree4df40c2e9613a492f261c1ebab6664057d1a0df9
parenta11fe86d77e0fd57944e5615acb58b41a4fb4e93 (diff)
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
-rw-r--r--core/java/android/app/SearchDialog.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 6d6aca494457..9f44c7ea8149 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -962,19 +962,18 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
&& event.getAction() == KeyEvent.ACTION_UP) {
v.cancelLongPress();
- if (mSearchable.autoUrlDetect()) {
- // 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.
- if ((mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
+ // 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.
+ if (mSearchable.autoUrlDetect() &&
+ (mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
== EditorInfo.IME_ACTION_GO) {
- Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
- Intent intent = new Intent(Intent.ACTION_VIEW, uri);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- launchIntent(intent);
- } else {
- // Launch as a regular search.
- launchQuerySearch();
- }
+ Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ launchIntent(intent);
+ } else {
+ // Launch as a regular search.
+ launchQuerySearch();
}
return true;
}