|
|
@ -620,7 +620,7 @@ public class EmailProvider implements Parcelable {
|
|
|
|
|
|
|
|
|
|
|
|
Server untrusted = null;
|
|
|
|
Server untrusted = null;
|
|
|
|
for (Server server : imaps) {
|
|
|
|
for (Server server : imaps) {
|
|
|
|
Boolean result = server.reachable.get();
|
|
|
|
Boolean result = server.isReachable.get();
|
|
|
|
if (result == null) {
|
|
|
|
if (result == null) {
|
|
|
|
if (untrusted == null)
|
|
|
|
if (untrusted == null)
|
|
|
|
untrusted = server;
|
|
|
|
untrusted = server;
|
|
|
@ -653,7 +653,7 @@ public class EmailProvider implements Parcelable {
|
|
|
|
|
|
|
|
|
|
|
|
Server untrusted = null;
|
|
|
|
Server untrusted = null;
|
|
|
|
for (Server server : smtps) {
|
|
|
|
for (Server server : smtps) {
|
|
|
|
Boolean result = server.reachable.get();
|
|
|
|
Boolean result = server.isReachable.get();
|
|
|
|
if (result == null) {
|
|
|
|
if (result == null) {
|
|
|
|
if (untrusted == null)
|
|
|
|
if (untrusted == null)
|
|
|
|
untrusted = server;
|
|
|
|
untrusted = server;
|
|
|
@ -778,7 +778,7 @@ public class EmailProvider implements Parcelable {
|
|
|
|
public int port;
|
|
|
|
public int port;
|
|
|
|
public boolean starttls;
|
|
|
|
public boolean starttls;
|
|
|
|
|
|
|
|
|
|
|
|
private Future<Boolean> reachable;
|
|
|
|
private Future<Boolean> isReachable;
|
|
|
|
|
|
|
|
|
|
|
|
private Server() {
|
|
|
|
private Server() {
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -788,7 +788,7 @@ public class EmailProvider implements Parcelable {
|
|
|
|
this.port = port;
|
|
|
|
this.port = port;
|
|
|
|
|
|
|
|
|
|
|
|
Log.i("Scanning " + host + ":" + port);
|
|
|
|
Log.i("Scanning " + host + ":" + port);
|
|
|
|
this.reachable = executor.submit(new Callable<Boolean>() {
|
|
|
|
this.isReachable = executor.submit(new Callable<Boolean>() {
|
|
|
|
// Returns:
|
|
|
|
// Returns:
|
|
|
|
// false: closed
|
|
|
|
// false: closed
|
|
|
|
// true: listening
|
|
|
|
// true: listening
|
|
|
|