зеркало из https://github.com/mozilla/gecko-dev.git
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 : 967cf4843572b85b425735486700cd6f6c24887c extra : source : e994f70de0490e77a2309793852434f2f1641ad7
This commit is contained in:
Родитель
376379fd5c
Коммит
75679153e9
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче