summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/UrlInputView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/UrlInputView.java')
-rw-r--r--src/com/android/browser/UrlInputView.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/browser/UrlInputView.java b/src/com/android/browser/UrlInputView.java
index bd47f6a..505662d 100644
--- a/src/com/android/browser/UrlInputView.java
+++ b/src/com/android/browser/UrlInputView.java
@@ -30,6 +30,8 @@ import android.widget.AutoCompleteTextView;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
+import java.util.List;
+
/**
* url/search input view
* handling suggestions
@@ -48,6 +50,7 @@ public class UrlInputView extends AutoCompleteTextView
private OnFocusChangeListener mWrappedFocusListener;
private View mContainer;
private boolean mLandscape;
+ private boolean mInVoiceMode;
public UrlInputView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
@@ -85,6 +88,11 @@ public class UrlInputView extends AutoCompleteTextView
mContainer = container;
}
+ void setVoiceResults(List<String> voiceResults) {
+ mAdapter.setVoiceResults(voiceResults);
+ mInVoiceMode = (voiceResults != null);
+ }
+
@Override
protected void onConfigurationChanged(Configuration config) {
super.onConfigurationChanged(config);
@@ -134,6 +142,10 @@ public class UrlInputView extends AutoCompleteTextView
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
forceIme();
+ if (mInVoiceMode) {
+ performFiltering(getText().toString(), 0);
+ showDropDown();
+ }
} else {
finishInput(null, null, null);
}