More correct fix for EAS message list callback issue (3251757)
Bug: 3251757 Change-Id: I879a97e343e9522c7c11e10a1bdd3915fc6dbaac
This commit is contained in:
parent
cbdd9f78b2
commit
e6027c46f7
|
@ -65,7 +65,7 @@ public abstract class AbstractSyncService implements Runnable {
|
|||
public Account mAccount;
|
||||
public Context mContext;
|
||||
public int mChangeCount = 0;
|
||||
public int mSyncReason = 0;
|
||||
public volatile int mSyncReason = 0;
|
||||
protected volatile boolean mStop = false;
|
||||
protected Object mSynchronizer = new Object();
|
||||
|
||||
|
|
|
@ -2364,8 +2364,7 @@ public class EasSyncService extends AbstractSyncService {
|
|||
*/
|
||||
public void run() {
|
||||
if (!setupService()) return;
|
||||
final boolean callbackRequired = (mSyncReason >= ExchangeService.SYNC_CALLBACK_START);
|
||||
if (callbackRequired) {
|
||||
if (mSyncReason >= ExchangeService.SYNC_CALLBACK_START) {
|
||||
try {
|
||||
ExchangeService.callback().syncMailboxStatus(mMailboxId,
|
||||
EmailServiceStatus.IN_PROGRESS, 0);
|
||||
|
@ -2448,14 +2447,14 @@ public class EasSyncService extends AbstractSyncService {
|
|||
}
|
||||
|
||||
// Send a callback if this run was initiated by a service call
|
||||
if (callbackRequired) {
|
||||
if (mSyncReason >= ExchangeService.SYNC_CALLBACK_START) {
|
||||
try {
|
||||
// Unless the user specifically asked for a sync, we really don't want to report
|
||||
// connection issues, as they are likely to be transient. In this case, we
|
||||
// simply report success, so that the progress indicator terminates without
|
||||
// putting up an error banner
|
||||
if (mSyncReason != ExchangeService.SYNC_UI_REQUEST &&
|
||||
status == EXIT_IO_ERROR) {
|
||||
status == EmailServiceStatus.CONNECTION_ERROR) {
|
||||
status = EmailServiceStatus.SUCCESS;
|
||||
}
|
||||
ExchangeService.callback().syncMailboxStatus(mMailboxId, status, 0);
|
||||
|
|
Loading…
Reference in New Issue