fix(YouTube - Check watch history domain name resolution): Fix false positive warning message if the internet connection fails halfway into the DNS check

This commit is contained in:
LisoUseInAIKyrios
2025-11-07 09:14:21 +02:00
parent 70f4955e89
commit 57263538c7
2 changed files with 6 additions and 2 deletions

View File

@@ -61,7 +61,11 @@ public class CheckWatchHistoryDomainNameResolutionPatch {
// Prevent this false positive by verify youtube.com resolves.
// If youtube.com does not resolve, then it's not a watch history domain resolving error
// because the entire app will not work since no domains are resolving.
if (!domainResolvesToValidIP("youtube.com")
String domainYouTube = "youtube.com";
if (!domainResolvesToValidIP(domainYouTube)
|| domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)
// Check multiple times, so a false positive from a flaky connection is almost impossible.
|| !domainResolvesToValidIP(domainYouTube)
|| domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)) {
return;
}

View File

@@ -45,7 +45,7 @@ Second \"item\" text"</string>
<string name="revanced_check_environment_not_near_patch_time_invalid">APK build date is corrupted</string>
</patch>
<patch id="misc.dns.checkWatchHistoryDomainNameResolutionPatch">
<string name="revanced_check_watch_history_domain_name_dialog_title">Warning</string>
<string name="revanced_check_watch_history_domain_name_dialog_title">ReVanced Notice</string>
<string name="revanced_check_watch_history_domain_name_dialog_message">Your watch history is not being saved.&lt;br>&lt;br>This most likely is caused by a DNS ad blocker or network proxy.&lt;br>&lt;br>To fix this, whitelist &lt;b>s.youtube.com&lt;/b> or turn off all DNS blockers and proxies.</string>
<string name="revanced_check_watch_history_domain_name_dialog_ignore">Do not show again</string>
</patch>