Add status code(s) for disabled sync (needed for EAS 14.0)
Change-Id: Ie65141c4d83412274dbbc39dffed7c3be394bb84
This commit is contained in:
parent
224c7215f1
commit
d2fd1252d5
|
@ -58,6 +58,8 @@ public class MessagingException extends Exception {
|
|||
public static final int AUTODISCOVER_AUTHENTICATION_RESULT = 12;
|
||||
/** Ambiguous failure; server error or bad credentials */
|
||||
public static final int AUTHENTICATION_FAILED_OR_SERVER_ERROR = 13;
|
||||
/** The server refused access */
|
||||
public static final int ACCESS_DENIED = 14;
|
||||
|
||||
protected int mExceptionType;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ public interface EmailServiceStatus {
|
|||
public static final int LOGIN_FAILED = 0x16;
|
||||
public static final int SECURITY_FAILURE = 0x17;
|
||||
public static final int ACCOUNT_UNINITIALIZED = 0x18;
|
||||
public static final int ACCESS_DENIED = 0x19;
|
||||
|
||||
// Maybe we should automatically retry these?
|
||||
public static final int CONNECTION_ERROR = 0x20;
|
||||
|
|
|
@ -776,6 +776,11 @@ save attachment.</string>
|
|||
<string name="account_setup_failed_protocol_unsupported">
|
||||
You entered an incorrect server address or the server requires a protocol version that
|
||||
Email does not support.</string>
|
||||
<!-- Additional diagnostic text when server access was denied; the user should contact the
|
||||
administrator of the server for more information [CHAR LIMIT=none] -->
|
||||
<string name="account_setup_failed_access_denied">
|
||||
You do not have permission to sync with this server. Please contact your server\'s
|
||||
administrator for more information.</string>
|
||||
|
||||
<!-- Dialog title when validation requires security provisioning (e.g. support
|
||||
for device lock PIN, or remote wipe.) and we ask the user permission before continuing -->
|
||||
|
|
|
@ -50,7 +50,6 @@ import android.os.Bundle;
|
|||
import android.os.IBinder;
|
||||
import android.os.RemoteCallbackList;
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -1579,6 +1578,9 @@ public class Controller {
|
|||
case EmailServiceStatus.SECURITY_FAILURE:
|
||||
return new MessagingException(MessagingException.SECURITY_POLICIES_REQUIRED);
|
||||
|
||||
case EmailServiceStatus.ACCESS_DENIED:
|
||||
return new MessagingException(MessagingException.ACCESS_DENIED);
|
||||
|
||||
case EmailServiceStatus.MESSAGE_NOT_FOUND:
|
||||
case EmailServiceStatus.ATTACHMENT_NOT_FOUND:
|
||||
case EmailServiceStatus.FOLDER_NOT_DELETED:
|
||||
|
|
|
@ -45,6 +45,8 @@ public class MessagingExceptionStrings {
|
|||
// where the security policy needs to be updated.
|
||||
case MessagingException.SECURITY_POLICIES_REQUIRED:
|
||||
return R.string.account_setup_failed_security;
|
||||
case MessagingException.ACCESS_DENIED:
|
||||
return R.string.account_setup_failed_access_denied;
|
||||
}
|
||||
return R.string.status_network_error; // default
|
||||
}
|
||||
|
|
|
@ -617,6 +617,9 @@ public class AccountCheckSettingsFragment extends Fragment {
|
|||
case MessagingException.SECURITY_POLICIES_UNSUPPORTED:
|
||||
id = R.string.account_setup_failed_security_policies_unsupported;
|
||||
break;
|
||||
case MessagingException.ACCESS_DENIED:
|
||||
id = R.string.account_setup_failed_access_denied;
|
||||
break;
|
||||
case MessagingException.PROTOCOL_VERSION_UNSUPPORTED:
|
||||
id = R.string.account_setup_failed_protocol_unsupported;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue