Bug 966810 - Don't prompt to enable search suggestions if search suggestions are already enabled. r=liuche
authorSebastian Kaspari <s.kaspari@gmail.com>
Mon, 03 Feb 2014 12:35:00 -0800
changeset 166829 31e11855491976d0d36fd1039d947389ef815bb1
parent 166828 cff85c90a8a3588d4dc3b174a9d7cfd1e71ccaa8
child 166830 cea89064bf58622c67f0125452f9aa6ba15aaa33
push id4846
push usermozilla@noorenberghe.ca
push dateWed, 05 Feb 2014 08:33:10 +0000
treeherderfx-team@cea89064bf58 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs966810
milestone30.0a1
Bug 966810 - Don't prompt to enable search suggestions if search suggestions are already enabled. r=liuche
mobile/android/base/home/BrowserSearch.java
--- a/mobile/android/base/home/BrowserSearch.java
+++ b/mobile/android/base/home/BrowserSearch.java
@@ -528,19 +528,19 @@ public class BrowserSearch extends HomeF
             }
 
             mSearchEngines = searchEngines;
 
             if (mAdapter != null) {
                 mAdapter.notifyDataSetChanged();
             }
 
-            // Show suggestions opt-in prompt only if user hasn't been prompted
-            // and we're not on a private browsing tab.
-            if (!suggestionsPrompted && mSuggestClient != null) {
+            // Show suggestions opt-in prompt only if suggestions are not enabled yet,
+            // user hasn't been prompted and we're not on a private browsing tab.
+            if (!mSuggestionsEnabled && !suggestionsPrompted && mSuggestClient != null) {
                 showSuggestionsOptIn();
             }
         } catch (JSONException e) {
             Log.e(LOGTAG, "Error getting search engine JSON", e);
         }
 
         filterSuggestions();
     }