Bug 867125 - Ignore deleted pinned sites in getTopSites query. r=wesj

This commit is contained in:
Margaret Leibovic 2013-05-06 16:14:03 -04:00
parent c0e9ec236e
commit 2e746ac6cc

View File

@ -237,8 +237,9 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
public Cursor getTopSites(ContentResolver cr, int limit) {
// Filter out sites that are pinned
String selection = DBUtils.concatenateWhere("", Combined.URL + " NOT IN (SELECT " +
Bookmarks.URL + " FROM bookmarks WHERE bookmarks." +
Bookmarks.PARENT + " == ?)");
Bookmarks.URL + " FROM bookmarks WHERE " +
DBUtils.qualifyColumn("bookmarks", Bookmarks.PARENT) + " == ? AND " +
DBUtils.qualifyColumn("bookmarks", Bookmarks.IS_DELETED) + " == 0)");
String[] selectionArgs = DBUtils.appendSelectionArgs(new String[0], new String[] { String.valueOf(Bookmarks.FIXED_PINNED_LIST_ID) });
return filterAllSites(cr,
new String[] { Combined._ID,