mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
Bug 1265708 - Strip ref from URL when adding homescreen icons r=sebastian
We add URL metadata based on the base URL, we should retrieve it this way too. MozReview-Commit-ID: ICP54V5vRgv --HG-- extra : rebase_source : ba9444683883f47fe7fa7b5fb7bbca1201ac2f5d
This commit is contained in:
parent
0717f299cf
commit
1fd425a95e
@ -17,6 +17,7 @@ import org.mozilla.gecko.db.URLMetadataTable;
|
||||
import org.mozilla.gecko.favicons.cache.FaviconCache;
|
||||
import org.mozilla.gecko.util.GeckoJarReader;
|
||||
import org.mozilla.gecko.util.NonEvictingLruCache;
|
||||
import org.mozilla.gecko.util.StringUtils;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
@ -629,13 +630,15 @@ public class Favicons {
|
||||
|
||||
final BrowserDB db = GeckoProfile.get(context).getDB();
|
||||
|
||||
final String metadataQueryURL = StringUtils.stripRef(url);
|
||||
|
||||
final ContentResolver cr = context.getContentResolver();
|
||||
final Map<String, Map<String, Object>> metadata = db.getURLMetadata().getForURLs(cr,
|
||||
Collections.singletonList(url),
|
||||
Collections.singletonList(metadataQueryURL),
|
||||
Collections.singletonList(URLMetadataTable.TOUCH_ICON_COLUMN)
|
||||
);
|
||||
|
||||
final Map<String, Object> row = metadata.get(url);
|
||||
final Map<String, Object> row = metadata.get(metadataQueryURL);
|
||||
|
||||
String touchIconURL = null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user