diff options
author | Michael Kolb <kolby@google.com> | 2012-05-03 11:37:58 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2012-05-03 15:25:01 -0700 |
commit | 5ff5c8b88968fa794eab4b7a263cae25f05bd4d3 (patch) | |
tree | 5c64bedb6089f7516b1e34de38e6bde5ecc098d3 /src/com/android/browser/NavigationBarBase.java | |
parent | f6504f863a407c9b4615ac14de9b623775f65f69 (diff) | |
download | packages_apps_Browser-5ff5c8b88968fa794eab4b7a263cae25f05bd4d3.zip packages_apps_Browser-5ff5c8b88968fa794eab4b7a263cae25f05bd4d3.tar.gz packages_apps_Browser-5ff5c8b88968fa794eab4b7a263cae25f05bd4d3.tar.bz2 |
Remove voice search handling
Bug: 6439925
Change-Id: I1b7161a67fa0c20d87f147d6ed19c02e53093054
Diffstat (limited to 'src/com/android/browser/NavigationBarBase.java')
-rw-r--r-- | src/com/android/browser/NavigationBarBase.java | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java index d66c877..cf61c45 100644 --- a/src/com/android/browser/NavigationBarBase.java +++ b/src/com/android/browser/NavigationBarBase.java @@ -45,7 +45,6 @@ public class NavigationBarBase extends LinearLayout implements protected TitleBar mTitleBar; protected UiController mUiController; protected UrlInputView mUrlInput; - protected boolean mInVoiceMode = false; private ImageView mFavicon; private ImageView mLockIcon; @@ -108,9 +107,6 @@ public class NavigationBarBase extends LinearLayout implements } if (hasFocus) { mBaseUi.showTitleBar(); - if (mInVoiceMode) { - mUrlInput.forceFilter(); - } } else if (!mUrlInput.needsUpdate()) { mUrlInput.dismissDropDown(); mUrlInput.hideIME(); @@ -128,8 +124,6 @@ public class NavigationBarBase extends LinearLayout implements protected void setFocusState(boolean focus) { } - protected void setSearchMode(boolean voiceSearchEnabled) {} - public boolean isEditingUrl() { return mUrlInput.hasFocus(); } @@ -144,13 +138,6 @@ public class NavigationBarBase extends LinearLayout implements } } - // voicesearch - - public void setInVoiceMode(boolean voicemode, List<String> voiceResults) { - mInVoiceMode = voicemode; - mUrlInput.setVoiceResults(voiceResults); - } - void setIncognitoMode(boolean incognito) { mUrlInput.setIncognitoMode(incognito); } @@ -183,13 +170,7 @@ public class NavigationBarBase extends LinearLayout implements } } Intent i = new Intent(); - String action = null; - if (UrlInputView.VOICE.equals(source)) { - action = RecognizerResultsIntent.ACTION_VOICE_SEARCH_RESULTS; - source = null; - } else { - action = Intent.ACTION_SEARCH; - } + String action = Intent.ACTION_SEARCH; i.setAction(action); i.putExtra(SearchManager.QUERY, text); if (extra != null) { @@ -211,7 +192,7 @@ public class NavigationBarBase extends LinearLayout implements post(new Runnable() { public void run() { clearFocus(); - if ((currentTab != null) && !mInVoiceMode) { + if (currentTab != null) { setDisplayTitle(currentTab.getUrl()); } } @@ -258,8 +239,6 @@ public class NavigationBarBase extends LinearLayout implements } if (clearInput) { mUrlInput.setText(""); - } else if (mInVoiceMode) { - mUrlInput.showDropDown(); } if (forceIME) { mUrlInput.showIME(); @@ -283,12 +262,7 @@ public class NavigationBarBase extends LinearLayout implements public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - if (mUrlInput.hasFocus()) { - // clear voice mode when user types - setInVoiceMode(false, null); - } - } + public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { } |