Merge "Empty ACTION_DIAL intent launches favorites" into lmp-preview-dev
diff --git a/res/drawable/action_button_background.xml b/res/drawable/action_button_background.xml
index fd5bc61..ea7434f 100644
--- a/res/drawable/action_button_background.xml
+++ b/res/drawable/action_button_background.xml
@@ -15,8 +15,7 @@
      limitations under the License.
 -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-                android:tint="?android:attr/colorControlHighlight"
-                android:pinned="true">
+    android:color="?android:attr/colorControlHighlight">
     <!-- Transparent background constrains the touch feedback ripple to the button, but also allows
          touch feedback ripples in the parent to show under the button. -->
     <item>
diff --git a/res/drawable/call_log_background.xml b/res/drawable/call_log_background.xml
index 4857fb5..1b3dbc9 100644
--- a/res/drawable/call_log_background.xml
+++ b/res/drawable/call_log_background.xml
@@ -15,5 +15,4 @@
      limitations under the License.
 -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:tint="?android:attr/colorControlHighlight"
-    android:pinned="false" />
\ No newline at end of file
+    android:color="?android:attr/colorControlHighlight" />
\ No newline at end of file
diff --git a/res/drawable/floating_action_button.xml b/res/drawable/floating_action_button.xml
index e4a9bb5..d518ddd 100644
--- a/res/drawable/floating_action_button.xml
+++ b/res/drawable/floating_action_button.xml
@@ -16,7 +16,6 @@
 -->
 
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:tint="@color/dialer_accent_color"
-    android:pinned="true">
+    android:color="@color/dialer_accent_color">
     <item android:drawable="@drawable/fab_teal_background" />
 </ripple>
diff --git a/res/drawable/recent_lists_footer_background.xml b/res/drawable/recent_lists_footer_background.xml
index 021174a..b5029af 100644
--- a/res/drawable/recent_lists_footer_background.xml
+++ b/res/drawable/recent_lists_footer_background.xml
@@ -16,8 +16,7 @@
   ~ limitations under the License
   -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:tint="?android:attr/colorControlHighlight"
-    android:pinned="false">
+    android:color="?android:attr/colorControlHighlight">
     <!-- Mask to constrain the ripple to the bounds of the view. -->
     <item android:id="@android:id/mask">
         <color android:color="@android:color/white" />
diff --git a/res/drawable/view_pager_tab_background.xml b/res/drawable/view_pager_tab_background.xml
index 53f891c..1ba6c57 100644
--- a/res/drawable/view_pager_tab_background.xml
+++ b/res/drawable/view_pager_tab_background.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License
   -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:tint="@color/tab_ripple_color">
+    android:color="@color/tab_ripple_color">
     <item android:id="@android:id/mask">
         <color android:color="@android:color/white" />
     </item>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 53292e1..3533abd 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -112,7 +112,7 @@
     <!-- Padding around the icon in the search box. -->
     <dimen name="search_box_icon_margin">4dp</dimen>
     <dimen name="search_box_search_icon_padding">2dp</dimen>
-    <dimen name="search_box_collapsed_text_margin_left">24dp</dimen>
+    <dimen name="search_box_collapsed_text_margin_left">22dp</dimen>
     <dimen name="search_box_expanded_text_margin_left">26dp</dimen>
     <!-- Size of the icon (voice search, close search) in the search box. -->
     <dimen name="search_box_icon_size">28dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 65b0f30..4042894 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -34,7 +34,7 @@
         <item name="section_header_background">@drawable/list_title_holo</item>
         <item name="list_section_header_height">32dip</item>
         <item name="list_item_padding_top">12dp</item>
-        <item name="list_item_padding_right">0dip</item>
+        <item name="list_item_padding_right">32dp</item>
         <item name="list_item_padding_bottom">12dp</item>
         <item name="list_item_padding_left">16dp</item>
         <item name="list_item_gap_between_image_and_text">8dip</item>
diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java
index 816869f..a796680 100644
--- a/src/com/android/dialer/list/AllContactsFragment.java
+++ b/src/com/android/dialer/list/AllContactsFragment.java
@@ -40,6 +40,7 @@
 
     public AllContactsFragment() {
         setQuickContactEnabled(false);
+        setAdjustSelectionBoundsEnabled(true);
         setPhotoLoaderEnabled(true);
         setSectionHeaderDisplayEnabled(true);
         setDarkTheme(false);
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index bdd2d6c..b50f94e 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -135,12 +135,12 @@
     private PanelSlideListener mPanelSlideListener = new PanelSlideListener() {
         @Override
         public void onPanelSlide(View panel, float slideOffset) {
-            // For every 1 percent that the panel is slid upwards, clip 3 percent from each edge
+            // For every 1 percent that the panel is slid upwards, clip 1.5 percent from each edge
             // of the shortcut card, to achieve the animated effect of the shortcut card
             // rapidly shrinking and disappearing from view when the panel is slid upwards.
             // slideOffset is 1 when the shortcut card is fully exposed, and 0 when completely
             // hidden.
-            float ratioCardHidden = (1 - slideOffset) * 3f;
+            float ratioCardHidden = (1 - slideOffset) * 1.5f;
             if (mShortcutCardsListView.getCount() > 0) {
                 SwipeableShortcutCard v =
                         (SwipeableShortcutCard) mShortcutCardsListView.getChildAt(0);
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java
index 9e2b8d0..3580a62 100644
--- a/src/com/android/dialer/list/SearchFragment.java
+++ b/src/com/android/dialer/list/SearchFragment.java
@@ -65,6 +65,7 @@
         super.onAttach(activity);
 
         setQuickContactEnabled(true);
+        setAdjustSelectionBoundsEnabled(false);
         setDarkTheme(false);
         setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(false /* opposite */));
         setUseCallableUri(true);
@@ -103,6 +104,7 @@
         final ListView listView = getListView();
 
         listView.setClipToPadding(false);
+        setVisibleScrollbarEnabled(false);
         listView.setOnScrollListener(new OnScrollListener() {
             @Override
             public void onScrollStateChanged(AbsListView view, int scrollState) {
diff --git a/src/com/android/dialer/list/ShortcutCardsAdapter.java b/src/com/android/dialer/list/ShortcutCardsAdapter.java
index 088535a..dd198ec 100644
--- a/src/com/android/dialer/list/ShortcutCardsAdapter.java
+++ b/src/com/android/dialer/list/ShortcutCardsAdapter.java
@@ -21,6 +21,7 @@
 import android.database.Cursor;
 import android.database.DataSetObserver;
 import android.graphics.Rect;
+import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewConfiguration;
@@ -252,6 +253,7 @@
                     (CallLogListItemView) view.findViewById(R.id.call_log_list_item);
             // Reset the internal call log item view if it is being recycled
             callLogItem.setTranslationX(0);
+            callLogItem.setTranslationY(0);
             callLogItem.setAlpha(1);
             callLogItem.setClipBounds(null);
             setChildrenOpacity(callLogItem, 1.0f);
@@ -344,12 +346,17 @@
                 int newTop = (int) (ratioHidden * height);
                 int newBottom = (height - newTop);
                 mClipRect.set(newLeft, newTop, newRight, newBottom);
+
+                // Since the pane will be overlapping with the action bar, apply a vertical offset
+                // to visually center the clipped card in the viewable area;
+                int verticalOffset = -newTop / 2;
+                viewToClip.setTranslationY(verticalOffset);
             }
             viewToClip.setClipBounds(mClipRect);
 
             // If the view has any children, fade them out of view.
             final ViewGroup viewGroup = (ViewGroup) viewToClip;
-            setChildrenOpacity(viewGroup, Math.max(0, 1 - 3 * ratioHidden));
+            setChildrenOpacity(viewGroup, Math.max(0, 1 - 4.5f * ratioHidden));
         }
 
         private void setChildrenOpacity(ViewGroup viewGroup, float alpha) {