Merge "b/2528229 Add vCard import support to Gmail."
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
new file mode 100644
index 0000000..2b6ba9a
--- /dev/null
+++ b/res/values-en-rGB/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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">
+
+    <!-- Field title for the given name of a contact -->
+    <string name="name_given">First name</string>
+    <!-- Field title for the family name of a contact -->
+    <string name="name_family">Surname</string>
+
+    <!-- An allowable value for the "sort list by" contact display option  -->
+    <string name="display_options_sort_by_given_name">First name</string>
+
+    <!-- An allowable value for the "sort list by" contact display option  -->
+    <string name="display_options_sort_by_family_name">Surname</string>
+
+    <!-- An allowable value for the "view names as" contact display option  -->
+    <string name="display_options_view_given_name_first">First name first</string>
+
+    <!-- An allowable value for the "view names as" contact display option  -->
+    <string name="display_options_view_family_name_first">Surname name first</string>
+</resources>
diff --git a/res/values-en-rUS/strings.xml b/res/values-en-rUS/strings.xml
new file mode 100644
index 0000000..e1d4184
--- /dev/null
+++ b/res/values-en-rUS/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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">
+
+    <!-- Field title for the given name of a contact -->
+    <string name="name_given">First name</string>
+    <!-- Field title for the family name of a contact -->
+    <string name="name_family">Last name</string>
+
+    <!-- An allowable value for the "sort list by" contact display option  -->
+    <string name="display_options_sort_by_given_name">First name</string>
+
+    <!-- An allowable value for the "sort list by" contact display option  -->
+    <string name="display_options_sort_by_family_name">Last name</string>
+
+    <!-- An allowable value for the "view names as" contact display option  -->
+    <string name="display_options_view_given_name_first">First name first</string>
+
+    <!-- An allowable value for the "view names as" contact display option  -->
+    <string name="display_options_view_family_name_first">Last name first</string>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6a73500..a2193c2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -414,6 +414,12 @@
     <!-- Dialog title displayed when loading a phone number from the SIM card for speed dial -->
     <string name="simContacts_title">SIM card contacts</string>
 
+    <!-- Displayed full screen when the user want to create a shortcut, but there is no contacts, and contact syncing is enabled -->
+    <string name="noContactsHelpTextWithSyncForCreateShortcut">"You don't have any contacts to display. (If you just added an account, it can take a few minutes to sync contacts.)"</string>
+
+    <!-- Displayed full screen when the user want to create a shortcut, but there is no contacts -->
+    <string name="noContactsHelpTextForCreateShortcut">"You don't have any contacts to display."</string>
+
     <!-- Displayed full screen when the user has no contacts and they are displaying the My Contacts group, and contact syncing is disabled -->
     <string name="noContactsHelpText">"You don't have any contacts to display.\n\nTo add contacts, press <font fgcolor="#ffffffff"><b>Menu</b></font> and touch:\n
         \n<li><font fgcolor="#ffffffff"><b>Accounts</b></font> to add or configure an account with contacts you can sync to the phone\n</li>
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index 3228692..14f54c9 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -208,7 +208,8 @@
                                     Contacts.CONTENT_URI, personId);
                             callText = getString(R.string.recentCalls_callNumber,
                                     phonesCursor.getString(COLUMN_INDEX_NAME));
-                            mNumber = phonesCursor.getString(COLUMN_INDEX_NUMBER);
+                            mNumber = PhoneNumberUtils.formatNumber(
+                                    phonesCursor.getString(COLUMN_INDEX_NUMBER));
                             callLabel = Phone.getDisplayLabel(this,
                                     phonesCursor.getInt(COLUMN_INDEX_TYPE),
                                     phonesCursor.getString(COLUMN_INDEX_LABEL)).toString();
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index d0d6cb2..db93e07 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -962,16 +962,22 @@
         } else {
             boolean hasSim = ((TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE))
                     .hasIccCard();
-
-            if (hasSim) {
-                if (mSyncEnabled) {
+            boolean createShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction());
+            if (mSyncEnabled) {
+                if (createShortcut) {
+                    // Help text is the same no matter whether there is SIM or not.
+                    empty.setText(getText(R.string.noContactsHelpTextWithSyncForCreateShortcut));
+                } else if (hasSim) {
                     empty.setText(getText(R.string.noContactsHelpTextWithSync));
                 } else {
-                    empty.setText(getText(R.string.noContactsHelpText));
+                    empty.setText(getText(R.string.noContactsNoSimHelpTextWithSync));
                 }
             } else {
-                if (mSyncEnabled) {
-                    empty.setText(getText(R.string.noContactsNoSimHelpTextWithSync));
+                if (createShortcut) {
+                    // Help text is the same no matter whether there is SIM or not.
+                    empty.setText(getText(R.string.noContactsHelpTextForCreateShortcut));
+                } else if (hasSim) {
+                    empty.setText(getText(R.string.noContactsHelpText));
                 } else {
                     empty.setText(getText(R.string.noContactsNoSimHelpText));
                 }
@@ -1466,7 +1472,7 @@
             for (;!cursor.isAfterLast(); cursor.moveToNext()) {
                 if (index != 0)
                     uriListBuilder.append(':');
-                uriListBuilder.append(Uri.encode(cursor.getString(0)));
+                uriListBuilder.append(cursor.getString(0));
                 index++;
             }
             Uri uri = Uri.withAppendedPath(