Merge "Update assets. Rename some of them for consistency"
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(