Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0185fc57 authored by Mike LeBeau's avatar Mike LeBeau Committed by Android Git Automerger
Browse files

am c2e06072: Tell the SearchManager to stopSearch before starting an in-app...

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 'c2e06072'

* commit 'c2e06072':
  Tell the SearchManager to stopSearch before starting an in-app voice
parents 2801ac1a c2e06072
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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) {