Bug 877870 - Only call filtering listener if toolbar is in editing mode (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Tue, 11 Jun 2013 17:57:45 +0100
changeset 151299 dc61bbe74149dcd4d860481ac118707cd8ac7fc5
parent 151298 33236a7d3ef52eef0ff8e886fb85f9cb12bc9543
child 151300 7875f965bb4cee4381626de9b3d82b7768d3683d
push idunknown
push userunknown
push dateunknown
reviewersmfinkle
bugs877870
milestone24.0a1
Bug 877870 - Only call filtering listener if toolbar is in editing mode (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -752,17 +752,17 @@ public class BrowserToolbar implements T
                 // won't change. Just reuse the old autocomplete value.
                 useHandler = false;
                 reuseAutocomplete = true;
             }
         }
 
         // If this is the autocomplete text being set, don't run the filter.
         if (TextUtils.isEmpty(mAutoCompleteResult) || !mAutoCompleteResult.equals(text)) {
-            if (mFilterListener != null) {
+            if (isEditing() && mFilterListener != null) {
                 mFilterListener.onFilter(text, useHandler ? this : null);
             }
             mAutoCompletePrefix = text;
 
             if (reuseAutocomplete) {
                 onAutocomplete(mAutoCompleteResult);
             }
         }