Merge "Import revised translations."
diff --git a/res/anim/dummy_animation.xml b/res/anim/dummy_animation.xml
deleted file mode 100644
index 5b42f24..0000000
--- a/res/anim/dummy_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<translate
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:fromXDelta="0"
-    android:toXDelta="0"
-    android:duration="@android:integer/config_shortAnimTime" />
diff --git a/res/anim/search_bar_enter.xml b/res/anim/search_bar_enter.xml
deleted file mode 100644
index 19bbbba..0000000
--- a/res/anim/search_bar_enter.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-    android:interpolator="@android:anim/decelerate_interpolator">
-	<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
-            android:duration="@android:integer/config_shortAnimTime" />
-</set>
diff --git a/res/anim/search_bar_exit.xml b/res/anim/search_bar_exit.xml
deleted file mode 100644
index c0eff2b..0000000
--- a/res/anim/search_bar_exit.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-    android:interpolator="@android:anim/accelerate_interpolator">
-	<translate android:fromYDelta="0" android:toYDelta="-32"
-            android:duration="@android:integer/config_shortAnimTime"/>
-	<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
-            android:duration="@android:integer/config_shortAnimTime" />
-</set>
diff --git a/res/drawable-hdpi/ic_ab_show_all_holo_dark.png b/res/drawable-hdpi/ic_ab_show_all_holo_dark.png
deleted file mode 100644
index 1893425..0000000
--- a/res/drawable-hdpi/ic_ab_show_all_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_ab_show_group_holo_dark.png b/res/drawable-hdpi/ic_ab_show_group_holo_dark.png
deleted file mode 100644
index 5a28614..0000000
--- a/res/drawable-hdpi/ic_ab_show_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_add_contact_holo_dark.png b/res/drawable-hdpi/ic_add_contact_holo_dark.png
index 3583003..88ff33b 100644
--- a/res/drawable-hdpi/ic_add_contact_holo_dark.png
+++ b/res/drawable-hdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_add_contact_holo_light.png b/res/drawable-hdpi/ic_add_contact_holo_light.png
index c0c201e..5229623 100644
--- a/res/drawable-hdpi/ic_add_contact_holo_light.png
+++ b/res/drawable-hdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_add_group_holo_dark.png b/res/drawable-hdpi/ic_add_group_holo_dark.png
new file mode 100644
index 0000000..6d46ccf
--- /dev/null
+++ b/res/drawable-hdpi/ic_add_group_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_contacts_holo_dark.png b/res/drawable-hdpi/ic_contacts_holo_dark.png
index a07b004..e5deb01 100644
--- a/res/drawable-hdpi/ic_contacts_holo_dark.png
+++ b/res/drawable-hdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_groups_holo_dark.png b/res/drawable-hdpi/ic_groups_holo_dark.png
new file mode 100644
index 0000000..32f419c
--- /dev/null
+++ b/res/drawable-hdpi/ic_groups_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_contact_holo_dark.png b/res/drawable-hdpi/ic_menu_add_contact_holo_dark.png
deleted file mode 100644
index d8d5c63..0000000
--- a/res/drawable-hdpi/ic_menu_add_contact_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_group_holo_dark.png b/res/drawable-hdpi/ic_menu_add_group_holo_dark.png
deleted file mode 100644
index 7edb297..0000000
--- a/res/drawable-hdpi/ic_menu_add_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_display_all.png b/res/drawable-hdpi/ic_menu_display_all.png
deleted file mode 100755
index 563083c..0000000
--- a/res/drawable-hdpi/ic_menu_display_all.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_display_selected.png b/res/drawable-hdpi/ic_menu_display_selected.png
deleted file mode 100644
index 76b2e22..0000000
--- a/res/drawable-hdpi/ic_menu_display_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_select.png b/res/drawable-hdpi/ic_menu_select.png
deleted file mode 100644
index c5bb503..0000000
--- a/res/drawable-hdpi/ic_menu_select.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_unselect.png b/res/drawable-hdpi/ic_menu_unselect.png
deleted file mode 100644
index 178f314..0000000
--- a/res/drawable-hdpi/ic_menu_unselect.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_play_disabled_holo_dark.png b/res/drawable-hdpi/ic_play_disabled_holo_dark.png
deleted file mode 100644
index f7e404b..0000000
--- a/res/drawable-hdpi/ic_play_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_ab_show_all_holo_dark.png b/res/drawable-mdpi/ic_ab_show_all_holo_dark.png
deleted file mode 100644
index eaef05b..0000000
--- a/res/drawable-mdpi/ic_ab_show_all_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_ab_show_group_holo_dark.png b/res/drawable-mdpi/ic_ab_show_group_holo_dark.png
deleted file mode 100644
index a461b70..0000000
--- a/res/drawable-mdpi/ic_ab_show_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_contact_holo_dark.png b/res/drawable-mdpi/ic_add_contact_holo_dark.png
index 8118e24..867f494 100644
--- a/res/drawable-mdpi/ic_add_contact_holo_dark.png
+++ b/res/drawable-mdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_contact_holo_light.png b/res/drawable-mdpi/ic_add_contact_holo_light.png
index 84ec510..06a43a2 100644
--- a/res/drawable-mdpi/ic_add_contact_holo_light.png
+++ b/res/drawable-mdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_group_holo_dark.png b/res/drawable-mdpi/ic_add_group_holo_dark.png
new file mode 100644
index 0000000..a676ab8
--- /dev/null
+++ b/res/drawable-mdpi/ic_add_group_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_contacts_holo_dark.png b/res/drawable-mdpi/ic_contacts_holo_dark.png
index c944456..d08b94a 100644
--- a/res/drawable-mdpi/ic_contacts_holo_dark.png
+++ b/res/drawable-mdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_groups_holo_dark.png b/res/drawable-mdpi/ic_groups_holo_dark.png
new file mode 100644
index 0000000..c3cf14a
--- /dev/null
+++ b/res/drawable-mdpi/ic_groups_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_contact_holo_dark.png b/res/drawable-mdpi/ic_menu_add_contact_holo_dark.png
deleted file mode 100644
index ae22598..0000000
--- a/res/drawable-mdpi/ic_menu_add_contact_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_group_holo_dark.png b/res/drawable-mdpi/ic_menu_add_group_holo_dark.png
deleted file mode 100644
index 29369e8..0000000
--- a/res/drawable-mdpi/ic_menu_add_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_display_all.png b/res/drawable-mdpi/ic_menu_display_all.png
deleted file mode 100644
index 61a9e35..0000000
--- a/res/drawable-mdpi/ic_menu_display_all.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_display_selected.png b/res/drawable-mdpi/ic_menu_display_selected.png
deleted file mode 100644
index b4ec7a8..0000000
--- a/res/drawable-mdpi/ic_menu_display_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_select.png b/res/drawable-mdpi/ic_menu_select.png
deleted file mode 100644
index 29e3d7e..0000000
--- a/res/drawable-mdpi/ic_menu_select.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_unselect.png b/res/drawable-mdpi/ic_menu_unselect.png
deleted file mode 100644
index 2b69bc8..0000000
--- a/res/drawable-mdpi/ic_menu_unselect.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_play_disabled_holo_dark.png b/res/drawable-mdpi/ic_play_disabled_holo_dark.png
deleted file mode 100644
index 584f448..0000000
--- a/res/drawable-mdpi/ic_play_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_show_all_holo_dark.png b/res/drawable-xhdpi/ic_ab_show_all_holo_dark.png
deleted file mode 100644
index bc739b1..0000000
--- a/res/drawable-xhdpi/ic_ab_show_all_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_show_group_holo_dark.png b/res/drawable-xhdpi/ic_ab_show_group_holo_dark.png
deleted file mode 100644
index fb3338e..0000000
--- a/res/drawable-xhdpi/ic_ab_show_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_contact_holo_dark.png b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
index 16454ea..7298882 100644
--- a/res/drawable-xhdpi/ic_add_contact_holo_dark.png
+++ b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_contact_holo_light.png b/res/drawable-xhdpi/ic_add_contact_holo_light.png
index 578df30..4fa8b94 100644
--- a/res/drawable-xhdpi/ic_add_contact_holo_light.png
+++ b/res/drawable-xhdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_group_holo_dark.png b/res/drawable-xhdpi/ic_add_group_holo_dark.png
new file mode 100644
index 0000000..85924ab
--- /dev/null
+++ b/res/drawable-xhdpi/ic_add_group_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_contacts_holo_dark.png b/res/drawable-xhdpi/ic_contacts_holo_dark.png
index fe270bf..dc4c390 100644
--- a/res/drawable-xhdpi/ic_contacts_holo_dark.png
+++ b/res/drawable-xhdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_groups_holo_dark.png b/res/drawable-xhdpi/ic_groups_holo_dark.png
new file mode 100644
index 0000000..d7348fb
--- /dev/null
+++ b/res/drawable-xhdpi/ic_groups_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_contact_holo_dark.png b/res/drawable-xhdpi/ic_menu_add_contact_holo_dark.png
deleted file mode 100644
index 6b0bff7..0000000
--- a/res/drawable-xhdpi/ic_menu_add_contact_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_group_holo_dark.png b/res/drawable-xhdpi/ic_menu_add_group_holo_dark.png
deleted file mode 100644
index 75ba003..0000000
--- a/res/drawable-xhdpi/ic_menu_add_group_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_display_all.png b/res/drawable-xhdpi/ic_menu_display_all.png
deleted file mode 100644
index d30bcc5..0000000
--- a/res/drawable-xhdpi/ic_menu_display_all.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_display_selected.png b/res/drawable-xhdpi/ic_menu_display_selected.png
deleted file mode 100644
index 3a34c94..0000000
--- a/res/drawable-xhdpi/ic_menu_display_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_select.png b/res/drawable-xhdpi/ic_menu_select.png
deleted file mode 100644
index 8e4b5e1..0000000
--- a/res/drawable-xhdpi/ic_menu_select.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_unselect.png b/res/drawable-xhdpi/ic_menu_unselect.png
deleted file mode 100644
index 748523a..0000000
--- a/res/drawable-xhdpi/ic_menu_unselect.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_play_disabled_holo_dark.png b/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
deleted file mode 100644
index 7fbcb37..0000000
--- a/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_play.xml b/res/drawable/ic_play.xml
deleted file mode 100644
index 68e656f..0000000
--- a/res/drawable/ic_play.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_enabled="false" android:drawable="@drawable/ic_play_disabled_holo_dark" />
-    <item android:drawable="@drawable/ic_play_holo_dark" />
-</selector>
diff --git a/res/drawable/ic_tab_all.xml b/res/drawable/ic_tab_all.xml
index 25a3948..97c4443 100644
--- a/res/drawable/ic_tab_all.xml
+++ b/res/drawable/ic_tab_all.xml
@@ -15,6 +15,6 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@drawable/ic_ab_show_all_holo_dark" />
+    <item android:drawable="@drawable/ic_contacts_holo_dark" />
 </selector>
 
diff --git a/res/drawable/ic_tab_groups.xml b/res/drawable/ic_tab_groups.xml
index c562fa3..c50c1f0 100644
--- a/res/drawable/ic_tab_groups.xml
+++ b/res/drawable/ic_tab_groups.xml
@@ -15,6 +15,6 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@drawable/ic_ab_show_group_holo_dark" />
+    <item android:drawable="@drawable/ic_groups_holo_dark" />
 </selector>
 
diff --git a/res/layout/add_group_menu_item.xml b/res/layout/add_group_menu_item.xml
index 80c7e32..1b8bb26 100644
--- a/res/layout/add_group_menu_item.xml
+++ b/res/layout/add_group_menu_item.xml
@@ -26,6 +26,6 @@
     android:layout_height="wrap_content"
     android:layout_gravity="center_vertical"
     android:layout_marginRight="8dip"
-    android:src="@drawable/ic_menu_add_group_holo_dark"
+    android:src="@drawable/ic_add_group_holo_dark"
     android:description="@string/menu_new_group_action_bar"
-    style="?android:attr/actionButtonStyle" />
\ No newline at end of file
+    style="?android:attr/actionButtonStyle" />
diff --git a/res/layout/edit_divider.xml b/res/layout/edit_divider.xml
deleted file mode 100644
index 786bfca..0000000
--- a/res/layout/edit_divider.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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.
--->
-
-<View xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="1dip"
-    android:background="?android:attr/listDivider"
-    />
diff --git a/res/menu-sw580dp-w720dp/actions.xml b/res/menu-sw580dp-w720dp/actions.xml
index 2d21676..8735d89 100644
--- a/res/menu-sw580dp-w720dp/actions.xml
+++ b/res/menu-sw580dp-w720dp/actions.xml
@@ -22,13 +22,13 @@
 
     <item
         android:id="@+id/menu_add_contact"
-        android:icon="@drawable/ic_menu_add_contact_holo_dark"
+        android:icon="@drawable/ic_add_contact_holo_dark"
         android:title="@string/menu_new_contact_action_bar"
         android:showAsAction="always" />
 
     <item
         android:id="@+id/menu_custom_add_group"
-        android:icon="@drawable/ic_menu_add_group_holo_dark"
+        android:icon="@drawable/ic_add_group_holo_dark"
         android:title="@string/menu_new_group_action_bar"
         android:showAsAction="always" />
 
diff --git a/res/menu-sw580dp/actions.xml b/res/menu-sw580dp/actions.xml
index 08fea42..35a9c0a 100644
--- a/res/menu-sw580dp/actions.xml
+++ b/res/menu-sw580dp/actions.xml
@@ -22,12 +22,12 @@
 
     <item
         android:id="@+id/menu_add_contact"
-        android:icon="@drawable/ic_menu_add_contact_holo_dark"
+        android:icon="@drawable/ic_add_contact_holo_dark"
         android:title="@string/menu_new_contact_action_bar" />
 
     <item
         android:id="@+id/menu_add_group"
-        android:icon="@drawable/ic_menu_add_group_holo_dark"
+        android:icon="@drawable/ic_add_group_holo_dark"
         android:title="@string/menu_new_group_action_bar" />
 
     <!-- Added orderInCategory to keep the following buttons at the end of the menu
diff --git a/res/menu/actions.xml b/res/menu/actions.xml
index 8288f9d..9067a46 100644
--- a/res/menu/actions.xml
+++ b/res/menu/actions.xml
@@ -22,13 +22,13 @@
 
     <item
         android:id="@+id/menu_add_contact"
-        android:icon="@drawable/ic_menu_add_contact_holo_dark"
+        android:icon="@drawable/ic_add_contact_holo_dark"
         android:title="@string/menu_new_contact_action_bar"
         android:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/menu_add_group"
-        android:icon="@drawable/ic_menu_add_group_holo_dark"
+        android:icon="@drawable/ic_add_group_holo_dark"
         android:title="@string/menu_new_group_action_bar"
         android:showAsAction="ifRoom" />
 
diff --git a/res/mipmap-hdpi/ic_launcher_contacts.png b/res/mipmap-hdpi/ic_launcher_contacts.png
index d730319..5ebe2e0 100644
--- a/res/mipmap-hdpi/ic_launcher_contacts.png
+++ b/res/mipmap-hdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_phone.png b/res/mipmap-hdpi/ic_launcher_phone.png
index 0943ce5..e56c507 100644
--- a/res/mipmap-hdpi/ic_launcher_phone.png
+++ b/res/mipmap-hdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_phone.png b/res/mipmap-mdpi/ic_launcher_phone.png
index 724f94a..1f40fd0 100644
--- a/res/mipmap-mdpi/ic_launcher_phone.png
+++ b/res/mipmap-mdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_phone.png b/res/mipmap-xhdpi/ic_launcher_phone.png
index 6a454da..e23a58c 100644
--- a/res/mipmap-xhdpi/ic_launcher_phone.png
+++ b/res/mipmap-xhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/src/com/android/contacts/SpecialCharSequenceMgr.java b/src/com/android/contacts/SpecialCharSequenceMgr.java
index 9f9f40d..b5deab8 100644
--- a/src/com/android/contacts/SpecialCharSequenceMgr.java
+++ b/src/com/android/contacts/SpecialCharSequenceMgr.java
@@ -42,6 +42,10 @@
  * Helper class to listen for some magic character sequences
  * that are handled specially by the dialer.
  *
+ * Note the Phone app also handles these sequences too (in a couple of
+ * relativly obscure places in the UI), so there's a separate version of
+ * this class under apps/Phone.
+ *
  * TODO: there's lots of duplicated code between this class and the
  * corresponding class under apps/Phone.  Let's figure out a way to
  * unify these two classes (in the framework? in a common shared library?)
@@ -198,6 +202,12 @@
         return false;
     }
 
+    // TODO: Combine showIMEIPanel() and showMEIDPanel() into a single
+    // generic "showDeviceIdPanel()" method, like in the apps/Phone
+    // version of SpecialCharSequenceMgr.java.  (This will require moving
+    // the phone app's TelephonyCapabilities.getDeviceIdLabel() method
+    // into the telephony framework, though.)
+
     static void showIMEIPanel(Context context, boolean useSystemWindow) {
         String imeiStr = ((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE))
                 .getDeviceId();
@@ -208,7 +218,6 @@
                 .setPositiveButton(android.R.string.ok, null)
                 .setCancelable(false)
                 .show();
-        alert.getWindow().setType(WindowManager.LayoutParams.TYPE_PRIORITY_PHONE);
     }
 
     static void showMEIDPanel(Context context, boolean useSystemWindow) {
@@ -221,7 +230,6 @@
                 .setPositiveButton(android.R.string.ok, null)
                 .setCancelable(false)
                 .show();
-        alert.getWindow().setType(WindowManager.LayoutParams.TYPE_PRIORITY_PHONE);
     }
 
     /*******
diff --git a/src/com/android/contacts/calllog/CallLogFragment.java b/src/com/android/contacts/calllog/CallLogFragment.java
index 6ccf7bb..2d93a98 100644
--- a/src/com/android/contacts/calllog/CallLogFragment.java
+++ b/src/com/android/contacts/calllog/CallLogFragment.java
@@ -98,6 +98,8 @@
         }
         mAdapter.setLoading(false);
         mAdapter.changeCursor(cursor);
+        // This will update the state of the "Clear call log" menu item.
+        getActivity().invalidateOptionsMenu();
         if (mScrollToTop) {
             final ListView listView = getListView();
             if (listView.getFirstVisiblePosition() > 5) {
@@ -252,6 +254,7 @@
     @Override
     public void onPrepareOptionsMenu(Menu menu) {
         if (mShowOptionsMenu) {
+            menu.findItem(R.id.delete_all).setEnabled(mAdapter != null && !mAdapter.isEmpty());
             menu.findItem(R.id.show_voicemails_only).setVisible(
                     mVoicemailSourcesAvailable && !mShowingVoicemailOnly);
             menu.findItem(R.id.show_all_calls).setVisible(
diff --git a/src/com/android/contacts/dialpad/DialpadFragment.java b/src/com/android/contacts/dialpad/DialpadFragment.java
index 1ff16d2..45cb03b 100644
--- a/src/com/android/contacts/dialpad/DialpadFragment.java
+++ b/src/com/android/contacts/dialpad/DialpadFragment.java
@@ -294,6 +294,10 @@
         return fragmentView;
     }
 
+    private boolean isLayoutReady() {
+        return mDigits != null;
+    }
+
     public EditText getDigitsWidget() {
         return mDigits;
     }
@@ -393,6 +397,16 @@
      * the screen to enter "Add Call" mode, this method will show correct UI for the mode.
      */
     public void configureScreenFromIntent(Intent intent) {
+        if (!isLayoutReady()) {
+            // This happens typically when parent's Activity#onNewIntent() is called while
+            // Fragment#onCreateView() isn't called yet, and thus we cannot configure Views at
+            // this point. onViewCreate() should call this method after preparing layouts, so
+            // just ignore this call now.
+            Log.i(TAG,
+                    "Screen configuration is requested before onCreateView() is called. Ignored");
+            return;
+        }
+
         boolean needToShowDialpadChooser = false;
 
         final boolean isAddCallMode = isAddCallMode(intent);
@@ -535,7 +549,7 @@
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
         super.onCreateOptionsMenu(menu, inflater);
         if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&
-                mDialpadChooser != null && mDigits != null) {
+                isLayoutReady() && mDialpadChooser != null) {
             inflater.inflate(R.menu.dialpad_options, menu);
         }
     }
@@ -544,7 +558,7 @@
     public void onPrepareOptionsMenu(Menu menu) {
         // Hardware menu key should be available and Views should already be ready.
         if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&
-                mDialpadChooser != null && mDigits != null) {
+                isLayoutReady() && mDialpadChooser != null) {
              setupMenuItems(menu);
         }
     }
@@ -896,7 +910,7 @@
      */
     private void showDialpadChooser(boolean enabled) {
         // Check if onCreateView() is already called by checking one of View objects.
-        if (mDigits == null) {
+        if (!isLayoutReady()) {
             return;
         }
 
diff --git a/src/com/android/contacts/list/CustomContactListFilterActivity.java b/src/com/android/contacts/list/CustomContactListFilterActivity.java
index bbfbf32..638a28e 100644
--- a/src/com/android/contacts/list/CustomContactListFilterActivity.java
+++ b/src/com/android/contacts/list/CustomContactListFilterActivity.java
@@ -160,7 +160,8 @@
                     }
                     // Create single entry handling ungrouped status
                     accountDisplay.mUngrouped =
-                        GroupDelta.fromSettings(resolver, account.name, account.type, hasGroups);
+                        GroupDelta.fromSettings(resolver, account.name, account.type,
+                                account.dataSet, hasGroups);
                     accountDisplay.addGroup(accountDisplay.mUngrouped);
                 } finally {
                     iterator.close();
@@ -246,14 +247,18 @@
 
         /**
          * Build {@link GroupDelta} from the {@link Settings} row for the given
-         * {@link Settings#ACCOUNT_NAME} and {@link Settings#ACCOUNT_TYPE}.
+         * {@link Settings#ACCOUNT_NAME}, {@link Settings#ACCOUNT_TYPE}, and
+         * {@link Settings#DATA_SET}.
          */
         public static GroupDelta fromSettings(ContentResolver resolver, String accountName,
-                String accountType, boolean accountHasGroups) {
-            final Uri settingsUri = Settings.CONTENT_URI.buildUpon()
+                String accountType, String dataSet, boolean accountHasGroups) {
+            final Uri.Builder settingsUri = Settings.CONTENT_URI.buildUpon()
                     .appendQueryParameter(Settings.ACCOUNT_NAME, accountName)
-                    .appendQueryParameter(Settings.ACCOUNT_TYPE, accountType).build();
-            final Cursor cursor = resolver.query(settingsUri, new String[] {
+                    .appendQueryParameter(Settings.ACCOUNT_TYPE, accountType);
+            if (dataSet != null) {
+                settingsUri.appendQueryParameter(Settings.DATA_SET, dataSet);
+            }
+            final Cursor cursor = resolver.query(settingsUri.build(), new String[] {
                     Settings.SHOULD_SYNC, Settings.UNGROUPED_VISIBLE
             }, null, null, null);
 
@@ -261,6 +266,7 @@
                 final ContentValues values = new ContentValues();
                 values.put(Settings.ACCOUNT_NAME, accountName);
                 values.put(Settings.ACCOUNT_TYPE, accountType);
+                values.put(Settings.DATA_SET, dataSet);
 
                 if (cursor != null && cursor.moveToFirst()) {
                     // Read existing values when present