summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-01-07 13:00:27 +0100
committerDanny Baumann <dannybaumann@web.de>2016-01-21 08:27:45 +0100
commita1739cf58ca6685c9d198ed0f3361c144d48c105 (patch)
treed4b4638a5e5f92f42d3e7059cf19cd743de4209c /res
parentbd62aa81d16fd5832afa0412b3f1204314dfa4a3 (diff)
downloadandroid_packages_apps_Dialer-a1739cf58ca6685c9d198ed0f3361c144d48c105.tar.gz
android_packages_apps_Dialer-a1739cf58ca6685c9d198ed0f3361c144d48c105.tar.bz2
android_packages_apps_Dialer-a1739cf58ca6685c9d198ed0f3361c144d48c105.zip
Add back call stats feature.
Change-Id: If6deee65dc30854f4454a8cdd28fdbf3d529da04
Diffstat (limited to 'res')
-rw-r--r--res/layout/call_log_spinner_item.xml34
-rw-r--r--res/layout/call_spinner.xml21
-rw-r--r--res/layout/call_stats_detail.xml109
-rw-r--r--res/layout/call_stats_detail_info.xml239
-rw-r--r--res/layout/call_stats_detail_line.xml45
-rw-r--r--res/layout/call_stats_fragment.xml80
-rw-r--r--res/layout/call_stats_list_item.xml88
-rw-r--r--res/layout/double_date_picker_dialog.xml67
-rw-r--r--res/menu/call_stats_details_options.xml27
-rw-r--r--res/menu/call_stats_options.xml40
-rw-r--r--res/values/attrs.xml8
-rw-r--r--res/values/cm_arrays.xml17
-rw-r--r--res/values/cm_plurals.xml35
-rw-r--r--res/values/cm_strings.xml42
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/styles.xml25
16 files changed, 879 insertions, 1 deletions
diff --git a/res/layout/call_log_spinner_item.xml b/res/layout/call_log_spinner_item.xml
new file mode 100644
index 000000000..045deb737
--- /dev/null
+++ b/res/layout/call_log_spinner_item.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/CallLogSpinnerStyle"
+ android:layout_width="match_parent"
+ android:layout_height="40dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip" />
diff --git a/res/layout/call_spinner.xml b/res/layout/call_spinner.xml
new file mode 100644
index 000000000..708d06919
--- /dev/null
+++ b/res/layout/call_spinner.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/call_log_outer_margin"
+ android:paddingEnd="@dimen/call_log_outer_margin"
+ android:paddingBottom="@dimen/call_log_inner_margin">
+ <Spinner
+ android:id="@+id/filter_sub_spinner"
+ android:layout_width="0dip"
+ android:layout_height="@dimen/list_section_divider_min_height"
+ android:layout_weight="1.2"
+ android:layout_marginTop="5dip" />
+ <Spinner
+ android:id="@+id/filter_status_spinner"
+ android:layout_width="0dip"
+ android:layout_height="@dimen/list_section_divider_min_height"
+ android:layout_weight="2"
+ android:layout_marginTop="5dip" />
+</LinearLayout>
diff --git a/res/layout/call_stats_detail.xml b/res/layout/call_stats_detail.xml
new file mode 100644
index 000000000..4df88d7de
--- /dev/null
+++ b/res/layout/call_stats_detail.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/call_stats_detail"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:background="@color/background_dialer_call_log" >
+
+ <!-- Caller information "card" -->
+ <LinearLayout
+ android:id="@+id/caller_information"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="@dimen/call_detail_horizontal_margin"
+ android:paddingTop="@dimen/call_detail_top_margin"
+ android:paddingBottom="@dimen/call_detail_bottom_margin"
+ android:baselineAligned="false"
+ android:orientation="horizontal"
+ android:translationZ="@dimen/call_detail_translation_z"
+ android:focusable="true"
+ android:background="@color/background_dialer_white" >
+
+ <QuickContactBadge
+ android:id="@+id/quick_contact_photo"
+ android:layout_width="@dimen/contact_photo_size"
+ android:layout_height="@dimen/contact_photo_size"
+ android:layout_alignParentStart="true"
+ android:layout_gravity="top"
+ android:layout_marginTop="3dp"
+ android:focusable="true" />
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center_vertical"
+ android:layout_marginStart="@dimen/call_detail_horizontal_margin">
+
+ <TextView
+ android:id="@+id/caller_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size"
+ android:includeFontPadding="false"
+ android:layout_marginBottom="5dp"
+ android:singleLine="true" />
+
+ <TextView
+ android:id="@+id/caller_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="@dimen/call_log_secondary_text_size"
+ android:layout_marginBottom="1dp"
+ android:singleLine="true" />
+
+ <TextView
+ android:id="@+id/phone_account_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="@dimen/call_log_secondary_text_size"
+ android:singleLine="true"
+ android:visibility="gone"
+ />
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/call_back_button"
+ android:layout_width="@dimen/call_log_list_item_primary_action_dimen"
+ android:layout_height="@dimen/call_log_list_item_primary_action_dimen"
+ android:layout_marginEnd="16dp"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
+ android:src="@drawable/ic_call_24dp"
+ android:scaleType="center"
+ android:tint="@color/call_log_list_item_primary_action_icon_tint"
+ android:contentDescription="@string/description_call_log_call_action"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <!-- The actual details -->
+ <include layout="@layout/call_stats_detail_info" />
+
+ </ScrollView>
+
+</LinearLayout>
diff --git a/res/layout/call_stats_detail_info.xml b/res/layout/call_stats_detail_info.xml
new file mode 100644
index 000000000..c636c1ab1
--- /dev/null
+++ b/res/layout/call_stats_detail_info.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.dialer"
+ android:id="@+id/call_stats_info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingStart="@dimen/call_detail_horizontal_margin"
+ android:paddingEnd="@dimen/call_detail_horizontal_margin"
+ android:paddingTop="@dimen/call_log_inner_margin"
+ android:paddingBottom="@dimen/call_log_inner_margin">
+
+ <TextView
+ android:id="@+id/date_filter"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/secondary_text_color" />
+
+ <RelativeLayout
+ android:id="@+id/duration_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/date_filter">
+
+ <TextView
+ android:id="@+id/durations_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/call_stats_title_durations"
+ android:layout_marginBottom="@dimen/call_log_vertical_padding"
+ android:textColor="?android:attr/colorAccent"
+ style="@android:style/TextAppearance.Material.Subhead" />
+
+ <TextView
+ android:id="@+id/total_duration_total"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_below="@id/durations_header"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_toStartOf="@id/total_duration_total"
+ android:layout_alignBaseline="@id/total_duration_total"
+ android:text="@string/call_stats_title_of_total"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <com.android.dialer.widget.LinearColorBar
+ android:id="@+id/duration_total_percent_bar"
+ android:layout_width="match_parent"
+ android:layout_below="@id/total_duration_total"
+ style="@style/CallStatsBarStyle" />
+
+ <TextView
+ android:id="@+id/total_duration_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_below="@id/duration_total_percent_bar"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_toStartOf="@id/total_duration_number"
+ android:layout_alignBaseline="@id/total_duration_number"
+ android:text="@string/call_stats_title_for_number"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <com.android.dialer.widget.LinearColorBar
+ android:id="@+id/duration_number_percent_bar"
+ android:layout_width="match_parent"
+ android:layout_below="@id/total_duration_number"
+ style="@style/CallStatsBarStyle" />
+
+ <include
+ android:id="@+id/in_duration"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/duration_number_percent_bar"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <include
+ android:id="@+id/out_duration"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/in_duration"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ </RelativeLayout>
+
+ <TextView
+ android:id="@+id/count_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/duration_container"
+ android:layout_marginTop="@dimen/call_log_vertical_padding"
+ android:layout_marginBottom="@dimen/call_log_vertical_padding"
+ android:text="@string/call_stats_title_count"
+ android:textColor="?android:attr/colorAccent"
+ style="@android:style/TextAppearance.Material.Subhead" />
+
+ <TextView
+ android:id="@+id/total_count_total"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_below="@id/count_header"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_toStartOf="@id/total_count_total"
+ android:layout_alignBaseline="@id/total_count_total"
+ android:text="@string/call_stats_title_of_total"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <com.android.dialer.widget.LinearColorBar
+ android:id="@+id/count_total_percent_bar"
+ android:layout_width="match_parent"
+ android:layout_below="@id/total_count_total"
+ style="@style/CallStatsBarStyle" />
+
+ <TextView
+ android:id="@+id/total_count_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_below="@id/count_total_percent_bar"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_toStartOf="@id/total_count_number"
+ android:layout_alignBaseline="@id/total_count_number"
+ android:text="@string/call_stats_title_for_number"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <com.android.dialer.widget.LinearColorBar
+ android:id="@+id/count_number_percent_bar"
+ android:layout_width="match_parent"
+ android:layout_below="@id/total_count_number"
+ style="@style/CallStatsBarStyle" />
+
+ <include
+ android:id="@+id/in_count"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/count_number_percent_bar"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <include
+ android:id="@+id/out_count"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/in_count"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <include
+ android:id="@+id/missed_count"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/out_count"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <include
+ android:id="@+id/blacklisted_count"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/missed_count"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <TextView
+ android:id="@+id/average_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/blacklisted_count"
+ android:layout_marginTop="@dimen/call_log_vertical_padding"
+ android:layout_marginBottom="@dimen/call_log_vertical_padding"
+ android:text="@string/call_stats_title_average_duration"
+ android:textColor="?android:attr/colorAccent"
+ style="@android:style/TextAppearance.Material.Subhead" />
+
+ <include
+ android:id="@+id/in_average"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/average_header"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+ <include
+ android:id="@+id/out_average"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/in_average"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ layout="@layout/call_stats_detail_line" />
+
+</RelativeLayout>
diff --git a/res/layout/call_stats_detail_line.xml b/res/layout/call_stats_detail_line.xml
new file mode 100644
index 000000000..579caa1ef
--- /dev/null
+++ b/res/layout/call_stats_detail_line.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.android.dialer.calllog.CallTypeIconsView
+ android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/value"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_marginStart="@dimen/call_log_icon_margin"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:id="@+id/percent"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/call_log_icon_margin"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="@dimen/call_log_secondary_text_size" />
+
+</LinearLayout>
diff --git a/res/layout/call_stats_fragment.xml b/res/layout/call_stats_fragment.xml
new file mode 100644
index 000000000..140e2baa3
--- /dev/null
+++ b/res/layout/call_stats_fragment.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 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.
+-->
+
+<!-- Layout parameters are set programmatically. -->
+<android.support.design.widget.CoordinatorLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:design="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/background_dialer_call_log"
+ design:statusBarBackground="@null" >
+
+ <android.support.design.widget.AppBarLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/background_dialer_call_log"
+ design:elevation="2dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ design:layout_scrollFlags="scroll|enterAlways">
+
+ <include layout="@layout/call_spinner" />
+
+ <TextView
+ android:id="@+id/date_filter"
+ style="@style/ContactListSeparatorTextViewStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/call_log_outer_margin"
+ android:layout_marginEnd="@dimen/call_log_outer_margin"
+ android:visibility="gone"
+ android:background="@null" />
+
+ <TextView
+ android:id="@+id/sum_header"
+ style="@style/ContactListSeparatorTextViewStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/call_log_outer_margin"
+ android:layout_marginEnd="@dimen/call_log_outer_margin"
+ android:paddingBottom="@dimen/call_log_inner_margin"
+ android:visibility="gone"
+ android:background="@null" />
+ </LinearLayout>
+
+ </android.support.design.widget.AppBarLayout>
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingStart="@dimen/call_log_horizontal_margin"
+ android:paddingEnd="@dimen/call_log_horizontal_margin"
+ design:layout_behavior="@string/appbar_scrolling_view_behavior" />
+
+ <com.android.dialer.widget.EmptyContentView
+ android:id="@+id/empty_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone" />
+
+</android.support.design.widget.CoordinatorLayout>
diff --git a/res/layout/call_stats_list_item.xml b/res/layout/call_stats_list_item.xml
new file mode 100644
index 000000000..ea9cc0776
--- /dev/null
+++ b/res/layout/call_stats_list_item.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2007 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.
+-->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.dialer"
+ android:id="@+id/primary_action_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="@dimen/call_log_start_margin"
+ android:paddingEnd="@dimen/call_log_outer_margin"
+ android:paddingTop="@dimen/call_log_vertical_padding"
+ android:paddingBottom="@dimen/call_log_vertical_padding"
+ android:background="?android:attr/selectableItemBackground">
+
+ <QuickContactBadge
+ android:id="@+id/quick_contact_photo"
+ android:layout_width="@dimen/contact_photo_size"
+ android:layout_height="@dimen/contact_photo_size"
+ android:layout_marginEnd="@dimen/call_log_start_margin"
+ android:paddingTop="2dp" />
+
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@id/quick_contact_photo"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="@dimen/call_log_primary_text_size" />
+
+ <TextView
+ android:id="@+id/percent"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@id/name"
+ android:layout_alignBaseline="@id/name"
+ android:layout_alignParentEnd="true"
+ android:gravity="end"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="@dimen/call_log_secondary_text_size" />
+
+ <com.android.dialer.widget.LinearColorBar
+ android:id="@+id/percent_bar"
+ android:layout_width="wrap_content"
+ android:layout_below="@id/name"
+ android:layout_toEndOf="@id/quick_contact_photo"
+ android:layout_alignParentEnd="true"
+ style="@style/CallStatsBarStyle" />
+
+ <TextView
+ android:id="@+id/label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/percent_bar"
+ android:layout_toEndOf="@id/quick_contact_photo"
+ android:layout_marginEnd="8dp"
+ android:singleLine="true"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="@dimen/call_log_secondary_text_size" />
+
+ <TextView
+ android:id="@+id/number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/percent_bar"
+ android:layout_toEndOf="@id/label"
+ android:layout_alignBaseline="@id/label"
+ android:singleLine="true"
+ android:textColor="?attr/call_log_secondary_text_color"
+ android:textSize="12sp" />
+
+</RelativeLayout>
diff --git a/res/layout/double_date_picker_dialog.xml b/res/layout/double_date_picker_dialog.xml
new file mode 100644
index 000000000..ec4a1f25b
--- /dev/null
+++ b/res/layout/double_date_picker_dialog.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2007, 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.
+*/
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical" >
+
+ <Spinner
+ android:id="@+id/date_quick_selection"
+ android:layout_marginTop="3dp"
+ android:layout_marginBottom="3dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="-12dp"
+ android:layout_marginRight="3dp"
+ android:layout_marginTop="3dp"
+ android:text="@string/call_stats_filter_from"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <DatePicker
+ android:id="@+id/date_picker_from"
+ android:datePickerMode="spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:calendarViewShown="false"
+ android:spinnersShown="true" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="-12dp"
+ android:layout_marginRight="4dp"
+ android:text="@string/call_stats_filter_to"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <DatePicker
+ android:id="@+id/date_picker_to"
+ android:datePickerMode="spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:calendarViewShown="false"
+ android:spinnersShown="true" />
+
+</LinearLayout>
diff --git a/res/menu/call_stats_details_options.xml b/res/menu/call_stats_details_options.xml
new file mode 100644
index 000000000..c16db3315
--- /dev/null
+++ b/res/menu/call_stats_details_options.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_edit_number_before_call"
+ android:title="@string/recentCalls_editNumberBeforeCall"
+ android:onClick="onMenuEditNumberBeforeCall"
+ />
+ <item
+ android:id="@+id/menu_add_to_blacklist"
+ android:title="@string/menu_add_to_blacklist"
+ android:onClick="onMenuAddToBlacklist"
+ />
+</menu>
diff --git a/res/menu/call_stats_options.xml b/res/menu/call_stats_options.xml
new file mode 100644
index 000000000..f4cdb93d8
--- /dev/null
+++ b/res/menu/call_stats_options.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item
+ android:id="@+id/date_filter"
+ android:showAsAction="never"
+ android:title="@string/call_stats_date_filter"/>
+
+ <item
+ android:id="@+id/reset_date_filter"
+ android:showAsAction="never"
+ android:visible="false"
+ android:title="@string/call_stats_reset_filter"/>
+
+ <item
+ android:id="@+id/sort_by_duration"
+ android:showAsAction="never"
+ android:visible="false"
+ android:title="@string/call_stats_sort_by_duration"/>
+
+ <item
+ android:id="@+id/sort_by_count"
+ android:showAsAction="never"
+ android:title="@string/call_stats_sort_by_count"/>
+
+</menu>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 23f639fd2..90f8070a8 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -33,4 +33,12 @@
<declare-styleable name="SearchEditTextLayout" />
+ <declare-styleable name="LinearColorBar">
+ <attr name="redColor" format="color" />
+ <attr name="greenColor" format="color" />
+ <attr name="blueColor" format="color" />
+ <attr name="orangeColor" format="color" />
+ <attr name="backgroundColor" format="color" />
+ </declare-styleable>
+
</resources>
diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml
index 881a4e055..087ec89b7 100644
--- a/res/values/cm_arrays.xml
+++ b/res/values/cm_arrays.xml
@@ -15,6 +15,23 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- 0: sec
+ 1: min
+ 2: min sec
+ 3: hour
+ 4: hour sec
+ 5: hour min
+ 6: hour min sec -->
+
+ <string-array name="call_stats_duration">
+ <item><xliff:g id="seconds" example="2 secs">%3$s</xliff:g></item>
+ <item><xliff:g id="minutes" example="2 mins">%2$s</xliff:g></item>
+ <item><xliff:g id="minutes" example="2 mins">%2$s</xliff:g> <xliff:g id="seconds" example="2 secs">%3$s</xliff:g></item>
+ <item><xliff:g id="hours" example="2 hrs">%1$s</xliff:g></item>
+ <item><xliff:g id="hours" example="2 hrs">%1$s</xliff:g> <xliff:g id="seconds" example="2 secs">%3$s</xliff:g></item>
+ <item><xliff:g id="hours" example="2 hrs">%1$s</xliff:g> <xliff:g id="minutes" example="2 mins">%2$s</xliff:g></item>
+ <item><xliff:g id="hours" example="2 hrs">%1$s</xliff:g> <xliff:g id="minutes" example="2 mins">%2$s</xliff:g> <xliff:g id="seconds" example="2 secs">%3$s</xliff:g></item>
+ </string-array>
<string-array name="forward_lookup_providers" translatable="false">
<item>Google</item>
diff --git a/res/values/cm_plurals.xml b/res/values/cm_plurals.xml
new file mode 100644
index 000000000..0c4b4d21a
--- /dev/null
+++ b/res/values/cm_plurals.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <plurals name="hour">
+ <item quantity="one">1 hr</item>
+ <item quantity="other">%d hrs</item>
+ </plurals>
+ <plurals name="minute">
+ <item quantity="one">1 min</item>
+ <item quantity="other">%d mins</item>
+ </plurals>
+ <plurals name="second">
+ <item quantity="one">1 sec</item>
+ <item quantity="other">%d secs</item>
+ </plurals>
+
+ <plurals name="call">
+ <item quantity="one">1 call</item>
+ <item quantity="other">%d calls</item>
+ </plurals>
+</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index a6e5f5c5c..8cbcf50ca 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -68,4 +68,46 @@
<string name="incall_vibrate_hangup_title">Vibrate on hang up</string>
<string name="incall_vibrate_45_title">Vibrate every minute</string>
<string name="incall_vibrate_45_summary">Vibrates at the 45 second mark of every minute during outgoing calls</string>
+
+ <string name="call_log_show_all_slots">All SIMs</string>
+ <string name="call_log_all_calls_header">All calls</string>
+ <string name="call_log_blacklist_header">Blocked calls only</string>
+
+ <!-- Call statistics -->
+ <string name="call_log_stats_title">Statistics</string>
+ <string name="callStatsDetailTitle">Call stat details</string>
+
+ <string name="call_stats_incoming">Incoming: <xliff:g id="value">%s</xliff:g></string>
+ <string name="call_stats_outgoing">Outgoing: <xliff:g id="value">%s</xliff:g></string>
+ <string name="call_stats_missed">Missed: <xliff:g id="value">%s</xliff:g></string>
+ <string name="call_stats_blacklisted">Blocked: <xliff:g id="value">%s</xliff:g></string>
+ <string name="call_stats_percent"><xliff:g id="percent">%d</xliff:g>%%</string>
+ <string name="call_stats_header_total">Total: <xliff:g id="call_count">%s</xliff:g>, <xliff:g id="duration">%s</xliff:g></string>
+ <string name="call_stats_header_total_callsonly">Total: <xliff:g id="call_count">%s</xliff:g></string>
+ <string name="call_stats_filter_from">Start date</string>
+ <string name="call_stats_filter_to">End date</string>
+ <string name="call_stats_filter_picker_title">Filter range</string>
+
+ <string name="date_quick_selection">Quick selection</string>
+ <string name="date_qs_currentmonth">Current month</string>
+ <string name="date_qs_currentquarter">Current quarter</string>
+ <string name="date_qs_currentyear">Current year</string>
+ <string name="date_qs_lastweek">Last week</string>
+ <string name="date_qs_lastmonth">Last month</string>
+ <string name="date_qs_lastquarter">Last quarter</string>
+ <string name="date_qs_lastyear">Last year</string>
+
+ <string name="call_stats_date_filter">Adjust time range</string>
+ <string name="call_stats_reset_filter">Reset time range</string>
+ <string name="call_stats_sort_by_duration">Sort by call duration</string>
+ <string name="call_stats_sort_by_count">Sort by call count</string>
+
+ <string name="call_stats_title_for_number">This number</string>
+ <string name="call_stats_title_of_total">Of total</string>
+ <string name="call_stats_title_durations">Call durations</string>
+ <string name="call_stats_title_count">Call count</string>
+ <string name="call_stats_title_average_duration">Average call duration</string>
+
+ <!-- Text displayed when there are no call log entries in the selected time range. -->
+ <string name="recent_calls_no_items_in_range">Your call log does not contain any calls in the selected time range.</string>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 5a481b639..451210404 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -111,4 +111,7 @@
<!-- Color for call log blacklist item -->
<color name="call_log_action_block_red">#F44336</color>
<color name="call_log_action_block_gray">#616161</color>
+
+ <!-- Colors for incoming and outgoing calls in the call statistics -->
+ <color name="call_stats_bar_background">#88888888</color>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index e3a2f9974..816e1ab33 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -30,6 +30,7 @@
<item name="android:listViewStyle">@style/ListViewStyle</item>
<item name="android:overlapAnchor">true</item>
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
+ <item name="android:colorAccent">@color/dialtacts_theme_color</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="section_header_background">@drawable/list_title_holo</item>
<item name="list_section_header_height">32dip</item>
@@ -199,7 +200,6 @@
<!-- Setting description. -->
<item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
<item name="android:windowBackground">@color/setting_background_color</item>
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
<item name="android:textColorLink">@color/dialtacts_theme_color</item>
</style>
@@ -218,6 +218,16 @@
<item name="cardBackgroundColor">@color/background_dialer_call_log_list_item</item>
</style>
+ <style name="CallLogSpinnerStyle">
+ <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textColor">@android:color/black</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:ellipsize">marquee</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:textAllCaps">true</item>
+ </style>
+
<style name="TextActionStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">@dimen/call_log_action_height</item>
@@ -246,4 +256,17 @@
<item name="android:background">@drawable/oval_ripple</item>
<item name="android:padding">8dp</item>
</style>
+
+ <style name="CallStatsBarStyle">
+ <item name="android:layout_height">4dp</item>
+ <item name="android:layout_marginTop">6dp</item>
+ <item name="android:layout_marginBottom">6dp</item>
+ <item name="android:orientation">horizontal</item>
+ <item name="backgroundColor">@color/call_stats_bar_background</item>
+ <item name="blueColor">@color/answered_incoming_call</item>
+ <item name="greenColor">@color/answered_outgoing_call</item>
+ <item name="redColor">@color/missed_call</item>
+ <item name="orangeColor">@color/blacklisted_call</item>
+ </style>
+
</resources>