From 6b68bc19a6bd37bb5256efc4ebd0957982946f34 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 3 Dec 2010 23:20:02 -0800 Subject: [PATCH] Merge I31258a5fbcca1f489c8bf6fb2ed8f3dcad5d2e26 into master * This is the fix to bug 3008626 that was created in Gingerbread and backported to Froyo for an MR release * The bug prevented validation of EAS w/ Exchange Server 2010 SP1 * For some reason, this fix did not get merged forward into master resulting in the bug referenced below Bug: 3254512 Change-Id: I4e48a8f95b31048f09a036cc16db867da4116f04 --- src/com/android/email/mail/store/ExchangeStore.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/mail/store/ExchangeStore.java b/src/com/android/email/mail/store/ExchangeStore.java index dccf89f18..0d06e7693 100644 --- a/src/com/android/email/mail/store/ExchangeStore.java +++ b/src/com/android/email/mail/store/ExchangeStore.java @@ -21,6 +21,8 @@ import com.android.email.mail.Folder; import com.android.email.mail.MessagingException; import com.android.email.mail.Store; import com.android.email.mail.StoreSynchronizer; +import com.android.email.service.EmailServiceProxy; +import com.android.email.service.IEmailService; import android.content.Context; import android.os.Bundle; @@ -200,8 +202,13 @@ public class ExchangeStore extends Store { boolean tssl = uri.getScheme().contains("+trustallcerts"); try { int port = ssl ? 443 : 80; - return ExchangeUtils.getExchangeService(mContext, null) - .validate("eas", mHost, mUsername, mPassword, port, ssl, tssl); + IEmailService svc = ExchangeUtils.getExchangeService(mContext, null); + // Use a longer timeout for the validate command. Note that the instanceof check + // shouldn't be necessary; we'll do it anyway, just to be safe + if (svc instanceof EmailServiceProxy) { + ((EmailServiceProxy)svc).setTimeout(90); + } + return svc.validate("eas", mHost, mUsername, mPassword, port, ssl, tssl); } catch (RemoteException e) { throw new MessagingException("Call to validate generated an exception", e); }