android-2.1_r1 snapshot
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fc811b9..d018b12 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -346,12 +346,17 @@
     <string name="account_setup_account_type_title">Add new email account</string>
     <!-- "Add new email account" screen, text that appears on screen -->
     <string name="account_setup_account_type_instructions">What type of account is this?</string>
-    <!-- "Add new email account" screen, button name in response to what type of account this is -->
-    <string name="account_setup_account_type_pop_action">POP3 account</string>
-    <!-- "Add new email account" screen, button name in response to what type of account this is -->
-    <string name="account_setup_account_type_imap_action">IMAP account</string>
-    <!-- "Add new email account" screen, button name in response to what type of account this is -->
-    <string name="account_setup_account_type_exchange_action">Exchange account</string>
+
+    <!-- Do Not Translate. "Add new email account" screen, button name in response to what
+         type of account this is -->
+    <string name="account_setup_account_type_pop_action">POP3</string>
+    <!-- Do Not Translate. "Add new email account" screen, button name in response to what
+         type of account this is -->
+    <string name="account_setup_account_type_imap_action">IMAP</string>
+    <!-- Do Not Translate. "Add new email account" screen, button name in response to what
+         type of account this is -->
+    <string name="account_setup_account_type_exchange_action">Exchange</string>
+
     <!-- "Incoming server settings" screen, label for text field -->
     <string name="account_setup_incoming_title">Incoming server settings</string>
     <!-- "Incoming server settings" screen, label for text field -->
@@ -404,9 +409,9 @@
     <string name="account_setup_outgoing_password_label">Password</string>
     
     <!-- Title of "Exchange server settings" screen -->
-    <string name="account_setup_exchange_title">Exchange server settings</string>
+    <string name="account_setup_exchange_title">Server settings</string>
     <!-- On "Exchange" setup screen, the name of the server -->
-    <string name="account_setup_exchange_server_label">Exchange Server</string>
+    <string name="account_setup_exchange_server_label">Server</string>
     <!-- On "Exchange" setup screen, the domain\\username -->
     <string name="account_setup_exchange_username_label">Domain\\Username</string>
     <!-- Deprecated: On "Exchange" setup screen, the domain name label -->
@@ -483,6 +488,8 @@
     <string name="account_setup_failed_security">Unable to open connection to server due to security error.</string>
     <!-- Additional diagnostic text when server connection failed due to io error (connection) -->
     <string name="account_setup_failed_ioerror">Unable to open connection to server.</string>
+    <!-- Additional diagnostic text when validation failed due to required provisioning not being supported -->
+    <string name="account_setup_failed_security_policies_required">This Exchange ActiveSync server requires security features your phone does not support.</string>
 
     <!-- "Setup could not finish" dialog action button -->
     <string name="account_setup_failed_dlg_edit_details_action">Edit details</string>
diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java
index 3906024..a18cf8b 100644
--- a/src/com/android/exchange/EasSyncService.java
+++ b/src/com/android/exchange/EasSyncService.java
@@ -214,6 +214,17 @@
                     userLog("OPTIONS response without commands or versions; reporting I/O error");
                     throw new MessagingException(MessagingException.IOERROR);
                 }
+
+                // Run second test here for provisioning failures...
+                Serializer s = new Serializer();
+                userLog("Try folder sync");
+                s.start(Tags.FOLDER_FOLDER_SYNC).start(Tags.FOLDER_SYNC_KEY).text("0")
+                    .end().end().done();
+                resp = svc.sendHttpClientPost("FolderSync", s.toByteArray());
+                code = resp.getStatusLine().getStatusCode();
+                if (code == HttpStatus.SC_FORBIDDEN) {
+                    throw new MessagingException(MessagingException.SECURITY_POLICIES_REQUIRED);
+                }
                 userLog("Validation successful");
                 return;
             }
diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java
index ece930c..68aa7de 100644
--- a/src/com/android/exchange/SyncManager.java
+++ b/src/com/android/exchange/SyncManager.java
@@ -142,7 +142,7 @@
     protected static final String WHERE_IN_ACCOUNT_AND_PUSHABLE =
         MailboxColumns.ACCOUNT_KEY + "=? and type in (" + Mailbox.TYPE_INBOX + ','
         + Mailbox.TYPE_EAS_ACCOUNT_MAILBOX + ',' + Mailbox.TYPE_CONTACTS + ')';
-    private static final String WHERE_MAILBOX_KEY = EmailContent.RECORD_ID + "=?";
+    private static final String WHERE_MAILBOX_KEY = Message.MAILBOX_KEY + "=?";
     private static final String WHERE_PROTOCOL_EAS = HostAuthColumns.PROTOCOL + "=\"" +
         AbstractSyncService.EAS_PROTOCOL + "\"";
     private static final String WHERE_NOT_INTERVAL_NEVER_AND_ACCOUNT_KEY_IN =