Fix DNS issues: Add 4 DoH servers with fallback, remove ineffective DNSSetter

- Remove DNSSetter.java (System.setProperty doesn't affect Android DNS)
- Update NetworkUtils with 4 DNS over HTTPS providers:
  * Google DNS (8.8.8.8) - Primary
  * Cloudflare (1.1.1.1) - Secondary
  * AdGuard (94.140.14.14) - Tertiary
  * Quad9 (9.9.9.9) - Quaternary
- Update DeviceRegistry to use NetworkUtils client
- Update UpdateManager to use NetworkUtils client
- Remove DNSSetter call from PlayerActivity

This ensures the app works even when ISPs block specific DNS servers.
This commit is contained in:
Renato
2026-02-12 21:53:44 -03:00
parent a9da5a3b8e
commit a4e8deb45a
5 changed files with 62 additions and 130 deletions

View File

@@ -31,10 +31,10 @@ import java.lang.ref.WeakReference;
import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Request;
import okhttp3.Response;
/**
@@ -63,11 +63,8 @@ public class UpdateManager {
this.appContext = context.getApplicationContext();
this.mainHandler = new Handler(Looper.getMainLooper());
this.networkExecutor = Executors.newSingleThreadExecutor();
this.httpClient = new OkHttpClient.Builder()
.connectTimeout(15, TimeUnit.SECONDS)
.readTimeout(20, TimeUnit.SECONDS)
.callTimeout(25, TimeUnit.SECONDS)
.build();
// Usar NetworkUtils para obtener cliente con DNS over HTTPS configurado
this.httpClient = NetworkUtils.getClient();
}
public void checkForUpdates(UpdateCallback callback) {