mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Check MX on send only if internet
This commit is contained in:
parent
cc40ab769b
commit
060f5b027b
1 changed files with 5 additions and 1 deletions
|
@ -44,6 +44,7 @@ import android.graphics.drawable.GradientDrawable;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.Network;
|
import android.net.Network;
|
||||||
import android.net.NetworkCapabilities;
|
import android.net.NetworkCapabilities;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
import android.net.NetworkRequest;
|
import android.net.NetworkRequest;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -4662,6 +4663,9 @@ public class FragmentCompose extends FragmentBase {
|
||||||
if (addresses == null)
|
if (addresses == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
NetworkInfo ani = (cm == null ? null : cm.getActiveNetworkInfo());
|
||||||
|
if (ani != null && ani.isConnected())
|
||||||
DnsHelper.checkMx(context, addresses);
|
DnsHelper.checkMx(context, addresses);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue