From 5f1749bb0e3552991931da8ff6231ae02b0fc8ec Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Thu, 28 Aug 2014 11:34:35 -0700 Subject: [PATCH] Prevent account reconcilliation during migration b/17221527 Change-Id: I7077a90af8317aa38e865e345aff7fb33083ddc2 --- src/com/android/email/provider/AccountReconciler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/provider/AccountReconciler.java b/src/com/android/email/provider/AccountReconciler.java index c8cfc8ef7..251c59a37 100644 --- a/src/com/android/email/provider/AccountReconciler.java +++ b/src/com/android/email/provider/AccountReconciler.java @@ -37,6 +37,7 @@ import com.android.email.service.EmailServiceUtils.EmailServiceInfo; import com.android.emailcommon.Logging; import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.HostAuth; +import com.android.emailcommon.utility.MigrationUtils; import com.android.mail.utils.LogUtils; import com.google.common.collect.ImmutableList; @@ -159,8 +160,13 @@ public class AccountReconciler { boolean exchangeAccountDeleted = false; LogUtils.d(Logging.LOG_TAG, "reconcileAccountsInternal"); - // See if we should have the Eas authenticators enabled. + if (MigrationUtils.migrationInProgress()) { + LogUtils.d(Logging.LOG_TAG, "deferring reconciliation, migration in progress"); + return false; + } + + // See if we should have the Eas authenticators enabled. if (!EmailServiceUtils.isServiceAvailable(context, context.getString(R.string.protocol_eas))) { EmailServiceUtils.disableExchangeComponents(context);