Merge "Make delete action only triggered by delete button."
diff --git a/res/drawable/ic_close_lt.xml b/res/drawable/ic_close_lt.xml
index 178b8a0..65760cb 100644
--- a/res/drawable/ic_close_lt.xml
+++ b/res/drawable/ic_close_lt.xml
@@ -15,6 +15,6 @@
   ~ limitations under the License
   -->
 <bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_close_dk"
+    android:src="@drawable/ic_close_black_24dp"
     android:autoMirrored="true"
     android:tint="@android:color/black" />
\ No newline at end of file
diff --git a/res/layout/contacts_drawer_activity.xml b/res/layout/contacts_drawer_activity.xml
index ad68e84..e560494 100644
--- a/res/layout/contacts_drawer_activity.xml
+++ b/res/layout/contacts_drawer_activity.xml
@@ -53,6 +53,7 @@
 
     <android.support.design.widget.NavigationView
         android:id="@+id/nav_view"
+        android:theme="@style/NavigationDrawerMenuItemTextAppearance"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
diff --git a/res/layout/people_navigation_item.xml b/res/layout/people_navigation_item.xml
deleted file mode 100644
index 60a7a49..0000000
--- a/res/layout/people_navigation_item.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-
-<!-- This is the text view layout that is shown in the spinner for the navigation drop down menu on
-     tablet devices.  The text appearance is governed via two styles:
-     PeopleNavigationDropDownHeaderTextAppearance - text appearance of the item in the header part
-         of navigation drop down list of the action bar.
-     PeopleNavigationDropDownTextAppearance - text appearance of the item in the drop down part of
-         the navigation drop down list of the action bar. -->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:paddingLeft="18dip"
-    android:paddingRight="18dip"
-    android:paddingStart="18dip"
-    android:paddingEnd="18dip"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
-/>
diff --git a/res/layout/selection_bar.xml b/res/layout/selection_bar.xml
index f91c2b8..c08e9da 100644
--- a/res/layout/selection_bar.xml
+++ b/res/layout/selection_bar.xml
@@ -24,7 +24,7 @@
         android:id="@+id/selection_close"
         android:layout_width="48dp"
         android:layout_height="48dp"
-        android:src="@drawable/ic_back_arrow"
+        android:src="@drawable/ic_close_black_24dp"
         android:background="?attr/selectableItemBackgroundBorderless"
         android:contentDescription="@string/action_menu_back_from_search"
         android:layout_gravity="center_vertical|start"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 246438d..4332a6b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -111,6 +111,8 @@
         <!-- Style for the tab bar text (for text on tabs) -->
         <item name="android:actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
         <item name="actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
+        <item name="android:actionButtonStyle">@style/ContactsActionButtonStyle</item>
+        <item name="actionButtonStyle">@style/ContactsActionButtonStyle</item>
         <!--  Drawable for the back button -->
         <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
         <item name="homeAsUpIndicator">@drawable/ic_back_arrow</item>
@@ -172,6 +174,11 @@
         <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
     </style>
 
+    <style name="ContactsActionButtonStyle" parent="Widget.AppCompat.ActionButton">
+        <item name="android:paddingStart">16dp</item>
+        <item name="android:paddingEnd">16dp</item>
+    </style>
+
     <style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
         <item name="spinBars">false</item>
         <item name="color">@android:color/white</item>
@@ -220,6 +227,7 @@
     <!-- Text in the action bar at the top of the screen -->
     <style name="ContactsActionBarTitleText"
            parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
+        <item name="android:textSize">20dp</item>
         <item name="android:textColor">@color/actionbar_text_color</item>
     </style>
 
@@ -307,28 +315,8 @@
         <item name="android:orientation">vertical</item>
     </style>
 
-    <style name="Theme.PhotoSelector" parent="@android:style/Theme.Holo.Light">
-        <item name="android:windowBackground">@android:color/transparent</item>
-        <item name="android:windowFrame">@null</item>
-        <item name="android:windowContentOverlay">@null</item>
-        <item name="android:windowAnimationStyle">@null</item>
-        <item name="android:backgroundDimEnabled">false</item>
-        <item name="android:windowIsTranslucent">true</item>
-        <item name="android:windowNoTitle">true</item>
-    </style>
-
     <style name="GroupMembershipSizeTextAppearance" parent="@android:style/TextAppearance.Small"/>
 
-    <style name="PeopleNavigationDropDownTextAppearance">
-        <item name="android:textColor">@color/primary_text_color</item>
-        <item name="android:textSize">18sp</item>
-    </style>
-
-    <style name="PeopleNavigationDropDownHeaderTextAppearance">
-        <item name="android:textColor">@color/primary_text_color</item>
-        <item name="android:textSize">18sp</item>
-    </style>
-
     <style name="ExpandingEntryCardStyle">
         <item name="android:elevation">@dimen/expanding_entry_card_elevation</item>
         <item name="android:background">@color/expanding_entry_card_background_color</item>
@@ -406,4 +394,8 @@
         <item name="android:textColor">#363636</item>
         <item name="android:fontFamily">sans-serif</item>
     </style>
+
+    <style name="NavigationDrawerMenuItemTextAppearance">
+        <item name="android:ellipsize">end</item>
+    </style>
 </resources>
diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index 466aa91..81c7252 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -108,10 +108,8 @@
         public void onDrawerStateChanged(int newState) {
             super.onDrawerStateChanged(newState);
             // Set transparent status bar when drawer starts to move.
-            if (CompatUtils.isLollipopCompatible() && newState != DrawerLayout.STATE_IDLE
-                    && getWindow().getStatusBarColor() == ContextCompat.getColor
-                    (ContactsDrawerActivity.this, R.color.primary_color_dark)) {
-                getWindow().setStatusBarColor(Color.TRANSPARENT);
+            if (newState != DrawerLayout.STATE_IDLE) {
+                makeStatusBarTransparent();
             }
             if (mRunnable != null && newState == DrawerLayout.STATE_IDLE) {
                 mRunnable.run();
@@ -199,6 +197,22 @@
         }
     }
 
+    @Override
+    protected void onResume() {
+        super.onResume();
+        if (mDrawer.isDrawerOpen(GravityCompat.START)) {
+            makeStatusBarTransparent();
+        }
+    }
+
+    private void makeStatusBarTransparent() {
+        if (CompatUtils.isLollipopCompatible()
+                && getWindow().getStatusBarColor() ==
+                        ContextCompat.getColor(this, R.color.primary_color_dark)) {
+            getWindow().setStatusBarColor(Color.TRANSPARENT);
+        }
+    }
+
     /**
      * Returns true if child class is DuplicatesActivity
      */
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index aad99d1..6134047 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -50,6 +50,7 @@
         setQuickContactEnabled(false);
         setSectionHeaderDisplayEnabled(true);
         setVisibleScrollbarEnabled(true);
+        setDisplayDirectoryHeader(false);
     }
 
     @Override