Change https://android-git.corp.google.com/g/27729 started reinflating the entire search bar every time the search source was changed, to get around problems with bad state in AutoCompleteTextView (http://b/issue?id=2132686). This had some side-effects if the search dialog was already visible, as it is when selecting a source in "More results" or when presing the search key to go to QSB from in-app search. This change changes the reinflation to only happen if the dialog is not already showing. Fixes: http://b/issue?id=2166640 "After selecting More results from suggestions, the search box is no longer visible." http://b/issue?id=2166675 "Calling QSB with the hardware key does not place focus in the search tab." http://b/issue?id=2166712 "back key has unexpected behaviour in QSB after selecting "More results" from suggestions." Change-Id: I8d48149c3e9ad97ec11c49ec7efb356f27dfe4f6