Added option to always scan web app manifest for favicons

This commit is contained in:
M66B
2023-08-09 07:04:18 +02:00
parent f5a29c30f2
commit 7c91e4bacc
4 changed files with 32 additions and 3 deletions

View File

@@ -640,6 +640,7 @@ public class ContactInfo {
private static Favicon parseFavicon(URL base, int scaleToPixels, Context context) throws IOException {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean favicons_partial = prefs.getBoolean("favicons_partial", true);
boolean favicons_manifest = prefs.getBoolean("favicons_manifest", false);
Log.i("PARSE favicon " + base);
HttpURLConnection connection = ConnectionHelper
@@ -681,7 +682,7 @@ public class ContactInfo {
imgs.addAll(doc.head().select("meta[itemprop=image]"));
// https://developer.mozilla.org/en-US/docs/Web/Manifest/icons
if (imgs.size() == 0 || BuildConfig.DEBUG)
if (imgs.size() == 0 || favicons_manifest)
for (Element manifest : doc.head().select("link[rel=manifest]"))
try {
String href = manifest.attr("href");