summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Blank <mblank@google.com>2009-12-10 14:04:24 -0800
committerMarc Blank <mblank@google.com>2009-12-16 11:54:46 -0800
commit21d077e60b43072a610a01f6d4e4c6a29aa006e1 (patch)
treec7d2a650f33a1452e53e822c75935d8873868b27 /src
parent14d3745f9556232da05c9cd319c097a3e6f791b5 (diff)
downloadandroid_packages_apps_Email-21d077e60b43072a610a01f6d4e4c6a29aa006e1.tar.gz
android_packages_apps_Email-21d077e60b43072a610a01f6d4e4c6a29aa006e1.tar.bz2
android_packages_apps_Email-21d077e60b43072a610a01f6d4e4c6a29aa006e1.zip
Use correct EAS version in Outbox (fixes #2319892) DO NOT MERGE
* We inadvertently failed to set the EAS version in EasOutboxService, so the default of 2.5 is used * This works, but SmartReply/SmartForward were enhanced in 12.0 and we aren't taking advantage of those changes * The fix is to set the version using common code Change-Id: Ife6689fa9934da42d98a48df74fca90ba6d1718c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/exchange/EasSyncService.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java
index a18cf8b11..9ac3257de 100644
--- a/src/com/android/exchange/EasSyncService.java
+++ b/src/com/android/exchange/EasSyncService.java
@@ -1075,11 +1075,12 @@ public class EasSyncService extends AbstractSyncService {
mExitStatus = EXIT_DONE;
}
- protected void setupService() {
+ protected boolean setupService() {
// Make sure account and mailbox are always the latest from the database
mAccount = Account.restoreAccountWithId(mContext, mAccount.mId);
+ if (mAccount == null) return false;
mMailbox = Mailbox.restoreMailboxWithId(mContext, mMailbox.mId);
-
+ if (mMailbox == null) return false;
mThread = Thread.currentThread();
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
TAG = mThread.getName();
@@ -1088,13 +1089,20 @@ public class EasSyncService extends AbstractSyncService {
mHostAddress = ha.mAddress;
mUserName = ha.mLogin;
mPassword = ha.mPassword;
+
+ // Set up our protocol version
+ mProtocolVersion = mAccount.mProtocolVersion;
+ if (mProtocolVersion != null) {
+ mProtocolVersionDouble = Double.parseDouble(mProtocolVersion);
+ }
+ return true;
}
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
- setupService();
+ if (!setupService()) return;
try {
SyncManager.callback().syncMailboxStatus(mMailboxId, EmailServiceStatus.IN_PROGRESS, 0);
@@ -1111,8 +1119,6 @@ public class EasSyncService extends AbstractSyncService {
runAccountMailbox();
} else {
AbstractSyncAdapter target;
- mProtocolVersion = mAccount.mProtocolVersion;
- mProtocolVersionDouble = Double.parseDouble(mProtocolVersion);
if (mMailbox.mType == Mailbox.TYPE_CONTACTS) {
target = new ContactsSyncAdapter(mMailbox, this);
} else {