Read protocol version from validation bundle.

Exchange used to just re-check version on first sync.
Version is known during validation so might as well use it.

Change-Id: I004fe671a1ad30a7cfe0a0659b74b20ee2136771
This commit is contained in:
Yu Ping Hu 2013-05-17 17:30:43 -07:00
parent eb23229030
commit 0d5e21d0fc
2 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
public static final String VALIDATE_BUNDLE_ERROR_MESSAGE = "validate_error_message"; public static final String VALIDATE_BUNDLE_ERROR_MESSAGE = "validate_error_message";
public static final String VALIDATE_BUNDLE_UNSUPPORTED_POLICIES = public static final String VALIDATE_BUNDLE_UNSUPPORTED_POLICIES =
"validate_unsupported_policies"; "validate_unsupported_policies";
public static final String VALIDATE_BUNDLE_PROTOCOL_VERSION = "validate_protocol_version";
private final IEmailServiceCallback mCallback; private final IEmailServiceCallback mCallback;
private Object mReturn = null; private Object mReturn = null;

View File

@ -473,6 +473,8 @@ public class AccountCheckSettingsFragment extends Fragment {
Bundle bundle = store.checkSettings(); Bundle bundle = store.checkSettings();
int resultCode = MessagingException.UNSPECIFIED_EXCEPTION; int resultCode = MessagingException.UNSPECIFIED_EXCEPTION;
if (bundle != null) { if (bundle != null) {
mAccount.mProtocolVersion = bundle.getString(
EmailServiceProxy.VALIDATE_BUNDLE_PROTOCOL_VERSION);
resultCode = bundle.getInt( resultCode = bundle.getInt(
EmailServiceProxy.VALIDATE_BUNDLE_RESULT_CODE); EmailServiceProxy.VALIDATE_BUNDLE_RESULT_CODE);
// Only show "policies required" if this is a new account setup // Only show "policies required" if this is a new account setup