Commit c21f2412 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Prevent DNS servers list to be emptied

parent 38f4c55f
......@@ -585,8 +585,12 @@ public class AndroidPlatformHelper {
}
public synchronized void updateDnsServers(ArrayList<String> dnsServers) {
mDnsServers = new String[dnsServers.size()];
dnsServers.toArray(mDnsServers);
// Do not replace previous list of DNS by an empty one, keep them to be able to try a resolution while in DOZE mode
if (dnsServers != null && !dnsServers.isEmpty()) {
mDnsServers = new String[dnsServers.size()];
dnsServers.toArray(mDnsServers);
Log.i("[Platform Helper] DNS servers list updated");
}
}
public synchronized void updateNetworkReachability() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment