зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 353deb7b9d02 (bug 1025062) for breaking the build
This commit is contained in:
Родитель
e5760f29d9
Коммит
3fa9375ff4
|
@ -6,7 +6,6 @@
|
|||
package org.mozilla.gecko.db;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import org.mozilla.gecko.db.BrowserContract.ExpirePriority;
|
||||
|
@ -36,10 +35,6 @@ public class BrowserDB {
|
|||
public static String KEYWORD = "keyword";
|
||||
}
|
||||
|
||||
public static enum FilterFlags {
|
||||
EXCLUDE_PINNED_SITES
|
||||
}
|
||||
|
||||
private static BrowserDBIface sDb = null;
|
||||
private static SuggestedSites sSuggestedSites;
|
||||
|
||||
|
@ -47,8 +42,7 @@ public class BrowserDB {
|
|||
public void invalidateCachedState();
|
||||
|
||||
@RobocopTarget
|
||||
public Cursor filter(ContentResolver cr, CharSequence constraint, int limit,
|
||||
EnumSet<FilterFlags> flags);
|
||||
public Cursor filter(ContentResolver cr, CharSequence constraint, int limit);
|
||||
|
||||
// This should only return frecent sites. BrowserDB.getTopSites will do the
|
||||
// work to combine that list with the pinned sites list.
|
||||
|
@ -182,13 +176,7 @@ public class BrowserDB {
|
|||
|
||||
@RobocopTarget
|
||||
public static Cursor filter(ContentResolver cr, CharSequence constraint, int limit) {
|
||||
return filter(cr, constraint, limit, EnumSet.noneOf(FilterFlags.class));
|
||||
}
|
||||
|
||||
@RobocopTarget
|
||||
public static Cursor filter(ContentResolver cr, CharSequence constraint, int limit,
|
||||
EnumSet<FilterFlags> flags) {
|
||||
return sDb.filter(cr, constraint, limit, flags);
|
||||
return sDb.filter(cr, constraint, limit);
|
||||
}
|
||||
|
||||
private static void appendUrlsFromCursor(List<String> urls, Cursor c) {
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.lang.reflect.Field;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -33,7 +32,6 @@ import org.mozilla.gecko.db.BrowserContract.ReadingListItems;
|
|||
import org.mozilla.gecko.db.BrowserContract.SyncColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
|
||||
import org.mozilla.gecko.db.BrowserContract.URLColumns;
|
||||
import org.mozilla.gecko.db.BrowserDB.FilterFlags;
|
||||
import org.mozilla.gecko.distribution.Distribution;
|
||||
import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
|
||||
import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
|
||||
|
@ -509,19 +507,7 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cursor filter(ContentResolver cr, CharSequence constraint, int limit,
|
||||
EnumSet<FilterFlags> flags) {
|
||||
String selection = "";
|
||||
String[] selectionArgs = null;
|
||||
|
||||
if (flags.contains(FilterFlags.EXCLUDE_PINNED_SITES)) {
|
||||
selection = Combined.URL + " NOT IN (SELECT " +
|
||||
Bookmarks.URL + " FROM bookmarks WHERE " +
|
||||
DBUtils.qualifyColumn("bookmarks", Bookmarks.PARENT) + " = ? AND " +
|
||||
DBUtils.qualifyColumn("bookmarks", Bookmarks.IS_DELETED) + " == 0)";
|
||||
selectionArgs = new String[] { String.valueOf(Bookmarks.FIXED_PINNED_LIST_ID) };
|
||||
}
|
||||
|
||||
public Cursor filter(ContentResolver cr, CharSequence constraint, int limit) {
|
||||
return filterAllSites(cr,
|
||||
new String[] { Combined._ID,
|
||||
Combined.URL,
|
||||
|
@ -531,8 +517,7 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
|
|||
Combined.HISTORY_ID },
|
||||
constraint,
|
||||
limit,
|
||||
null,
|
||||
selection, selectionArgs);
|
||||
null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче