diff options
| author | Leon Scroggins <scroggo@google.com> | 2010-03-10 10:07:46 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-10 10:07:46 -0800 |
| commit | 49658cb55bdabfd8e086f896b8ea49458db2de6f (patch) | |
| tree | 627926619f81a31c4291e87e2c9ffd93c01910d6 /core/java/android | |
| parent | 6069beb2dfed6da837bf7faa3db3f6119edc017a (diff) | |
| parent | 4f22a545552d308377e178d5df5557cfe15252f9 (diff) | |
Merge "When context is voice, show the microphone."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/SearchDialog.java | 5 | ||||
| -rw-r--r-- | core/java/android/app/SearchManager.java | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 3e426f5af78b..bf9b021eaced 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -668,7 +668,10 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS // The user changed the query, remember it. mUserQuery = s == null ? "" : s.toString(); } - updateVoiceButton(mSearchAutoComplete.isEmpty()); + // Always want to show the microphone if the context is voice. + updateVoiceButton(mSearchAutoComplete.isEmpty() + || (mAppSearchData != null && mAppSearchData.getBoolean( + SearchManager.CONTEXT_IS_VOICE))); } public void afterTextChanged(Editable s) { diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java index 0ed572a77d56..625b12072428 100644 --- a/core/java/android/app/SearchManager.java +++ b/core/java/android/app/SearchManager.java @@ -1544,6 +1544,15 @@ public class SearchManager public final static String INTENT_ACTION_NONE = "android.search.action.ZILCH"; /** + * This means that context is voice, and therefore the SearchDialog should + * continue showing the microphone until the user indicates that he/she does + * not want to re-speak (e.g. by typing). + * + * @hide + */ + public final static String CONTEXT_IS_VOICE = "android.search.CONTEXT_IS_VOICE"; + + /** * Reference to the shared system search service. */ private static ISearchManager mService; |
