am 85d992d7: Merge "Add padding to bottom of listviews" into lmp-preview-dev

* commit '85d992d7b92ad68714408aa1b307cc63064d9751':
  Add padding to bottom of listviews
diff --git a/res/drawable-hdpi/ic_add_person_dk.png b/res/drawable-hdpi/ic_add_person_dk.png
deleted file mode 100644
index 7096ed2..0000000
--- a/res/drawable-hdpi/ic_add_person_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_phone_dk.png b/res/drawable-hdpi/ic_phone_dk.png
deleted file mode 100644
index 984d6fa..0000000
--- a/res/drawable-hdpi/ic_phone_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_results_add_contact.png b/res/drawable-hdpi/ic_results_add_contact.png
new file mode 100644
index 0000000..472b281
--- /dev/null
+++ b/res/drawable-hdpi/ic_results_add_contact.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_results_phone.png b/res/drawable-hdpi/ic_results_phone.png
new file mode 100644
index 0000000..3a1a7a7
--- /dev/null
+++ b/res/drawable-hdpi/ic_results_phone.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_avatar_bg.png b/res/drawable-hdpi/list_item_avatar_bg.png
deleted file mode 100644
index 66e5f3e..0000000
--- a/res/drawable-hdpi/list_item_avatar_bg.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_person_dk.png b/res/drawable-mdpi/ic_add_person_dk.png
deleted file mode 100644
index 0e0aed0..0000000
--- a/res/drawable-mdpi/ic_add_person_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_phone_dk.png b/res/drawable-mdpi/ic_phone_dk.png
deleted file mode 100644
index c55571a..0000000
--- a/res/drawable-mdpi/ic_phone_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_results_add_contact.png b/res/drawable-mdpi/ic_results_add_contact.png
new file mode 100644
index 0000000..d4d4759
--- /dev/null
+++ b/res/drawable-mdpi/ic_results_add_contact.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_results_phone.png b/res/drawable-mdpi/ic_results_phone.png
new file mode 100644
index 0000000..74ccf14
--- /dev/null
+++ b/res/drawable-mdpi/ic_results_phone.png
Binary files differ
diff --git a/res/drawable-mdpi/list_item_avatar_bg.png b/res/drawable-mdpi/list_item_avatar_bg.png
deleted file mode 100644
index 640eb3e..0000000
--- a/res/drawable-mdpi/list_item_avatar_bg.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_person_dk.png b/res/drawable-xhdpi/ic_add_person_dk.png
deleted file mode 100644
index 5211f5c..0000000
--- a/res/drawable-xhdpi/ic_add_person_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_phone_dk.png b/res/drawable-xhdpi/ic_phone_dk.png
deleted file mode 100644
index 74a7032..0000000
--- a/res/drawable-xhdpi/ic_phone_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_results_add_contact.png b/res/drawable-xhdpi/ic_results_add_contact.png
new file mode 100644
index 0000000..6be67e8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_results_add_contact.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_results_phone.png b/res/drawable-xhdpi/ic_results_phone.png
new file mode 100644
index 0000000..0e24fa4
--- /dev/null
+++ b/res/drawable-xhdpi/ic_results_phone.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_item_avatar_bg.png b/res/drawable-xhdpi/list_item_avatar_bg.png
deleted file mode 100644
index cac7fbd..0000000
--- a/res/drawable-xhdpi/list_item_avatar_bg.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_add_person_dk.png b/res/drawable-xxhdpi/ic_add_person_dk.png
deleted file mode 100644
index 54ca1f0..0000000
--- a/res/drawable-xxhdpi/ic_add_person_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_phone_dk.png b/res/drawable-xxhdpi/ic_phone_dk.png
deleted file mode 100644
index de9387d..0000000
--- a/res/drawable-xxhdpi/ic_phone_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_results_add_contact.png b/res/drawable-xxhdpi/ic_results_add_contact.png
new file mode 100644
index 0000000..3ba9093
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_results_add_contact.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_results_phone.png b/res/drawable-xxhdpi/ic_results_phone.png
new file mode 100644
index 0000000..9594619
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_results_phone.png
Binary files differ
diff --git a/res/drawable-xxhdpi/list_item_avatar_bg.png b/res/drawable-xxhdpi/list_item_avatar_bg.png
deleted file mode 100644
index fcfe2da..0000000
--- a/res/drawable-xxhdpi/list_item_avatar_bg.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_search_add_contact.xml b/res/drawable/ic_search_add_contact.xml
new file mode 100644
index 0000000..2ec75b7
--- /dev/null
+++ b/res/drawable/ic_search_add_contact.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2014 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.
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+    android:src="@drawable/ic_results_add_contact"
+    android:tint="@color/search_shortcut_icon_color" />
diff --git a/res/drawable/ic_search_phone.xml b/res/drawable/ic_search_phone.xml
new file mode 100644
index 0000000..ac90532
--- /dev/null
+++ b/res/drawable/ic_search_phone.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2014 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.
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+    android:src="@drawable/ic_results_phone"
+    android:tint="@color/search_shortcut_icon_color" />
diff --git a/res/drawable/search_shortcut_background.xml b/res/drawable/search_shortcut_background.xml
new file mode 100644
index 0000000..52b5e3f
--- /dev/null
+++ b/res/drawable/search_shortcut_background.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2014 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval" >
+    <size
+        android:height="@dimen/search_shortcut_radius"
+        android:width="@dimen/search_shortcut_radius" />
+    <solid android:color="@color/search_shortcut_background_color" />
+</shape>
\ No newline at end of file
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index bdf1477..9899424 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -28,7 +28,7 @@
         android:id="@+id/call_log_day_group_label"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/call_log_outer_margin"
+        android:layout_marginStart="@dimen/call_log_start_margin"
         android:layout_marginEnd="@dimen/call_log_outer_margin"
         android:textColor="?attr/call_log_secondary_text_color"
         android:textSize="@dimen/call_log_secondary_text_size"
@@ -52,7 +52,7 @@
             android:background="@drawable/call_log_background"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingStart="@dimen/call_log_outer_margin"
+            android:paddingStart="@dimen/call_log_start_margin"
             android:paddingEnd="@dimen/call_log_outer_margin"
             android:paddingTop="@dimen/call_log_outer_margin"
             android:paddingBottom="@dimen/call_log_outer_margin"
@@ -75,7 +75,7 @@
                 android:layout_weight="1"
                 android:orientation="vertical"
                 android:gravity="center_vertical"
-                android:layout_marginStart="@dimen/call_log_inner_margin"
+                android:layout_marginStart="@dimen/call_log_start_margin"
                 >
                 <TextView
                     android:id="@+id/name"
diff --git a/res/layout/call_log_list_item_actions.xml b/res/layout/call_log_list_item_actions.xml
index 9ee9a0f..3a93575 100644
--- a/res/layout/call_log_list_item_actions.xml
+++ b/res/layout/call_log_list_item_actions.xml
@@ -24,7 +24,7 @@
         android:layout_width="match_parent"
         android:layout_height="@dimen/call_log_action_height"
         android:orientation="horizontal"
-        android:paddingLeft="@dimen/call_log_actions_left_padding"
+        android:paddingStart="@dimen/call_log_actions_left_padding"
         android:visibility="visible"
         android:importantForAccessibility="1"
         >
@@ -35,8 +35,8 @@
             android:gravity="center"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:paddingLeft="@dimen/call_log_action_horizontal_padding"
-            android:paddingRight="@dimen/call_log_action_horizontal_padding"
+            android:paddingStart="@dimen/call_log_action_horizontal_padding"
+            android:paddingEnd="@dimen/call_log_action_horizontal_padding"
             android:text="@string/call_log_action_call_back"
             android:textColor="@color/call_log_action_text"
             android:textSize="@dimen/call_log_secondary_text_size"
@@ -51,8 +51,8 @@
             android:gravity="center"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:paddingLeft="@dimen/call_log_action_horizontal_padding"
-            android:paddingRight="@dimen/call_log_action_horizontal_padding"
+            android:paddingStart="@dimen/call_log_action_horizontal_padding"
+            android:paddingEnd="@dimen/call_log_action_horizontal_padding"
             android:text="@string/call_log_action_voicemail"
             android:textColor="@color/call_log_action_text"
             android:textSize="@dimen/call_log_secondary_text_size"
@@ -67,8 +67,8 @@
             android:gravity="center"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:paddingLeft="@dimen/call_log_action_horizontal_padding"
-            android:paddingRight="@dimen/call_log_action_horizontal_padding"
+            android:paddingStart="@dimen/call_log_action_horizontal_padding"
+            android:paddingEnd="@dimen/call_log_action_horizontal_padding"
             android:text="@string/call_log_action_details"
             android:textColor="?attr/call_log_secondary_text_color"
             android:textSize="@dimen/call_log_secondary_text_size"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 5b708b6..e064144 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -47,6 +47,9 @@
     <!-- Background color of dialer list items (contacts, call log entries) -->
     <color name="background_dialer_list_items">#fbfbfb</color>
 
+    <color name="search_shortcut_background_color">#b6b6b6</color>
+    <color name="search_shortcut_icon_color">#f8f8f8</color>
+
     <!-- Dark variant of the action bar color. -->
     <color name="actionbar_background_color_dark">#008aa1</color>
 
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c7c4680..78d91c2 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -31,18 +31,12 @@
     <dimen name="call_log_icon_margin">4dip</dimen>
     <dimen name="call_log_inner_margin">8dip</dimen>
     <dimen name="call_log_outer_margin">8dp</dimen>
+    <dimen name="call_log_start_margin">16dp</dimen>
     <dimen name="call_log_indent_margin">24dip</dimen>
     <dimen name="call_log_list_item_height">56dip</dimen>
     <dimen name="call_log_list_contact_photo_size">40dip</dimen>
     <dimen name="call_detail_contact_name_margin">24dip</dimen>
     <dimen name="call_detail_button_spacing">2dip</dimen>
-    <!-- Defines the vertical margin for the vertical separator between
-         the main area of a call log entry and the secondary action button. -->
-    <dimen name="call_log_list_item_vertical_divider_margin">17dp</dimen>
-
-    <!-- Defines the width of the vertical separator between
-         the main area of a call log entry and the secondary action button. -->
-    <dimen name="call_log_list_item_vertical_divider_width">1dp</dimen>
 
     <!-- Match call_button_height to Phone's dimens/in_call_end_button_height -->
     <dimen name="call_button_height">74dp</dimen>
@@ -125,7 +119,7 @@
          to the right of the contact badge.  Adjust when any of the following change:
          call_log_action_horizontal_padding
          call_log_list_contact_photo_size  -->
-    <dimen name="call_log_actions_left_padding">48dp</dimen>
+    <dimen name="call_log_actions_left_padding">64dp</dimen>
     <!-- Text size for primary call log text -->
     <dimen name="call_log_primary_text_size">16sp</dimen>
     <!-- Text size for secondary call log text -->
@@ -136,4 +130,7 @@
     <dimen name="call_log_expanded_translation_z">4dp</dimen>
     <!-- Padding above call log day group headers. -->
     <dimen name="call_log_day_group_padding">16dp</dimen>
+
+    <!-- Size of icon for contacts number shortcuts -->
+    <dimen name="search_shortcut_radius">40dp</dimen>
 </resources>
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 12d5531..9906513 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -22,7 +22,6 @@
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.net.Uri;
-import android.os.AsyncTask;
 import android.os.Handler;
 import android.os.Message;
 import android.provider.CallLog.Calls;
@@ -35,7 +34,6 @@
 import android.view.ViewTreeObserver;
 import android.widget.ImageView;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import com.android.common.widget.GroupingListAdapter;
 import com.android.contacts.common.ContactPhotoManager;
@@ -45,8 +43,6 @@
 import com.android.dialer.PhoneCallDetails;
 import com.android.dialer.PhoneCallDetailsHelper;
 import com.android.dialer.R;
-import com.android.dialer.util.AsyncTaskExecutor;
-import com.android.dialer.util.AsyncTaskExecutors;
 import com.android.dialer.util.ExpirableCache;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -126,10 +122,10 @@
     private static final int CONTACT_INFO_CACHE_SIZE = 100;
 
     /** Localized string representing the word "Today". */
-    private static final CharSequence TODAY_LABEL = DateUtils.getTodayString();
+    private final CharSequence mTodayLabel = DateUtils.getTodayString();
 
     /** Localized string representing the word "Yesterday". */
-    private static final CharSequence YESTERDAY_LABEL = DateUtils.getYesterdayString();
+    private final CharSequence mYesterdayLabel = DateUtils.getYesterdayString();
 
     /** Constant used to indicate no row is expanded. */
     private static final long NONE_EXPANDED = -1;
@@ -139,9 +135,6 @@
     private final CallFetcher mCallFetcher;
     private ViewTreeObserver mViewTreeObserver = null;
 
-    /** Aynchronous task executor, lazy instantiated as needed. */
-    private AsyncTaskExecutor mAsyncTaskExecutor;
-
     /**
      * A cache of the contact details for the phone numbers in the call log.
      * <p>
@@ -1327,9 +1320,9 @@
      */
     private CharSequence getGroupDescription(int group) {
        if (group == CallLogGroupBuilder.DAY_GROUP_TODAY) {
-           return TODAY_LABEL;
+           return mTodayLabel;
        } else if (group == CallLogGroupBuilder.DAY_GROUP_YESTERDAY) {
-           return YESTERDAY_LABEL;
+           return mYesterdayLabel;
        } else if (group == CallLogGroupBuilder.DAY_GROUP_LAST_WEEK) {
            return mContext.getResources().getString(R.string.call_log_header_last_week);
        } else {
diff --git a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
index 533a134..abceda4 100644
--- a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
+++ b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
@@ -139,16 +139,16 @@
         switch (shortcutType) {
             case SHORTCUT_DIRECT_CALL:
                 text = resources.getString(R.string.search_shortcut_call_number, number);
-                drawableId = R.drawable.ic_phone_dk;
+                drawableId = R.drawable.ic_search_phone;
                 break;
             case SHORTCUT_ADD_NUMBER_TO_CONTACTS:
                 text = resources.getString(R.string.search_shortcut_add_to_contacts);
-                drawableId = R.drawable.ic_add_person_dk;
+                drawableId = R.drawable.ic_search_add_contact;
                 break;
             default:
                 throw new IllegalArgumentException("Invalid shortcut type");
         }
-        v.setDrawableResource(R.drawable.list_item_avatar_bg, drawableId);
+        v.setDrawableResource(R.drawable.search_shortcut_background, drawableId);
         v.setDisplayName(text);
         v.setPhotoPosition(super.getPhotoPosition());
     }