Fix favicon retrieval from cache, disable preemptive favicon fetching
This commit is contained in:
parent
6061db0b14
commit
fbb820faf6
@ -136,14 +136,15 @@ public class FaviconModel {
|
||||
|
||||
File faviconCacheFile = createFaviconCacheFile(mApplication, uri);
|
||||
|
||||
|
||||
Bitmap favicon = getFaviconFromMemCache(url);
|
||||
|
||||
if (faviconCacheFile.exists() && favicon != null) {
|
||||
if (faviconCacheFile.exists() && favicon == null) {
|
||||
favicon = mImageFetcher.retrieveFaviconFromCache(faviconCacheFile);
|
||||
}
|
||||
|
||||
if (favicon == null) {
|
||||
favicon = mImageFetcher.retrieveBitmapFromDomain(uri);
|
||||
// favicon = mImageFetcher.retrieveBitmapFromDomain(uri);
|
||||
} else {
|
||||
Bitmap newFavicon = Utils.padFavicon(favicon);
|
||||
|
||||
@ -153,18 +154,18 @@ public class FaviconModel {
|
||||
return;
|
||||
}
|
||||
|
||||
if (favicon == null && allowGoogleService) {
|
||||
favicon = mImageFetcher.retrieveBitmapFromGoogle(uri);
|
||||
}
|
||||
// if (favicon == null && allowGoogleService) {
|
||||
// favicon = mImageFetcher.retrieveBitmapFromGoogle(uri);
|
||||
// }
|
||||
|
||||
if (favicon != null) {
|
||||
addFaviconToMemCache(url, favicon);
|
||||
cacheFaviconForUrl(favicon, url).subscribe();
|
||||
}
|
||||
// if (favicon != null) {
|
||||
// addFaviconToMemCache(url, favicon);
|
||||
// cacheFaviconForUrl(favicon, url).subscribe();
|
||||
// }
|
||||
|
||||
if (favicon == null) {
|
||||
favicon = defaultFavicon;
|
||||
}
|
||||
// if (favicon == null) {
|
||||
favicon = defaultFavicon;
|
||||
// }
|
||||
|
||||
Bitmap newFavicon = Utils.padFavicon(favicon);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user