Fix horrendous typo & regression

* Bugs introduced in I28af1c87292fedf244b53e8eb53b2f3e19469122
* This CL fixes the bug and also adds code to ensure that proper
  account flags are set on every initial sync

Change-Id: Iad6c230087cf52207b020353c0a838cd8710b628
diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java
index 0772d94..19e73b2 100644
--- a/src/com/android/exchange/EasSyncService.java
+++ b/src/com/android/exchange/EasSyncService.java
@@ -1610,7 +1610,7 @@
 
             // Determine our protocol version, if we haven't already and save it in the Account
             // Also re-check protocol version at least once a day (in case of upgrade)
-            if (mAccount.mProtocolVersion == null ||
+            if (mAccount.mProtocolVersion == null || firstSync ||
                     ((System.currentTimeMillis() - mMailbox.mSyncTime) > DAYS)) {
                 userLog("Determine EAS protocol version");
                 EasResponse resp = sendHttpClientOptions();
diff --git a/src/com/android/exchange/ExchangeService.java b/src/com/android/exchange/ExchangeService.java
index 7824a6a..d350a0f 100644
--- a/src/com/android/exchange/ExchangeService.java
+++ b/src/com/android/exchange/ExchangeService.java
@@ -516,7 +516,7 @@
                            cv.put(MailboxColumns.FLAGS,
                                    inbox.mFlags | Mailbox.FLAG_ACCEPTS_MOVED_MAIL);
                            resolver.update(
-                                   ContentUris.withAppendedId(Account.CONTENT_URI, account.mId), cv,
+                                   ContentUris.withAppendedId(Mailbox.CONTENT_URI, inbox.mId), cv,
                                    null, null);
                         }
                     }