mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-04 02:28:18 +00:00
Prioritize hires favicon
This commit is contained in:
parent
c5b2d0c258
commit
674d60243a
1 changed files with 13 additions and 5 deletions
|
@ -306,6 +306,26 @@ public class ContactInfo {
|
|||
info.bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||
else {
|
||||
URL base = new URL("https://" + domain);
|
||||
URL www = new URL("https://www." + domain);
|
||||
|
||||
try {
|
||||
info.bitmap = parseFavicon(base);
|
||||
} catch (IOException ex) {
|
||||
if (ex instanceof SocketTimeoutException)
|
||||
throw ex;
|
||||
Log.i("Favicon ex=" + ex.getClass().getName() + " " + ex.getMessage());
|
||||
}
|
||||
|
||||
if (info.bitmap == null)
|
||||
try {
|
||||
info.bitmap = parseFavicon(www);
|
||||
} catch (IOException ex) {
|
||||
if (ex instanceof SocketTimeoutException)
|
||||
throw ex;
|
||||
Log.i("Favicon ex=" + ex.getClass().getName() + " " + ex.getMessage());
|
||||
}
|
||||
|
||||
if (info.bitmap == null)
|
||||
try {
|
||||
info.bitmap = getFavicon(new URL(base, "favicon.ico"));
|
||||
} catch (IOException ex) {
|
||||
|
@ -314,16 +334,6 @@ public class ContactInfo {
|
|||
Log.i("Favicon ex=" + ex.getClass().getName() + " " + ex.getMessage());
|
||||
}
|
||||
|
||||
if (info.bitmap == null)
|
||||
try {
|
||||
info.bitmap = parseFavicon(base);
|
||||
} catch (IOException ex) {
|
||||
if (ex instanceof SocketTimeoutException)
|
||||
throw ex;
|
||||
Log.i("Favicon ex=" + ex.getClass().getName() + " " + ex.getMessage());
|
||||
}
|
||||
|
||||
URL www = new URL("https://www." + domain);
|
||||
if (info.bitmap == null)
|
||||
try {
|
||||
info.bitmap = getFavicon(new URL(www, "favicon.ico"));
|
||||
|
@ -332,8 +342,6 @@ public class ContactInfo {
|
|||
throw ex;
|
||||
Log.i("Favicon ex=" + ex.getClass().getName() + " " + ex.getMessage());
|
||||
}
|
||||
if (info.bitmap == null)
|
||||
info.bitmap = parseFavicon(www);
|
||||
|
||||
// Add to cache
|
||||
if (info.bitmap == null)
|
||||
|
|
Loading…
Add table
Reference in a new issue