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

Commit 68c23d4c authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

SearchWidget: passing APP_DATA to voice intent (from ics)

ics: http://review.cyanogenmod.com/#/c/17826/1

SearchView uses SearchManager.APP_DATA to pass data between the origin activity
and the search activity. This works for text searches (keyboard), but it's not
implemented by voice recognition searches. The method createVoiceAppSearchIntent
initializes a empty bundle that is filled with the QUERY parameter.
This patch adds the SearchManager.APP_DATA parameter if is present, let the
search activity access to the data passed by the origin activity

Change-Id: I2d0d853b69b36aa4e52f3cd49b4364f5fbb5ab93
parent 78200dfd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1506,6 +1506,9 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
        // because the voice search activity will always need to insert "QUERY" into
        // it anyway.
        Bundle queryExtras = new Bundle();
        if(this.mAppSearchData != null) {
            queryExtras.putParcelable(SearchManager.APP_DATA, this.mAppSearchData);
        }

        // Now build the intent to launch the voice search.  Add all necessary
        // extras to launch the voice recognizer, and then all the necessary extras