diff options
author | Cheng Xiaolong <chengxiaolong@codeaurora.org> | 2014-01-07 02:01:17 -0500 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-03 16:58:11 -0700 |
commit | 703573080e9ddc4360da7b81abdb0035d0eb97ce (patch) | |
tree | 8bac48a2338679ad4da549f193f619aaa41f9ab4 /res | |
parent | 24c2b390c540de5d46c78309528a30c0e209f7de (diff) | |
download | android_packages_apps_Dialer-703573080e9ddc4360da7b81abdb0035d0eb97ce.tar.gz android_packages_apps_Dialer-703573080e9ddc4360da7b81abdb0035d0eb97ce.tar.bz2 android_packages_apps_Dialer-703573080e9ddc4360da7b81abdb0035d0eb97ce.zip |
Dialer: Add the subscription info for call log.
Add the subscription info on the call log and call detail activity.
- add spinner to select "ALL SIMS","SIM1","SIM2" to filter call log
- add spinner to select "ALL CALLS","INCOMING CALLS ONLY",
"OUTGOING CALLS ONLY","MISSED CALLS ONLY"
Conflicts:
res/layout/call_log_list_item.xml
res/values-zh-rCN/strings.xml
res/values/strings.xml
src/com/android/dialer/CallDetailActivity.java
src/com/android/dialer/DialtactsActivity.java
src/com/android/dialer/PhoneCallDetails.java
src/com/android/dialer/PhoneCallDetailsHelper.java
src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
src/com/android/dialer/calllog/CallLogActivity.java
src/com/android/dialer/calllog/CallLogAdapter.java
src/com/android/dialer/calllog/CallLogListItemViews.java
tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java
tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java
Change-Id: Ib4ad371af61e9473dfe1b10e83abd2b1acaa7ef7
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/call_detail_history_item.xml | 29 | ||||
-rw-r--r-- | res/layout/call_log_list_item.xml | 21 | ||||
-rw-r--r-- | res/layout/call_log_spinner_item.xml | 37 | ||||
-rw-r--r-- | res/layout/msim_call_log_activity.xml | 38 | ||||
-rw-r--r-- | res/layout/msim_call_log_fragment.xml | 89 | ||||
-rw-r--r-- | res/values/dimens.xml | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | res/values/strings.xml | 5 | ||||
-rw-r--r-- | res/values/styles.xml | 10 |
8 files changed, 226 insertions, 7 deletions
diff --git a/res/layout/call_detail_history_item.xml b/res/layout/call_detail_history_item.xml index a5acf5258..473e1410c 100644 --- a/res/layout/call_detail_history_item.xml +++ b/res/layout/call_detail_history_item.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2011 The Android Open Source Project + Copyright (C) 2013, The Linux Foundation. All rights reserved. + + Not a Contribution. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -47,13 +50,29 @@ android:textColor="?attr/call_log_secondary_text_color" /> </LinearLayout> - <TextView - android:id="@+id/date" + + <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?attr/call_log_secondary_text_color" - /> + android:orientation="horizontal" + > + <ImageView + android:id="@+id/sub_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="@dimen/call_log_icon_margin" + android:layout_marginBottom="@dimen/call_detail_button_spacing" + android:layout_gravity="bottom" + /> + <TextView + android:id="@+id/date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="?attr/call_log_secondary_text_color" + /> + </LinearLayout> + <TextView android:id="@+id/duration" android:layout_width="wrap_content" diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index e17dc279b..875a3aa1b 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2007 The Android Open Source Project + Copyright (C) 2013, The Linux Foundation. All rights reserved. + + Not a Contribution. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -88,6 +91,15 @@ android:layout_height="wrap_content" android:orientation="horizontal" > + <ImageView + android:id="@+id/sub_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="@dimen/call_log_icon_margin" + android:layout_marginBottom="@dimen/call_detail_button_spacing" + android:layout_gravity="bottom" + android:visibility="gone" + /> <TextView android:id="@+id/label" android:layout_width="wrap_content" @@ -153,6 +165,15 @@ android:background="?android:attr/selectableItemBackground" android:nextFocusLeft="@id/primary_action_view" /> + <ImageButton + android:id="@+id/call_action_sub_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="23dip" + android:layout_marginRight="8dip" + android:layout_alignParentRight="true" + android:visibility="gone" + /> </LinearLayout> </LinearLayout> <TextView diff --git a/res/layout/call_log_spinner_item.xml b/res/layout/call_log_spinner_item.xml new file mode 100644 index 000000000..d853c5c35 --- /dev/null +++ b/res/layout/call_log_spinner_item.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 2013, 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" + android:id="@android:id/text1" + style="@style/CallLogSpinnerStyle" + android:layout_width="match_parent" + android:layout_height="40dip" + android:paddingLeft="8dip" + android:paddingRight="8dip" + android:singleLine="true" + android:ellipsize="marquee" /> diff --git a/res/layout/msim_call_log_activity.xml b/res/layout/msim_call_log_activity.xml new file mode 100644 index 000000000..54b37d422 --- /dev/null +++ b/res/layout/msim_call_log_activity.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 2013, 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. +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/calllog_frame"> + <android.support.v4.view.ViewPager + android:id="@+id/call_log_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginTop="?android:attr/actionBarSize" /> +</FrameLayout> diff --git a/res/layout/msim_call_log_fragment.xml b/res/layout/msim_call_log_fragment.xml new file mode 100644 index 000000000..524291695 --- /dev/null +++ b/res/layout/msim_call_log_fragment.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 2013, 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. +--> +<!-- Layout parameters are set programmatically. --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:divider="?android:attr/dividerHorizontal" + android:showDividers="end"> + + <FrameLayout + android:id="@+id/voicemail_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="gone"> + <include layout="@layout/call_log_voicemail_status" + /> + </FrameLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingLeft="@dimen/call_log_outer_margin" + android:paddingRight="@dimen/call_log_outer_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" + 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> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> + <ListView android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fadingEdge="none" + android:scrollbarStyle="outsideOverlay" + android:divider="@null" + /> + <TextView android:id="@android:id/empty" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="@string/recentCalls_empty" + android:gravity="center" + android:layout_marginTop="@dimen/empty_message_top_margin" + android:textColor="?android:attr/textColorSecondary" + android:textAppearance="?android:attr/textAppearanceLarge" + /> + </FrameLayout> +</LinearLayout> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 028e82d56..fe7658a72 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -29,8 +29,8 @@ <dimen name="call_log_call_action_size">32dip</dimen> <dimen name="call_log_call_action_width">54dp</dimen> <dimen name="call_log_icon_margin">4dip</dimen> - <dimen name="call_log_inner_margin">8dip</dimen> - <dimen name="call_log_outer_margin">8dip</dimen> + <dimen name="call_log_inner_margin">5dip</dimen> + <dimen name="call_log_outer_margin">10dip</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">64dip</dimen> diff --git a/res/values/strings.xml b/res/values/strings.xml index 9bbceee93..702c1465d 100755..100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2012 The Android Open Source Project + ~ Copyright (C) 2013 The Linux Foundation. All Rights Reserved. ~ + ~ Not a Contribution. ~ 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 @@ -312,6 +314,7 @@ <!-- Menu item to copy something [CHAR_LIMIT=10] --> <string name="menu_copy">Copy</string> + <string name="call_log_all_calls_header">All calls</string> <!-- Menu item used to show only outgoing in the call log. [CHAR LIMIT=30] --> <string name="menu_show_outgoing_only">Show outgoing only</string> @@ -767,4 +770,6 @@ <string name="dialog_speed_dial_airplane_mode_message" >"To call Speed dial, first turn off Airplane mode."</string> <string name="assignSpeedDialFailToast">The number has already been assigned to a speed dial key, please select another number.</string> <string name="device_id">Device Identifier</string> + <string name="slot_name">SIM</string> + <string name="call_log_show_all_slots">All SIMs</string> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 973c53470..101845f0a 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -228,6 +228,16 @@ <item name="android:overScrollMode">always</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">end</item> + <item name="android:singleLine">true</item> + <item name="android:textAllCaps">true</item> + </style> + <style name="FragmentActionBarPadding"> <item name="android:paddingBottom">?android:attr/actionBarSize</item> </style> |