Code drop from //branches/cupcake/...@124589
diff --git a/Android.mk b/Android.mk
index 5fbfacc..be1d719 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,10 +1,27 @@
+# Copyright 2008, The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE_TAGS := eng development
 
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
 LOCAL_PACKAGE_NAME := Email
 
 include $(BUILD_PACKAGE)
+
+# additionally, build unit tests in a separate .apk
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index dd64c6c..c7b3c4e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.email">
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
@@ -73,13 +88,15 @@
         </activity>
         <activity
             android:name=".activity.Accounts"
-            android:label="@string/accounts_title">
+            android:label="@string/accounts_title"
+            android:launchMode="singleTop" >
         </activity>
         <activity
             android:name=".activity.FolderMessageList">
         </activity>
         <activity
-            android:name=".activity.MessageView">
+            android:name=".activity.MessageView"
+            android:theme="@android:style/Theme.NoTitleBar" >
         </activity>
         <activity
             android:name=".activity.MessageCompose"
diff --git a/res/drawable/expander_ic_folder.xml b/res/drawable/expander_ic_folder.xml
index e829b34..d82c00a 100644
--- a/res/drawable/expander_ic_folder.xml
+++ b/res/drawable/expander_ic_folder.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_expanded="true"
         android:drawable="@drawable/expander_ic_folder_maximized" />
diff --git a/res/drawable/folder_message_list_child_background.xml b/res/drawable/folder_message_list_child_background.xml
index d77d1c4..a39fb29 100644
--- a/res/drawable/folder_message_list_child_background.xml
+++ b/res/drawable/folder_message_list_child_background.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_window_focused="false" android:state_selected="true"
         android:drawable="@color/folder_message_list_child_background" />
diff --git a/res/drawable/ic_email_caret_double_light.png b/res/drawable/ic_email_caret_double_light.png
deleted file mode 100644
index 5153844..0000000
--- a/res/drawable/ic_email_caret_double_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_email_caret_single_light.png b/res/drawable/ic_email_caret_single_light.png
deleted file mode 100644
index eb29c27..0000000
--- a/res/drawable/ic_email_caret_single_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_archive.png b/res/drawable/ic_menu_archive.png
deleted file mode 100644
index a4599e3..0000000
--- a/res/drawable/ic_menu_archive.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_edit.png b/res/drawable/ic_menu_edit.png
deleted file mode 100644
index 41a9c2e..0000000
--- a/res/drawable/ic_menu_edit.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_inbox.png b/res/drawable/ic_menu_inbox.png
deleted file mode 100644
index 9ab6f76..0000000
--- a/res/drawable/ic_menu_inbox.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_navigate.png b/res/drawable/ic_menu_navigate.png
deleted file mode 100644
index abb64b9..0000000
--- a/res/drawable/ic_menu_navigate.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_preferences.png b/res/drawable/ic_menu_preferences.png
deleted file mode 100644
index b8e7141..0000000
--- a/res/drawable/ic_menu_preferences.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_search.png b/res/drawable/ic_menu_search.png
deleted file mode 100644
index 94446db..0000000
--- a/res/drawable/ic_menu_search.png
+++ /dev/null
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3a2d8ad..5c7086b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,232 +1,366 @@
 <?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="read_attachment_label">read Email attachments</string>
-    <string name="read_attachment_desc">Allows this application to read your Email attachments.</string>
+<!-- Copyright (C) 2008 The Android Open Source Project
 
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- Permissions label -->
+    <string name="read_attachment_label">read Email attachments</string>
+    <!-- Permissions description -->
+    <string name="read_attachment_desc">Allows this application to read your Email attachments.</string>
+    <!-- Name of application on Home screen -->
     <string name="app_name">Email</string>
+    <!-- Title of Accounts screen -->
     <string name="accounts_title">Your accounts</string>
+    <!-- Title of compose screen -->
     <string name="compose_title">Compose</string>
+    <!-- Title of debug screen -->
     <string name="debug_title">Debug</string>
 
     <!-- Actions will be used as buttons and in menu items -->
-    <string name="next_action">Next</string> <!-- Used as part of a multi-step process -->
-    <string name="okay_action">OK</string> <!--  User to confirm acceptance of dialog boxes, warnings, errors, etc. -->
+    <skip />
+    
+    <!-- Used as part of a multi-step process -->
+    <string name="next_action">Next</string> 
+    <!--  Button name used to confirm acceptance of dialog boxes, warnings, errors, etc. -->
+    <string name="okay_action">OK</string> 
+    <!--  Button name used to cancel out of dialog boxes -->
     <string name="cancel_action">Cancel</string>
+    <!-- Menu item/button name -->
     <string name="send_action">Send</string>
+    <!-- Menu item/button name -->
     <string name="reply_action">Reply</string>
+    <!-- Menu item/button name -->
     <string name="reply_all_action">Reply all</string>
+    <!-- Menu item/button name -->
     <string name="delete_action">Delete</string>
+    <!-- Menu item/button name -->
     <string name="forward_action">Forward</string>
-    <string name="continue_action">Continue</string>
-    <string name="done_action">Done</string> <!--  Used to complete a multi-step process -->
-    <string name="remove_action">Remove</string>
+    <!--  Button name used to complete a multi-step process -->
+    <string name="done_action">Done</string> 
+    <!-- Menu item/button name -->
     <string name="discard_action">Discard</string>
+    <!-- Menu item/button name -->
     <string name="save_draft_action">Save as draft</string>
-    <string name="retry_action">Retry</string>
+    <!-- Menu item -->
     <string name="refresh_action">Refresh</string>
+    <!-- Menu item -->
     <string name="add_account_action">Add account</string>
+    <!-- Menu item -->
     <string name="compose_action">Compose</string>
+    <!-- Menu item/button name -->
     <string name="search_action">Search</string>
-    <string name="preferences_action">Preferences</string>
+    <!-- Menu item/button name -->
     <string name="open_action">Open</string>
+    <!-- Menu item -->
     <string name="account_settings_action">Account settings</string>
+    <!-- Menu item -->
     <string name="remove_account_action">Remove account</string>
+    <!-- Menu item -->
     <string name="accounts_action">Accounts</string>
-    <string name="read_action">Read</string>
+    <!-- Menu item -->
     <string name="mark_as_read_action">Mark as read</string>
+    <!-- Menu item -->
     <string name="mark_as_unread_action">Mark as unread</string>
-    <string name="move_to_action">Move to</string>
-    <string name="folders_action">Folders</string>
-    <string name="view_hide_details_action">View/hide details</string>
+    <!-- Menu item -->
     <string name="add_cc_bcc_action">Add Cc/Bcc</string>
-    <string name="edit_subject_action">Edit subject</string>
+    <!-- Menu item -->
     <string name="add_attachment_action">Add attachment</string>
+    <!-- Menu item (debug screen) -->
     <string name="dump_settings_action">Dump settings</string>
-    <string name="empty_trash_action">Empty Trash</string>
-
+    <!-- Title of account context menu -->
     <string name="accounts_context_menu_title">Account options</string>
-
-    <string name="general_no_subject">(No subject)</string> <!-- Shown in place of the subject when a message has no subject. Showing this in parentheses is customary. -->
-
-    <string name="status_loading">Loading\u2026</string>
+    <!-- Appears in message list view while messages are being loaded -->
     <string name="status_loading_more">Loading messages\u2026</string>
+    <!-- Appears in message list view when there's a network error. -->
+    <!-- Also appears in a toast, in the message viewer, when there's a network error. -->
     <string name="status_network_error">Connection error</string>
-    <string name="status_error">Error</string> <!-- Used in Outbox when a message has failed to send -->
-    <string name="status_sending">Sending\u2026</string> <!-- Used in Outbox when a message is currently sending -->
+    <!-- Appears in message list view when error when trying to "Load more messages". -->
     <string name="status_loading_more_failed">Retry loading more messages</string>
-
+    <!-- Notification title in status bar -->
     <string name="notification_new_title">New email</string>
-    <string name="notification_new_scrolling">New email from <xliff:g id="sender">%s</xliff:g></string>
-    <string name="notification_new_one_account_fmt"><xliff:g id="unread_message_count">%d</xliff:g> Unread (<xliff:g id="account">%s</xliff:g>)</string> <!-- 279 Unread (someone@google.com) -->
+    <!-- Notification message in notifications window and one account has new mail; e.g, "279 unread (someone@google.com)" -->
+    <string name="notification_new_one_account_fmt"><xliff:g id="unread_message_count">%d</xliff:g> unread (<xliff:g id="account">%s</xliff:g>)</string> 
+    <!-- Notification message in notifications window and 2+ accounts has new mail; e.g, "in 3 accounts" -->
     <string name="notification_new_multi_account_fmt">in <xliff:g id="number_accounts">%d</xliff:g> accounts</string>
-    <string name="notification_unsent_title">Message not sent</string>
 
+    <!-- In the folder list view, the inbox will be displayed with this name -->
     <string name="special_mailbox_name_inbox">Inbox</string>
+    <!-- Do Not Translate.  This is the name of the "outbox" folder, on the server. -->
     <string name="special_mailbox_name_outbox">Outbox</string>
-    <!-- The following mailbox names will be used if the user has not specified one from the server -->
+    <!-- Do Not Translate.  This is the name of the "drafts" folder, on the server. -->
     <string name="special_mailbox_name_drafts">Drafts</string>
+    <!-- Do Not Translate.  This is the name of the "trash" folder, on the server. -->
     <string name="special_mailbox_name_trash">Trash</string>
+    <!-- Do Not Translate.  This is the name of the "sent" folder, on the server. -->
     <string name="special_mailbox_name_sent">Sent</string>
-
+    <!-- Text on screen when you don't have any external email accounts set up -->
     <string name="accounts_welcome">Welcome to Email setup!\n\nUse any email account with Email.\n\nMost popular email accounts can be set up in 2 steps!</string>
 
+    <!-- Version number, shown only on debug screen -->
     <string name="debug_version_fmt">Version: <xliff:g id="version">%s</xliff:g></string>
+    <!-- Checkbox label, shown only on debug screen -->
     <string name="debug_enable_debug_logging_label">Enable extra debug logging?</string>
+    <!-- Checkbox label, shown only on debug screen -->
     <string name="debug_enable_sensitive_logging_label">Enable sensitive information debug logging? (May show passwords in logs.)</string>
 
-    <string name="combined_inbox_title">All Email</string>
-    <string name="combined_inbox_label">Recent messages from all accounts</string>
-    <string name="combined_inbox_list_title">All Email Inbox</string> <!-- Inbox here should be the same as mailbox_name_inbox -->
-
-    <string name="message_list_title_fmt"><xliff:g id="mailbox">%s</xliff:g> (<xliff:g id="message_count">%d</xliff:g>)</string> <!-- Inbox (12) -->
+    <!-- Appears at the bottom of list of messages; user selects to load more messages from that folder. -->
     <string name="message_list_load_more_messages_action">Load more messages</string>
-
+    <!-- Hint text in To field -->
     <string name="message_compose_to_hint">To</string>
+    <!-- Hint text in Cc field -->
     <string name="message_compose_cc_hint">Cc</string>
+    <!-- Hint text in Bcc field -->
     <string name="message_compose_bcc_hint">Bcc</string>
+    <!-- Hint text in Subject field -->
     <string name="message_compose_subject_hint">Subject</string>
+    <!-- Header for forwarded original messages -->
     <string name="message_compose_fwd_header_fmt">\n\n-------- Original Message --------\nSubject: <xliff:g id="subject">%s</xliff:g>\nFrom: <xliff:g id="sender">%s</xliff:g>\nTo: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
+    <!-- Header for replied-to messages -->
     <string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> wrote:\n\n</string>
+    <!-- Heading that appears before forwarded text -->
     <string name="message_compose_quoted_text_label">Quoted text</string>
+    <!-- Toast that appears if you try to send with no recipients. -->
     <string name="message_compose_error_no_recipients">You must add at least one recipient.</string>
-    <string name="message_compose_downloading_attachments_toast">Some attachments were not downloaded. They will be downloaded automatically before this message is sent.</string>
+    <!-- Toast that appears in the context of forwarding a message with attachment(s) -->
     <string name="message_compose_attachments_skipped_toast">Some attachments cannot be forwarded because they have not downloaded.</string>
-
+    <!-- Label for To field in read message view -->
     <string name="message_view_to_label">To:</string>
+    <!-- Label for CC field in read message view -->
+    <string name="message_view_cc_label">Cc:</string>
+    <!-- Menu item -->
     <string name="message_view_attachment_view_action">Open</string>
+    <!-- Button name -->
     <string name="message_view_attachment_download_action">Save</string>
+    <!-- Button name on read email screen -->
     <string name="message_view_prev_action">Prev message</string>
+    <!-- Button name on read email screen -->
     <string name="message_view_next_action">Next message</string>
-    <string name="message_view_datetime_fmt">MMM dd yyyy hh:mm a</string>
+    <!-- Toast after saving attachment -->
     <string name="message_view_status_attachment_saved">Attachment saved to SD card as <xliff:g id="filename">%s</xliff:g>.</string>
+    <!-- Toast after attachment could not be saved-->
     <string name="message_view_status_attachment_not_saved">Unable to save attachment to SD card.</string>
+    <!-- Displayed in message view -->
     <string name="message_view_show_pictures_instructions">Select \"Show pictures\" to display embedded pictures.</string>
+    <!-- Button on email opened for reading -->
     <string name="message_view_show_pictures_action">Show pictures</string>
+    <!-- Toast while fetching attachment -->
     <string name="message_view_fetching_attachment_toast">Fetching attachment.</string>
-
-    <string name="mailbox_select_dlg_title">Folders</string>
-    <string name="mailbox_select_dlg_new_mailbox_action">New folder</string>
-
-    <string name="new_mailbox_dlg_title">New folder name</string>
-
-    <string name="message_copied_toast">Message copied.</string>
-    <string name="message_moved_toast">Message moved.</string>
+    <!-- Toast shown briefly while deleting a message -->
     <string name="message_deleted_toast">Message deleted.</string>
+    <!-- Toast shown briefly while deleting an unsent (draft) message -->
     <string name="message_discarded_toast">Message discarded.</string>
+    <!-- Toast shown briefly while saving a draft -->
     <string name="message_saved_toast">Message saved as draft.</string>
-
+    <!-- Title of screen when setting up new email account -->
     <string name="account_setup_basics_title">Set up email</string>
+    <!-- On "Set up email" screen, brief instructions -->
     <string name="account_setup_basics_instructions">Type your account email address:</string>
-    <string name="account_setup_basics_instructions2_fmt">(You may add <xliff:g id="number_accounts">%d</xliff:g> more accounts.)</string>
+    <!-- On "Set up email" screen, hint for account email address text field -->
     <string name="account_setup_basics_email_hint">Email address</string>
-    <string name="account_setup_basics_email_error_invalid_fmt"><xliff:g id="email">%s</xliff:g> is not a valid email address.</string>
-    <string name="account_setup_basics_email_error_duplicate_fmt"><xliff:g id="email">%s</xliff:g> is already added.</string>
+    <!-- On "Set up email" screen, hint for account email password text field -->
     <string name="account_setup_basics_password_hint">Password</string>
+    <!-- On "Set up email" screen, checkbox label for making this the new account be the default account -->
     <string name="account_setup_basics_default_label">Send email from this account by default.</string>
+    <!-- Button name on "Set up email" screen -->
     <string name="account_setup_basics_manual_setup_action">Manual setup</string>
+    <!-- Toast when we can't build a URI from the given email & password -->
+    <!-- Note, the error message in the toast is purposefully vague, because I *don't* know exactly what's wrong. -->
+    <string name="account_setup_username_password_toast">Please type a valid email address and password.</string>
 
+    <!-- Do Not Translate.  Activity Title for check-settings screen -->
     <string name="account_setup_check_settings_title"></string>
+    <!-- On check-settings screen, this is the initially-displayed message. -->
     <string name="account_setup_check_settings_retr_info_msg">Retrieving account information\u2026</string>
+    <!-- Appears on screen while system is checking incoming server settings -->
     <string name="account_setup_check_settings_check_incoming_msg">Checking incoming server settings\u2026</string>
+    <!-- Appears on screen while system is checking outgoing server settings -->
     <string name="account_setup_check_settings_check_outgoing_msg">Checking outgoing server settings\u2026</string>
-    <string name="account_setup_check_settings_finishing_msg">Finishing\u2026</string>
+    <!-- On check-settings screen, displayed briefly when user cancels the operation. -->
     <string name="account_setup_check_settings_canceling_msg">Canceling\u2026</string>
-
+    <!-- Title of "Set up email" screen after success -->
     <string name="account_setup_names_title">Set up email</string>
+    <!-- Text that appears on top of "Set up email" screen after successfully setting up an account -->
     <string name="account_setup_names_instructions">Your account is set up, and email is on its way!</string>
-    <string name="account_setup_names_account_name_label">Give this account a name (optional):</string>
-    <string name="account_setup_names_user_name_label">Type your name (displays on outgoing messages):</string>
+    <!-- On "Set up email" screen, label of text field -->
+    <string name="account_setup_names_account_name_label">Give this account a name (optional)</string>
+    <!-- On "Set up email" screen, label of text field -->
+    <string name="account_setup_names_user_name_label">Your name (displayed on outgoing messages)</string>
 
-    <string name="account_setup_finished_toast">Your account is set up!\n\nFetching email\u2026</string>
-
+    <!-- Activity Title for the first screen in manual setup (where you select IMAP or POP3) -->
     <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>
-
+    <!-- "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 -->
     <string name="account_setup_incoming_username_label">Username</string>
+    <!-- "Incoming server settings" screen, label for text field -->
     <string name="account_setup_incoming_password_label">Password</string>
+    <!-- "Incoming server settings" screen, label for text field -->
     <string name="account_setup_incoming_pop_server_label">POP3 server</string>
+    <!-- "Incoming server settings" screen, label for text field -->
     <string name="account_setup_incoming_imap_server_label">IMAP server</string>
+    <!-- "Incoming server settings" screen, label for text field -->
     <string name="account_setup_incoming_port_label">Port</string>
+    <!-- "Incoming server settings" screen, label for pop-up menu -->
     <string name="account_setup_incoming_security_label">Security type</string>
+    <!-- "Incoming server settings" screen, options for "Security type" pop-up menu -->
     <string name="account_setup_incoming_security_none_label">None</string>
+    <!-- "Incoming server settings" screen, options for "Security type" pop-up menu -->
     <string name="account_setup_incoming_security_ssl_optional_label">SSL (if available)</string>
+    <!-- "Incoming server settings" screen, options for "Security type" pop-up menu -->
     <string name="account_setup_incoming_security_ssl_label">SSL (always)</string>
+    <!-- "Incoming server settings" screen, options for "Security type" pop-up menu -->
     <string name="account_setup_incoming_security_tls_optional_label">TLS (if available)</string>
+    <!-- "Incoming server settings" screen, options for "Security type" pop-up menu -->
     <string name="account_setup_incoming_security_tls_label">TLS (always)</string>
-    <string name="account_setup_incoming_delete_policy_label">Delete email from server:</string>
+    <!-- "Incoming server settings" screen, label for pop-up menu -->
+    <string name="account_setup_incoming_delete_policy_label">Delete email from server</string>
+    <!-- "Incoming server settings" screen, options in pop-up menu for Delete email from server: -->
+    <!-- "Incoming server settings" screen, options in pop-up menu for Delete email from server: -->
     <string name="account_setup_incoming_delete_policy_never_label">Never</string>
+    <!-- "Incoming server settings" screen, options in pop-up menu for Delete email from server: -->
     <string name="account_setup_incoming_delete_policy_7days_label">After 7 days</string>
+    <!-- "Incoming server settings" screen, options in pop-up menu for Delete email from server: -->
     <string name="account_setup_incoming_delete_policy_delete_label">When I delete from Inbox</string>
+    
+    <!-- "Incoming server settings" screen, label for setting IMAP path prefix: -->
     <string name="account_setup_incoming_imap_path_prefix_label">IMAP path prefix</string>
+    <!-- "Incoming server settings" screen, hint for setting IMAP path prefix: -->
     <string name="account_setup_incoming_imap_path_prefix_hint">Optional</string>
-
+    <!-- Title of "Outgoing server settings" screen -->
     <string name="account_setup_outgoing_title">Outgoing server settings</string>
+    <!-- On "Outgoing server settings" screen, label for text field -->
     <string name="account_setup_outgoing_smtp_server_label">SMTP server</string>
+    <!-- On "Outgoing server settings" screen, label for text field -->
     <string name="account_setup_outgoing_port_label">Port</string>
+    <!-- On "Outgoing server settings" screen, label for pop-up menu -->
     <string name="account_setup_outgoing_security_label">Security type</string>
-    <string name="account_setup_outgoing_security_none_label">None</string>
-    <string name="account_setup_outgoing_security_ssl_label">SSL</string>
-    <string name="account_setup_outgoing_security_tls_optional_label">TLS (if available)</string>
-    <string name="account_setup_outgoing_security_tls_label">TLS (always)</string>
+    <!-- On "Outgoing server settings" screen, label for check box -->
     <string name="account_setup_outgoing_require_login_label">Require sign-in.</string>
+    <!-- On "Outgoing server settings" screen, label for text field -->
     <string name="account_setup_outgoing_username_label">Username</string>
+    <!-- On "Outgoing server settings" screen, label for text field -->
     <string name="account_setup_outgoing_password_label">Password</string>
-    <!-- The authentication strings below are for a planned (hopefully) change to the above username and password options -->
-    <string name="account_setup_outgoing_authentication_label">Authentication type</string>
-    <string name="account_setup_outgoing_authentication_basic_label">Username &amp; password</string>
-    <string name="account_setup_outgoing_authentication_basic_username_label">Username</string>
-    <string name="account_setup_outgoing_authentication_basic_password_label">Password</string>
-    <string name="account_setup_outgoing_authentication_pop_before_smtp_label">POP before SMTP</string>
-    <string name="account_setup_outgoing_authentication_imap_before_smtp_label">IMAP before SMTP</string>
 
+    <!-- In Account setup options screen, Activity title -->
     <string name="account_setup_options_title">Account options</string>
+    <!-- In Account setup options screen, label for email check frequency selector -->
     <string name="account_setup_options_mail_check_frequency_label">Email checking frequency</string>
-    <!-- Frequency also used in account_settings_* -->
+    <!-- In Account setup options & Account Settings screens, label for email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_never">Never</string>
+    <!-- In Account setup options & Account Settings screens, email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_5min">Every 5 minutes</string>
+    <!-- In Account setup options & Account Settings screens, email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_10min">Every 10 minutes</string>
+    <!-- In Account setup options & Account Settings screens, email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_15min">Every 15 minutes</string>
+    <!-- In Account setup options & Account Settings screens, email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_30min">Every 30 minutes</string>
+    <!-- In Account setup options & Account Settings screens, email check frequency option -->
     <string name="account_setup_options_mail_check_frequency_1hour">Every hour</string>
+    <!-- Check box label on "Set up email" screen to make this the default account -->
+    <!-- Note, this should usually match the default account summary preference string -->
     <string name="account_setup_options_default_label">Send email from this account by default.</string>
+    <!-- In Account setup options & Account Settings screens, check box for new-mail notification -->
     <string name="account_setup_options_notify_label">Notify me when email arrives.</string>
-
+    <!-- Dialog title when "setup" could not finish -->
     <string name="account_setup_failed_dlg_title">Setup could not finish</string>
-    <string name="account_setup_failed_dlg_auth_message_fmt">Username or password incorrect.\n(<xliff:g id="error">%s</xliff:g>)</string> <!-- Username or password incorrect\n(ERR01 Account does not exist) -->
-    <string name="account_setup_failed_dlg_certificate_message_fmt">Cannot safely connect to server.\n(<xliff:g id="error">%s</xliff:g>)</string> <!-- Cannot safely connect to server\n(Invalid certificate) -->
-    <string name="account_setup_failed_dlg_server_message_fmt">Cannot connect to server.\n(<xliff:g id="error">%s</xliff:g>)</string> <!-- Cannot connect to server\n(Connection timed out) -->
+
+    <!-- "Setup could not finish" dialog text; e.g., Username or password incorrect -->
+    <string name="account_setup_failed_dlg_auth_message">Username or password incorrect.</string> 
+    <!-- "Setup could not finish" dialog text; e.g., Username or password incorrect\n(ERR01 Account does not exist) -->
+    <string name="account_setup_failed_dlg_auth_message_fmt">Username or password incorrect.\n(<xliff:g id="error">%s</xliff:g>)</string> 
+
+    <!-- "Setup could not finish" dialog text; e.g., Cannot safely connect to server -->
+    <string name="account_setup_failed_dlg_certificate_message">Cannot safely connect to server.</string> 
+    <!-- "Setup could not finish" dialog text; e.g., Cannot safely connect to server\n(TLS Not Supported) -->
+    <string name="account_setup_failed_dlg_certificate_message_fmt">Cannot safely connect to server.\n(<xliff:g id="error">%s</xliff:g>)</string> 
+
+    <!-- "Setup could not finish" dialog text; e.g., Cannot connect to server -->
+    <string name="account_setup_failed_dlg_server_message">Cannot connect to server.</string> 
+    <!-- "Setup could not finish" dialog text; e.g., Cannot connect to server\n(Connection timed out) -->
+    <string name="account_setup_failed_dlg_server_message_fmt">Cannot connect to server.\n(<xliff:g id="error">%s</xliff:g>)</string> 
+
+    <!-- Additional diagnostic text when TLS was required but the server doesn't support it -->
+    <string name="account_setup_failed_tls_required">TLS required but not supported by server.</string>
+    <!-- Additional diagnostic text when server does not support any of our authentication methods -->
+    <string name="account_setup_failed_auth_required">Authentication methods are not supported by server.</string>
+    <!-- Additional diagnostic text when server connection failed due to security error -->
+    <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>
+
+    <!-- "Setup could not finish" dialog action button -->
     <string name="account_setup_failed_dlg_edit_details_action">Edit details</string>
-
+    <!-- On Settings screen, section heading -->
     <string name="account_settings_title_fmt">General settings</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_default_label">Default account</string>
+    <!-- Check box "summary" label on "Account options" screen to make this the default account -->
+    <!-- Note, this should usually match the default account account setup checkbox string -->
     <string name="account_settings_default_summary">Send email from this account by default</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_notify_label">Email notifications</string>
+    <!-- On Settings screen, setting summary text -->
     <string name="account_settings_notify_summary">Notify in status bar when email arrives</string>
-    <string name="account_settings_show_combined_label">Show combined Inbox</string>
+    <!-- On Settings screen, setting option name and title of dialog box that opens -->
     <string name="account_settings_mail_check_frequency_label">Email check frequency</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_incoming_label">Incoming settings</string>
-    <string name="account_settings_incoming_summary">Configure the incoming email server</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_outgoing_label">Outgoing settings</string>
-    <string name="account_settings_outgoing_summary">Configure the outgoing email server</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_add_account_label">Add another account</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_description_label">Account name</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_name_label">Your name</string>
+    <!-- On Settings screen, section heading -->
     <string name="account_settings_notifications">Notification settings</string>
+    <!-- On Settings screen, setting check box label -->
     <string name="account_settings_vibrate_enable">Vibrate</string>
+    <!-- On Settings screen, setting summary text -->
     <string name="account_settings_vibrate_summary">Also vibrate when email arrives</string>
+    <!-- On Settings screen, setting option name -->
     <string name="account_settings_ringtone">Select ringtone</string>
+    <!-- On Settings screen, section heading -->
     <string name="account_settings_servers">Server settings</string>
-
+    <!-- Title of Remove account confirmation dialog box -->
     <string name="account_delete_dlg_title">Remove</string>
+    <!-- Message of Remove account confirmation dialog box -->
     <string name="account_delete_dlg_instructions_fmt">The account \"<xliff:g id="account">%s</xliff:g>\" will be removed from Email.</string>
 
-    <string name="provider_note_yahoo">Free Yahoo! Mail accounts only work over T-Mobile wireless networks. Yahoo! Mail Plus users should configure POP settings manually.</string>
+    <!-- Message that appears when user adds a Yahoo mail account. This alert has no title. -->
+    <string name="provider_note_yahoo">Mailbox access is not supported for some types of
+        Yahoo! mail accounts.  If you have trouble connecting, visit yahoo.com for more
+        information.</string>
+    <!-- Message that appears when user adds a Yahoo UK mail account. -->
+    <string name="provider_note_yahoo_uk">Before setting up this email account, please visit the
+        Yahoo! web site and enable POP3 email access for this account.</string>
+    <!-- Message that appears when adding a Windows Live Hotmail Plus account -->
     <string name="provider_note_live">Only some \"Plus\" accounts include POP access
         allowing this program to connect. If you are not able to sign in with
         your correct email address and password, you may not have a paid
         \"Plus\" account. Please launch the Web browser to gain access to
         these mail accounts.</string>
+    <!-- Message that appears when adding a T-Online account -->
+    <string name="provider_note_t_online">Before setting up this email account, please visit the T-Online Web site and create a password for POP3 email access.</string>
 </resources>
diff --git a/tests/Android.mk b/tests/Android.mk
new file mode 100644
index 0000000..c4e7fd4
--- /dev/null
+++ b/tests/Android.mk
@@ -0,0 +1,37 @@
+# Copyright 2008, The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_JAVA_LIBRARIES := android.test.runner
+
+# Include all test java files.
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+# Notice that we don't have to include the src files of Email because, by
+# running the tests using an instrumentation targeting Eamil, we
+# automatically get all of its classes loaded into our environment.
+
+LOCAL_PACKAGE_NAME := EmailTests
+
+LOCAL_INSTRUMENTATION_FOR := Email
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_PACKAGE)
+
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
new file mode 100644
index 0000000..4657baa
--- /dev/null
+++ b/tests/AndroidManifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.email.tests">
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->    
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    This declares that this app uses the instrumentation test runner targeting
+    the package of com.android.email.  To run the tests use the command:
+    "adb shell am instrument -w com.android.email.tests/android.test.InstrumentationTestRunner"
+    -->
+    <instrumentation android:name="android.test.InstrumentationTestRunner"
+                     android:targetPackage="com.android.email"
+                     android:label="Tests for Email."/>
+
+</manifest>