diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java index a1a76dce5..1feaf01f6 100644 --- a/src/com/android/exchange/EasSyncService.java +++ b/src/com/android/exchange/EasSyncService.java @@ -1291,6 +1291,8 @@ public class EasSyncService extends AbstractSyncService { if (policyKey != null) { // Write the final policy key to the Account and say we've been successful ps.writeAccount(mAccount, policyKey, true, mContext); + // Release any mailboxes that might be in a security hold + SyncManager.releaseSecurityHold(mAccount); return true; } } else { diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index 7a56cbbd9..dcdf6db76 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -895,6 +895,18 @@ public class SyncManager extends Service implements Runnable { } } + /** + * Release security holds for the specified account + * @param account the account whose Mailboxes should be released from security hold + */ + static public void releaseSecurityHold(Account account) { + SyncManager syncManager = INSTANCE; + if (syncManager != null) { + syncManager.releaseSyncHolds(INSTANCE, AbstractSyncService.EXIT_SECURITY_FAILURE, + account); + } + } + /** * Release a specific type of hold (the reason) for the specified Account; if the account * is null, mailboxes from all accounts with the specified hold will be released