Merge change Ife6689fa into eclair
* changes: Use correct EAS version in Outbox (fixes #2319892) DO NOT MERGE
This commit is contained in:
commit
27051e480f
@ -1075,11 +1075,12 @@ public class EasSyncService extends AbstractSyncService {
|
|||||||
mExitStatus = EXIT_DONE;
|
mExitStatus = EXIT_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setupService() {
|
protected boolean setupService() {
|
||||||
// Make sure account and mailbox are always the latest from the database
|
// Make sure account and mailbox are always the latest from the database
|
||||||
mAccount = Account.restoreAccountWithId(mContext, mAccount.mId);
|
mAccount = Account.restoreAccountWithId(mContext, mAccount.mId);
|
||||||
|
if (mAccount == null) return false;
|
||||||
mMailbox = Mailbox.restoreMailboxWithId(mContext, mMailbox.mId);
|
mMailbox = Mailbox.restoreMailboxWithId(mContext, mMailbox.mId);
|
||||||
|
if (mMailbox == null) return false;
|
||||||
mThread = Thread.currentThread();
|
mThread = Thread.currentThread();
|
||||||
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
|
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
|
||||||
TAG = mThread.getName();
|
TAG = mThread.getName();
|
||||||
@ -1088,13 +1089,20 @@ public class EasSyncService extends AbstractSyncService {
|
|||||||
mHostAddress = ha.mAddress;
|
mHostAddress = ha.mAddress;
|
||||||
mUserName = ha.mLogin;
|
mUserName = ha.mLogin;
|
||||||
mPassword = ha.mPassword;
|
mPassword = ha.mPassword;
|
||||||
|
|
||||||
|
// Set up our protocol version
|
||||||
|
mProtocolVersion = mAccount.mProtocolVersion;
|
||||||
|
if (mProtocolVersion != null) {
|
||||||
|
mProtocolVersionDouble = Double.parseDouble(mProtocolVersion);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Runnable#run()
|
* @see java.lang.Runnable#run()
|
||||||
*/
|
*/
|
||||||
public void run() {
|
public void run() {
|
||||||
setupService();
|
if (!setupService()) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SyncManager.callback().syncMailboxStatus(mMailboxId, EmailServiceStatus.IN_PROGRESS, 0);
|
SyncManager.callback().syncMailboxStatus(mMailboxId, EmailServiceStatus.IN_PROGRESS, 0);
|
||||||
@ -1111,8 +1119,6 @@ public class EasSyncService extends AbstractSyncService {
|
|||||||
runAccountMailbox();
|
runAccountMailbox();
|
||||||
} else {
|
} else {
|
||||||
AbstractSyncAdapter target;
|
AbstractSyncAdapter target;
|
||||||
mProtocolVersion = mAccount.mProtocolVersion;
|
|
||||||
mProtocolVersionDouble = Double.parseDouble(mProtocolVersion);
|
|
||||||
if (mMailbox.mType == Mailbox.TYPE_CONTACTS) {
|
if (mMailbox.mType == Mailbox.TYPE_CONTACTS) {
|
||||||
target = new ContactsSyncAdapter(mMailbox, this);
|
target = new ContactsSyncAdapter(mMailbox, this);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user