From 0d5e21d0fcd337cecce929a3b1bdb0b8b5871b2c Mon Sep 17 00:00:00 2001 From: Yu Ping Hu Date: Fri, 17 May 2013 17:30:43 -0700 Subject: [PATCH] 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 --- .../src/com/android/emailcommon/service/EmailServiceProxy.java | 1 + .../email/activity/setup/AccountCheckSettingsFragment.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java index 7ed9a0b1b..81dd337f8 100644 --- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java +++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java @@ -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_UNSUPPORTED_POLICIES = "validate_unsupported_policies"; + public static final String VALIDATE_BUNDLE_PROTOCOL_VERSION = "validate_protocol_version"; private final IEmailServiceCallback mCallback; private Object mReturn = null; diff --git a/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java b/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java index 98d2a4c12..368442c9c 100644 --- a/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java +++ b/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java @@ -473,6 +473,8 @@ public class AccountCheckSettingsFragment extends Fragment { Bundle bundle = store.checkSettings(); int resultCode = MessagingException.UNSPECIFIED_EXCEPTION; if (bundle != null) { + mAccount.mProtocolVersion = bundle.getString( + EmailServiceProxy.VALIDATE_BUNDLE_PROTOCOL_VERSION); resultCode = bundle.getInt( EmailServiceProxy.VALIDATE_BUNDLE_RESULT_CODE); // Only show "policies required" if this is a new account setup