Request FolderSync for EAS error status 8 & 12.

Change-Id: I2a4a9fa068b6a28580336183fcac29f1e2d71534
(cherry picked from commit 88b9aaa0993cd83c8fbeafc052e67f3ee94fc1b7)
diff --git a/src/com/android/exchange/adapter/AbstractSyncParser.java b/src/com/android/exchange/adapter/AbstractSyncParser.java
index 0c4b5b5..f8ddd1e 100644
--- a/src/com/android/exchange/adapter/AbstractSyncParser.java
+++ b/src/com/android/exchange/adapter/AbstractSyncParser.java
@@ -21,9 +21,11 @@
 import android.content.ContentValues;
 import android.content.Context;
 import android.content.OperationApplicationException;
+import android.os.Bundle;
 import android.os.RemoteException;
 
 import com.android.emailcommon.provider.Account;
+import com.android.emailcommon.provider.EmailContent;
 import com.android.emailcommon.provider.EmailContent.MailboxColumns;
 import com.android.emailcommon.provider.Mailbox;
 import com.android.exchange.CommandStatusException;
@@ -158,8 +160,13 @@
                         // Status 8 is Bad; it means the server doesn't recognize the serverId it
                         // sent us.  12 means that we're being asked to refresh the folder list.
                         // We'll do that with 8 also...
-                        // TODO: reloadFolderList simply sets all mailboxes to hold.
-                        //ExchangeService.reloadFolderList(mContext, mAccount.mId, true);
+                        // TODO: Improve this -- probably best to do this synchronously and then
+                        // immediately retry the current sync.
+                        final Bundle extras = new Bundle(1);
+                        extras.putBoolean(Mailbox.SYNC_EXTRA_ACCOUNT_ONLY, true);
+                        ContentResolver.requestSync(new android.accounts.Account(
+                                mAccount.mEmailAddress, Eas.EXCHANGE_ACCOUNT_MANAGER_TYPE),
+                                EmailContent.AUTHORITY, extras);
                         // We don't have any provision for telling the user "wait a minute while
                         // we sync folders"...
                         throw new IOException();