Bug 1025062 - Part 3: Exclude pinned sites from the pin dialog's search. r=rnewman, a=lmandel
authorLucas Rocha <lucasr@mozilla.com>
Mon, 07 Jul 2014 15:57:31 +0100
changeset 207854 75e513227fed2f9907f90478956cad8960593266
parent 207853 9c1cfbfcc8277d4fb332dcd9de6081f2d8fad7be
child 207855 936ff3b9a5cece84235fd762ac6038bcfc5e31f7
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, lmandel
bugs1025062
milestone32.0a2
Bug 1025062 - Part 3: Exclude pinned sites from the pin dialog's search. r=rnewman, a=lmandel
mobile/android/base/home/PinSiteDialog.java
--- a/mobile/android/base/home/PinSiteDialog.java
+++ b/mobile/android/base/home/PinSiteDialog.java
@@ -1,16 +1,19 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.home;
 
+import java.util.EnumSet;
+
 import org.mozilla.gecko.R;
+import org.mozilla.gecko.db.BrowserDB.FilterFlags;
 import org.mozilla.gecko.db.BrowserDB.URLColumns;
 
 import android.content.Context;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.support.v4.app.DialogFragment;
 import android.support.v4.app.LoaderManager;
 import android.support.v4.app.LoaderManager.LoaderCallbacks;
@@ -186,17 +189,19 @@ class PinSiteDialog extends DialogFragme
     }
 
     public void setSearchTerm(String searchTerm) {
         mSearchTerm = searchTerm;
     }
 
     private void filter(String searchTerm) {
         // Restart loaders with the new search term
-        SearchLoader.restart(getLoaderManager(), LOADER_ID_SEARCH, mLoaderCallbacks, searchTerm);
+        SearchLoader.restart(getLoaderManager(), LOADER_ID_SEARCH,
+                             mLoaderCallbacks, searchTerm,
+                             EnumSet.of(FilterFlags.EXCLUDE_PINNED_SITES));
     }
 
     public void setOnSiteSelectedListener(OnSiteSelectedListener listener) {
         mOnSiteSelectedListener = listener;
     }
 
     private static class SearchAdapter extends CursorAdapter {
         private LayoutInflater mInflater;