Merge "Show icons for call detail actions." into ub-contactsdialer-a-dev
diff --git a/res/drawable-hdpi/ic_block_18dp.png b/res/drawable-hdpi/ic_block_18dp.png
deleted file mode 100644
index acab511..0000000
--- a/res/drawable-hdpi/ic_block_18dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_block_18dp.png b/res/drawable-hdpi/ic_block_24dp.png
similarity index 100%
rename from res/drawable-xhdpi/ic_block_18dp.png
rename to res/drawable-hdpi/ic_block_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_block_18dp.png b/res/drawable-mdpi/ic_block_18dp.png
deleted file mode 100644
index 45b83fa..0000000
--- a/res/drawable-mdpi/ic_block_18dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_block_24dp.png b/res/drawable-mdpi/ic_block_24dp.png
new file mode 100644
index 0000000..ec1b33f
--- /dev/null
+++ b/res/drawable-mdpi/ic_block_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_block_24dp.png b/res/drawable-xhdpi/ic_block_24dp.png
new file mode 100644
index 0000000..7aba97b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_block_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_block_18dp.png b/res/drawable-xxhdpi/ic_block_18dp.png
deleted file mode 100644
index 1eee124..0000000
--- a/res/drawable-xxhdpi/ic_block_18dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_block_18dp.png b/res/drawable-xxhdpi/ic_block_24dp.png
similarity index 100%
rename from res/drawable-xxxhdpi/ic_block_18dp.png
rename to res/drawable-xxhdpi/ic_block_24dp.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_block_24dp.png b/res/drawable-xxxhdpi/ic_block_24dp.png
new file mode 100644
index 0000000..0378d1b
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_block_24dp.png
Binary files differ
diff --git a/res/drawable/blocked_contact.xml b/res/drawable/blocked_contact.xml
index 38c0fc9..2e73437 100644
--- a/res/drawable/blocked_contact.xml
+++ b/res/drawable/blocked_contact.xml
@@ -17,11 +17,17 @@
   -->
 
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
     <item>
         <shape android:shape="oval">
             <solid android:color="@color/blocked_contact_background" />
             <size android:width="24dp" android:height="24dp" />
         </shape>
     </item>
-    <item android:drawable="@drawable/ic_block_18dp" android:gravity="center" />
+
+    <item android:drawable="@drawable/ic_block_24dp"
+        android:width="18dp"
+        android:height="18dp"
+        android:gravity="center" />
+
 </layer-list>
diff --git a/res/drawable/ic_call_detail_block.xml b/res/drawable/ic_call_detail_block.xml
new file mode 100644
index 0000000..9ec8e03
--- /dev/null
+++ b/res/drawable/ic_call_detail_block.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2015 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_block_24dp"
+    android:tint="@color/call_detail_footer_icon_tint" />
diff --git a/res/drawable/ic_call_detail_content_copy.xml b/res/drawable/ic_call_detail_content_copy.xml
new file mode 100644
index 0000000..dd604df
--- /dev/null
+++ b/res/drawable/ic_call_detail_content_copy.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2015 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_content_copy_24dp"
+    android:tint="@color/call_detail_footer_icon_tint" />
diff --git a/res/drawable/ic_call_detail_edit.xml b/res/drawable/ic_call_detail_edit.xml
new file mode 100644
index 0000000..e5ad3e5
--- /dev/null
+++ b/res/drawable/ic_call_detail_edit.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2015 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_create_24dp"
+    android:tint="@color/call_detail_footer_icon_tint" />
diff --git a/res/drawable/ic_call_detail_report.xml b/res/drawable/ic_call_detail_report.xml
new file mode 100644
index 0000000..201ac4c
--- /dev/null
+++ b/res/drawable/ic_call_detail_report.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2015 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_report_24dp"
+    android:tint="@color/call_detail_footer_icon_tint" />
diff --git a/res/layout/call_detail_footer.xml b/res/layout/call_detail_footer.xml
index 7e56c02..048f803 100644
--- a/res/layout/call_detail_footer.xml
+++ b/res/layout/call_detail_footer.xml
@@ -23,59 +23,34 @@
         android:layout_height="@dimen/divider_line_thickness"
         android:background="@color/call_log_action_divider" />
 
-    <LinearLayout android:id="@+id/call_detail_action_block"
+    <TextView android:id="@+id/call_detail_action_block"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal"
+        android:text="@string/action_block_number"
+        android:drawableLeft="@drawable/ic_call_detail_block"
+        style="@style/CallDetailActionItemStyle" />
+
+    <TextView android:id="@+id/call_detail_action_copy"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/action_copy_number_text"
+        android:drawableLeft="@drawable/ic_call_detail_content_copy"
+        style="@style/CallDetailActionItemStyle" />
+
+    <TextView android:id="@+id/call_detail_action_edit_before_call"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/action_edit_number_before_call"
+        android:drawableLeft="@drawable/ic_call_detail_edit"
         android:visibility="gone"
-        style="@style/CallDetailActionItemStyle">
+        style="@style/CallDetailActionItemStyle" />
 
-        <TextView android:id="@+id/call_detail_action_block_text"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/action_block_number" />
-
-    </LinearLayout>
-
-    <LinearLayout android:id="@+id/call_detail_action_copy"
+    <TextView android:id="@+id/call_detail_action_report"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        style="@style/CallDetailActionItemStyle">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/action_copy_number_text" />
-
-    </LinearLayout>
-
-    <LinearLayout android:id="@+id/call_detail_action_edit_before_call"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
+        android:text="@string/action_report_number"
+        android:drawableLeft="@drawable/ic_call_detail_report"
         android:visibility="gone"
-        style="@style/CallDetailActionItemStyle">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/action_edit_number_before_call" />
-
-    </LinearLayout>
-
-    <LinearLayout android:id="@+id/call_detail_action_report"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:visibility="gone"
-        style="@style/CallDetailActionItemStyle">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/action_report_number" />
-
-    </LinearLayout>
+        style="@style/CallDetailActionItemStyle" />
 
 </LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a7044c7..d0f7ed0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -125,4 +125,8 @@
     <color name="onboarding_default_dialer_screen_background_color">#e06055</color>
     <color name="onboarding_permissions_screen_background_color">#689f38</color>
 
+    <!-- Grey 700 -->
+    <color name="call_detail_footer_text_color">#616161</color>
+    <color name="call_detail_footer_icon_tint">@color/call_detail_footer_text_color</color>
+
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 07891f4..d3c52a3 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,7 +16,7 @@
 -->
 <resources>
     <dimen name="button_horizontal_padding">16dp</dimen>
-    <dimen name="divider_line_thickness">2dp</dimen>
+    <dimen name="divider_line_thickness">1dp</dimen>
 
     <!--
           Drag to remove view (in dp because it is used in conjunction with a statically
@@ -48,8 +48,10 @@
     <dimen name="call_detail_header_top_margin">20dp</dimen>
     <dimen name="call_detail_header_bottom_margin">9dp</dimen>
     <dimen name="call_detail_elevation">0.5dp</dimen>
-    <dimen name="call_detail_action_item_padding_horizontal">36dp</dimen>
+    <dimen name="call_detail_action_item_padding_horizontal">28dp</dimen>
     <dimen name="call_detail_action_item_padding_vertical">16dp</dimen>
+    <dimen name="call_detail_action_item_drawable_padding">28dp</dimen>
+    <dimen name="call_detail_action_item_text_size">16sp</dimen>
     <dimen name="transcription_top_margin">18dp</dimen>
     <dimen name="transcription_bottom_margin">18dp</dimen>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 7c81e52..3d86442 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -149,10 +149,14 @@
     <style name="CallDetailActionItemStyle">
         <item name="android:foreground">?android:attr/selectableItemBackground</item>
         <item name="android:clickable">true</item>
+        <item name="android:drawablePadding">@dimen/call_detail_action_item_drawable_padding</item>
+        <item name="android:gravity">center_vertical</item>
         <item name="android:paddingStart">@dimen/call_detail_action_item_padding_horizontal</item>
         <item name="android:paddingEnd">@dimen/call_detail_action_item_padding_horizontal</item>
         <item name="android:paddingTop">@dimen/call_detail_action_item_padding_vertical</item>
         <item name="android:paddingBottom">@dimen/call_detail_action_item_padding_vertical</item>
+        <item name="android:textColor">@color/call_detail_footer_text_color</item>
+        <item name="android:textSize">@dimen/call_detail_action_item_text_size</item>
     </style>
 
     <style name="DialtactsActionBarStyle"
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java
index 73622bf..696168a 100644
--- a/src/com/android/dialer/CallDetailActivity.java
+++ b/src/com/android/dialer/CallDetailActivity.java
@@ -229,8 +229,7 @@
     private TextView mAccountLabel;
     private View mCallButton;
 
-    private View mBlockNumberActionItem;
-    private TextView mBlockNumberActionItemText;
+    private TextView mBlockNumberActionItem;
     private View mEditBeforeCallActionItem;
     private View mReportActionItem;
 
@@ -284,9 +283,8 @@
             }
         });
 
-        mBlockNumberActionItem = findViewById(R.id.call_detail_action_block);
+        mBlockNumberActionItem = (TextView) findViewById(R.id.call_detail_action_block);
         mBlockNumberActionItem.setOnClickListener(this);
-        mBlockNumberActionItemText = (TextView) findViewById(R.id.call_detail_action_block_text);
         mEditBeforeCallActionItem = findViewById(R.id.call_detail_action_edit_before_call);
         mEditBeforeCallActionItem.setOnClickListener(this);
         mReportActionItem = findViewById(R.id.call_detail_action_report);
@@ -443,9 +441,9 @@
             public void onCheckComplete(Integer id) {
                 mBlockedNumberId = id;
                 if (mBlockedNumberId == null) {
-                    mBlockNumberActionItemText.setText(R.string.action_block_number);
+                    mBlockNumberActionItem.setText(R.string.action_block_number);
                 } else {
-                    mBlockNumberActionItemText.setText(R.string.action_unblock_number);
+                    mBlockNumberActionItem.setText(R.string.action_unblock_number);
                 }
 
                 mBlockNumberActionItem.setVisibility(View.VISIBLE);
diff --git a/src/com/android/dialer/calllog/CallTypeIconsView.java b/src/com/android/dialer/calllog/CallTypeIconsView.java
index d2be380..cfd8f97 100644
--- a/src/com/android/dialer/calllog/CallTypeIconsView.java
+++ b/src/com/android/dialer/calllog/CallTypeIconsView.java
@@ -199,7 +199,7 @@
 
             voicemail = r.getDrawable(R.drawable.ic_call_voicemail_holo_dark);
 
-            blocked = getScaledBitmap(context, R.drawable.ic_block_18dp);
+            blocked = getScaledBitmap(context, R.drawable.ic_block_24dp);
             blocked.setColorFilter(r.getColor(R.color.blocked_call), PorterDuff.Mode.MULTIPLY);
 
             videoCall = getScaledBitmap(context, R.drawable.ic_videocam_24dp);