private static ArrayList<String> getUrlsWithoutFavicon(Cursor c) { ArrayList<String> urls = new ArrayList<String>(); if (c == null || !c.moveToFirst()) { return urls; } final Favicons favicons = Favicons.getInstance(); do { final String url = c.getString(c.getColumnIndexOrThrow(URLColumns.URL)); // We only want to load favicons from DB if they are not in the // memory cache yet. The url is null for bookmark folders. if (url == null || favicons.getFaviconFromMemCache(url) != null) { continue; } urls.add(url); } while (c.moveToNext()); return urls; }