am c2e06072: Tell the SearchManager to stopSearch before starting an in-app voice search. Without this, because of the recent changes to how the search dialog hides and resumes, we end up re-showing the search dialog after returning to the app from voice search, obscu

Merge commit 'c2e06072051e319bc609df66f4c72b77716f4fa4'

* commit 'c2e06072051e319bc609df66f4c72b77716f4fa4':
  Tell the SearchManager to stopSearch before starting an in-app voice
This commit is contained in:
Mike LeBeau
2009-07-30 16:07:50 -07:00
committed by Android Git Automerger

View File

@@ -903,6 +903,12 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
getContext().startActivity(mVoiceWebSearchIntent);
} else if (mSearchable.getVoiceSearchLaunchRecognizer()) {
Intent appSearchIntent = createVoiceAppSearchIntent(mVoiceAppSearchIntent);
// Stop the existing search before starting voice search, or else we'll end
// up showing the search dialog again once we return to the app.
((SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE)).
stopSearch();
getContext().startActivity(appSearchIntent);
}
} catch (ActivityNotFoundException e) {