Bug 1230568 - Allowing showing search suggestion opt in multiple times r=mcomella

This commit is contained in:
Andrzej Hunt 2015-12-14 16:28:59 -08:00
parent 0f45909bac
commit 115048280c

View File

@ -744,9 +744,11 @@ public class BrowserSearch extends HomeFragment
} }
private void showSuggestionsOptIn() { private void showSuggestionsOptIn() {
// Return if the ViewStub was already inflated - an inflated ViewStub is removed from the // Only make the ViewStub visible again if it has already previously been shown.
// View hierarchy so a second call to findViewById will return null. // (An inflated ViewStub is removed from the View hierarchy so a second call to findViewById will return null,
// which also further necessitates handling this separately.)
if (mSuggestionsOptInPrompt != null) { if (mSuggestionsOptInPrompt != null) {
mSuggestionsOptInPrompt.setVisibility(View.VISIBLE);
return; return;
} }