Change IEmailService.sync to have two different forms

Change-Id: I0d0d2847434e995c47eb813636aa2fd67b810ea1
diff --git a/src/com/android/exchange/service/EasService.java b/src/com/android/exchange/service/EasService.java
index fd7b17d..c786921 100644
--- a/src/com/android/exchange/service/EasService.java
+++ b/src/com/android/exchange/service/EasService.java
@@ -18,6 +18,7 @@
 
 import android.app.Service;
 import android.content.ContentResolver;
+import android.content.Context;
 import android.content.Intent;
 import android.database.Cursor;
 import android.os.AsyncTask;
@@ -43,6 +44,7 @@
 import com.android.exchange.eas.EasOperation;
 import com.android.exchange.eas.EasSearch;
 import com.android.exchange.eas.EasSendMeetingResponse;
+import com.android.exchange.eas.EasSyncBase;
 import com.android.mail.utils.LogUtils;
 
 import java.util.HashSet;
@@ -94,8 +96,26 @@
         }
 
         @Override
-        public void sync(final long accountId, final boolean updateFolderList,
-                final int mailboxType, final long[] folders) {}
+        public void syncFolders(final long accountId, final boolean updateFolderList,
+                         final long[] folders) {
+            final Account account = Account.restoreAccountWithId(EasService.this, accountId);
+            for (final long folderId : folders) {
+                // TODO: Performance would be improved if we could do multiple folders in
+                // a single operation.
+                final Mailbox mailbox = Mailbox.restoreMailboxWithId(EasService.this, folderId);
+                EasOperation op = new EasSyncBase(EasService.this, account, mailbox);
+            }
+        }
+
+        @Override
+        public void syncMailboxType(final long accountId, final boolean updateFolderList,
+                         final int mailboxType) {
+            final Account account = Account.restoreAccountWithId(EasService.this, accountId);
+            // TODO: What if there are multiple mailboxes of this type?
+            final Mailbox mailbox = Mailbox.restoreMailboxOfType(EasService.this, accountId,
+                    mailboxType);
+            EasOperation op = new EasSyncBase(EasService.this, account, mailbox);
+        }
 
         @Override
         public void pushModify(final long accountId) {
diff --git a/src/com/android/exchange/service/EmailSyncAdapterService.java b/src/com/android/exchange/service/EmailSyncAdapterService.java
index 6534b8f..2d17a86 100644
--- a/src/com/android/exchange/service/EmailSyncAdapterService.java
+++ b/src/com/android/exchange/service/EmailSyncAdapterService.java
@@ -548,8 +548,12 @@
         }
 
         @Override
-        public void sync(final long accountId, final boolean updateFolderList,
-                final int mailboxType, final long[] folders) {}
+        public void syncFolders(final long accountId, final boolean updateFolderList,
+                         final long[] folders) {}
+
+        @Override
+        public void syncMailboxType(final long accountId, final boolean updateFolderList,
+                         final int mailboxType) {}
     };
 
     public EmailSyncAdapterService() {