Set the sync status upon mailbox creation

b/17443087
When Exchange creates a folder, if it is a syncable
folder, it now starts with a sync state of "initial
sync needed". Otherwise we can display the empty state
until the sync of that folder actually starts.

Change-Id: Ib8c5f54ff1f8352b0a8684f0637be2536a22d2b9
diff --git a/src/com/android/exchange/adapter/FolderSyncParser.java b/src/com/android/exchange/adapter/FolderSyncParser.java
index acd71d3..405202d 100644
--- a/src/com/android/exchange/adapter/FolderSyncParser.java
+++ b/src/com/android/exchange/adapter/FolderSyncParser.java
@@ -430,6 +430,11 @@
 
         final boolean shouldSync = fromServer && Mailbox.getDefaultSyncStateForType(mailboxType);
         cv.put(MailboxColumns.SYNC_INTERVAL, shouldSync ? 1 : 0);
+        if (shouldSync) {
+            cv.put(MailboxColumns.UI_SYNC_STATUS, UIProvider.SyncStatus.INITIAL_SYNC_NEEDED);
+        } else {
+            cv.put(MailboxColumns.UI_SYNC_STATUS, UIProvider.SyncStatus.NO_SYNC);
+        }
 
         // Set basic flags
         int flags = 0;