Bug 912524: Do not reinflate SuggestionOptIn ViewStub. r=bnicholson

This commit is contained in:
Michael Comella 2013-09-10 10:00:47 -07:00
Родитель 389793752b
Коммит fa2c5e8fe1
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -457,6 +457,12 @@ public class BrowserSearch extends HomeFragment
}
private void showSuggestionsOptIn() {
// Return if the ViewStub was already inflated - an inflated ViewStub is removed from the
// View hierarchy so a second call to findViewById will return null.
if (mSuggestionsOptInPrompt != null) {
return;
}
mSuggestionsOptInPrompt = ((ViewStub) mView.findViewById(R.id.suggestions_opt_in_prompt)).inflate();
TextView promptText = (TextView) mSuggestionsOptInPrompt.findViewById(R.id.suggestions_prompt_title);