Merge "Don't preload AsYouTypeFormatter"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 40d5c26..01a6f95 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -597,7 +597,7 @@
<!-- vCard related -->
<activity android:name=".vcard.ImportVCardActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
- android:theme="@style/BackgroundOnly">
+ android:theme="@style/BackgroundOnlyTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="text/directory" />
@@ -610,7 +610,7 @@
<activity android:name=".vcard.NfcImportVCardActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
- android:theme="@style/BackgroundOnly">
+ android:theme="@style/BackgroundOnlyTheme">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:mimeType="text/vcard" />
@@ -621,13 +621,13 @@
</activity>
<activity android:name=".vcard.CancelActivity"
- android:theme="@style/BackgroundOnly" />
+ android:theme="@style/BackgroundOnlyTheme" />
<activity android:name=".vcard.SelectAccountActivity"
- android:theme="@style/BackgroundOnly" />
+ android:theme="@style/BackgroundOnlyTheme" />
<activity android:name=".vcard.ExportVCardActivity"
- android:theme="@style/BackgroundOnly" />
+ android:theme="@style/BackgroundOnlyTheme" />
<service
android:name=".vcard.VCardService"
diff --git a/res/drawable-hdpi/account_spinner_icon.png b/res/drawable-hdpi/account_spinner_icon.png
new file mode 100644
index 0000000..3e82e51
--- /dev/null
+++ b/res/drawable-hdpi/account_spinner_icon.png
Binary files differ
diff --git a/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index f026cc8..0000000
--- a/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index a0770ea..0000000
--- a/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/directory_bg.9.png b/res/drawable-hdpi/directory_bg.9.png
deleted file mode 100644
index f0a92d4..0000000
--- a/res/drawable-hdpi/directory_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/directory_bg_holo.9.png b/res/drawable-hdpi/directory_bg_holo.9.png
deleted file mode 100644
index 7f7209d..0000000
--- a/res/drawable-hdpi/directory_bg_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_compose_holo_light.png b/res/drawable-hdpi/ic_menu_compose_holo_light.png
deleted file mode 100644
index 07ab787..0000000
--- a/res/drawable-hdpi/ic_menu_compose_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_done_holo_light.png b/res/drawable-hdpi/ic_menu_done_holo_light.png
deleted file mode 100644
index 89c6e04..0000000
--- a/res/drawable-hdpi/ic_menu_done_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/infobar_dark.9.png b/res/drawable-hdpi/infobar_dark.9.png
deleted file mode 100644
index 5a08290..0000000
--- a/res/drawable-hdpi/infobar_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_section_divider_holo_custom.9.png b/res/drawable-hdpi/list_section_divider_holo_custom.9.png
new file mode 100644
index 0000000..6c0d251
--- /dev/null
+++ b/res/drawable-hdpi/list_section_divider_holo_custom.9.png
Binary files differ
diff --git a/res/drawable-hdpi/section_header.9.png b/res/drawable-hdpi/section_header.9.png
deleted file mode 100644
index 8cd231b..0000000
--- a/res/drawable-hdpi/section_header.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_audiochat_holo_dark.png b/res/drawable-hdpi/sym_action_audiochat_holo_dark.png
deleted file mode 100644
index d4e3329..0000000
--- a/res/drawable-hdpi/sym_action_audiochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_sms.png b/res/drawable-hdpi/sym_action_sms.png
deleted file mode 100644
index 9f18105..0000000
--- a/res/drawable-hdpi/sym_action_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_videochat_holo_dark.png b/res/drawable-hdpi/sym_action_videochat_holo_dark.png
deleted file mode 100644
index 821940a..0000000
--- a/res/drawable-hdpi/sym_action_videochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/account_spinner_icon.png b/res/drawable-mdpi/account_spinner_icon.png
new file mode 100644
index 0000000..d9aaf02
--- /dev/null
+++ b/res/drawable-mdpi/account_spinner_icon.png
Binary files differ
diff --git a/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index 591e6d5..0000000
--- a/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index 5d5eee2..0000000
--- a/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/directory_bg.9.png b/res/drawable-mdpi/directory_bg.9.png
deleted file mode 100644
index 80578cd..0000000
--- a/res/drawable-mdpi/directory_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/directory_bg_holo.9.png b/res/drawable-mdpi/directory_bg_holo.9.png
deleted file mode 100644
index 7f7209d..0000000
--- a/res/drawable-mdpi/directory_bg_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_compose_holo_light.png b/res/drawable-mdpi/ic_menu_compose_holo_light.png
deleted file mode 100644
index 5236c1c..0000000
--- a/res/drawable-mdpi/ic_menu_compose_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_done_holo_light.png b/res/drawable-mdpi/ic_menu_done_holo_light.png
deleted file mode 100644
index 3468bbd..0000000
--- a/res/drawable-mdpi/ic_menu_done_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/infobar_dark.9.png b/res/drawable-mdpi/infobar_dark.9.png
deleted file mode 100644
index ae3caf7..0000000
--- a/res/drawable-mdpi/infobar_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_section_divider_holo_custom.9.png b/res/drawable-mdpi/list_section_divider_holo_custom.9.png
new file mode 100644
index 0000000..cfc57ee
--- /dev/null
+++ b/res/drawable-mdpi/list_section_divider_holo_custom.9.png
Binary files differ
diff --git a/res/drawable-mdpi/section_header.9.png b/res/drawable-mdpi/section_header.9.png
deleted file mode 100644
index ac906cd..0000000
--- a/res/drawable-mdpi/section_header.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_audiochat_holo_dark.png b/res/drawable-mdpi/sym_action_audiochat_holo_dark.png
deleted file mode 100644
index 848404d..0000000
--- a/res/drawable-mdpi/sym_action_audiochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_sms.png b/res/drawable-mdpi/sym_action_sms.png
deleted file mode 100644
index f098f4a..0000000
--- a/res/drawable-mdpi/sym_action_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_videochat_holo_dark.png b/res/drawable-mdpi/sym_action_videochat_holo_dark.png
deleted file mode 100644
index 9112e87..0000000
--- a/res/drawable-mdpi/sym_action_videochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/account_spinner_icon.png b/res/drawable-xhdpi/account_spinner_icon.png
new file mode 100644
index 0000000..8b888cb
--- /dev/null
+++ b/res/drawable-xhdpi/account_spinner_icon.png
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index 7e1e97f..0000000
--- a/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index e98266f..0000000
--- a/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_compose_holo_light.png b/res/drawable-xhdpi/ic_menu_compose_holo_light.png
deleted file mode 100644
index 9561ce7..0000000
--- a/res/drawable-xhdpi/ic_menu_compose_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_done_holo_light.png b/res/drawable-xhdpi/ic_menu_done_holo_light.png
deleted file mode 100644
index a8a0972..0000000
--- a/res/drawable-xhdpi/ic_menu_done_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/infobar_dark.9.png b/res/drawable-xhdpi/infobar_dark.9.png
deleted file mode 100644
index 24ed9a2..0000000
--- a/res/drawable-xhdpi/infobar_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_section_divider_holo_custom.9.png b/res/drawable-xhdpi/list_section_divider_holo_custom.9.png
new file mode 100644
index 0000000..32e79e1
--- /dev/null
+++ b/res/drawable-xhdpi/list_section_divider_holo_custom.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_icon_activated.9.png b/res/drawable-xhdpi/quickactions_icon_activated.9.png
deleted file mode 100644
index b3aaf7d..0000000
--- a/res/drawable-xhdpi/quickactions_icon_activated.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/section_header.9.png b/res/drawable-xhdpi/section_header.9.png
deleted file mode 100644
index 5026ea6..0000000
--- a/res/drawable-xhdpi/section_header.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_audiochat_holo_dark.png b/res/drawable-xhdpi/sym_action_audiochat_holo_dark.png
deleted file mode 100644
index 216d34f..0000000
--- a/res/drawable-xhdpi/sym_action_audiochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_sms.png b/res/drawable-xhdpi/sym_action_sms.png
deleted file mode 100644
index 5003be1..0000000
--- a/res/drawable-xhdpi/sym_action_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_videochat_holo_dark.png b/res/drawable-xhdpi/sym_action_videochat_holo_dark.png
deleted file mode 100644
index 5011489..0000000
--- a/res/drawable-xhdpi/sym_action_videochat_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
index 5daf555..439b8f0 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
@@ -22,4 +22,6 @@
android:fadingEdge="none"
android:divider="@null"
android:paddingTop="@dimen/contact_detail_list_top_padding"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
android:clipToPadding="false"/>
diff --git a/res/layout-sw580dp-w1000dp/people_activity.xml b/res/layout-sw580dp-w1000dp/people_activity.xml
index 9a7c5ae..29aa150 100644
--- a/res/layout-sw580dp-w1000dp/people_activity.xml
+++ b/res/layout-sw580dp-w1000dp/people_activity.xml
@@ -142,7 +142,8 @@
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="3"
- android:layout_marginTop="32dip"/>
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="16dip"/>
</LinearLayout>
</view>
diff --git a/res/layout-sw580dp/contact_detail_container.xml b/res/layout-sw580dp/contact_detail_container.xml
index 62c4081..58a6eb3 100644
--- a/res/layout-sw580dp/contact_detail_container.xml
+++ b/res/layout-sw580dp/contact_detail_container.xml
@@ -18,8 +18,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:background="@color/background_primary"
- android:padding="16dip">
+ android:background="@color/background_primary">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
diff --git a/res/layout-sw580dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp/contact_detail_updates_fragment.xml
index 513254e..3bcb01c 100644
--- a/res/layout-sw580dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp/contact_detail_updates_fragment.xml
@@ -25,8 +25,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdge="none"
- android:divider="@null"
- android:paddingTop="32dip"/>
+ android:divider="@null"/>
<View
android:id="@+id/alpha_overlay"
diff --git a/res/layout-sw580dp/list_separator.xml b/res/layout-sw580dp/list_separator.xml
new file mode 100644
index 0000000..a53bd6b
--- /dev/null
+++ b/res/layout-sw580dp/list_separator.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/title"
+ style="?android:attr/listSeparatorTextViewStyle"
+ android:layout_height="32dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:background="@drawable/list_section_divider_holo_custom"
+ android:textColor="@color/people_app_theme_color"
+ android:textAllCaps="true"
+ android:singleLine="true"
+ android:ellipsize="end" />
\ No newline at end of file
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index feeff6c..e15c079 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -134,7 +134,8 @@
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
- android:layout_marginTop="32dip"/>
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="16dip"/>
</LinearLayout>
</view>
diff --git a/res/layout-sw580dp/text_fields_editor_view.xml b/res/layout-sw580dp/text_fields_editor_view.xml
index ecc9dd2..89970c6 100644
--- a/res/layout-sw580dp/text_fields_editor_view.xml
+++ b/res/layout-sw580dp/text_fields_editor_view.xml
@@ -18,7 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="-4dip"
android:orientation="vertical">
<LinearLayout
diff --git a/res/layout-sw580dp/updates_header_contact.xml b/res/layout-sw580dp/updates_header_contact.xml
index 2f2177f..5192134 100644
--- a/res/layout-sw580dp/updates_header_contact.xml
+++ b/res/layout-sw580dp/updates_header_contact.xml
@@ -24,6 +24,7 @@
class="com.android.contacts.widget.ProportionalLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingBottom="8dip"
ex:ratio="0.66"
ex:direction="widthToHeight">
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 157c761..df1ec62 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -163,12 +163,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?attr/call_log_primary_text_color"
/>
<TextView android:id="@+id/call_and_sms_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?attr/call_log_primary_text_color"
android:textAllCaps="true"
/>
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index 7cfcef3..26689be 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -39,6 +39,7 @@
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"
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 734e1b8..3458dd9 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -19,6 +19,7 @@
class="com.android.contacts.calllog.CallLogListItemView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
>
<!--
This layout may represent either a call log item or one of the
@@ -170,4 +171,13 @@
android:layout_height="2dip"
android:background="@color/call_log_voicemail_highlight_color"/>
</LinearLayout>
+
+ <View
+ android:id="@+id/call_log_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginLeft="16dip"
+ android:layout_marginRight="16dip"
+ android:background="#1a1a1a"
+ />
</view>
diff --git a/res/layout/contact_detail_kind_title_entry_view.xml b/res/layout/contact_detail_kind_title_entry_view.xml
deleted file mode 100644
index 37b73ea..0000000
--- a/res/layout/contact_detail_kind_title_entry_view.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/kind"
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:textColor="@color/detail_kind_title_color"
- android:textStyle="bold"
- android:singleLine="true"
- android:ellipsize="end"
- android:paddingLeft="8dip"
- android:paddingTop="5dip"
- android:paddingBottom="2dip" />
-
- <View
- android:id="@+id/kind_divider"
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="@color/detail_kind_title_color"/>
-
-</LinearLayout>
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index 4d6ed5f..99f027f 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -47,12 +47,6 @@
android:gravity="center_vertical">
<TextView
- android:id="@+id/kind"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone" />
-
- <TextView
android:id="@+id/data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -121,7 +115,8 @@
<ImageView
android:id="@+id/secondary_action_button"
android:layout_width="32dip"
- android:layout_height="match_parent"
+ android:layout_height="32dip"
+ android:layout_gravity="center_vertical"
android:duplicateParentState="false" />
</FrameLayout>
</LinearLayout>
diff --git a/res/layout/contact_detail_tab_carousel.xml b/res/layout/contact_detail_tab_carousel.xml
index fb60f17..28463a2 100644
--- a/res/layout/contact_detail_tab_carousel.xml
+++ b/res/layout/contact_detail_tab_carousel.xml
@@ -35,7 +35,7 @@
<!-- Vertical divider -->
<View
- android:layout_width="2dip"
+ android:layout_width="1dip"
android:layout_height="match_parent"
android:background="@android:color/white"/>
diff --git a/res/layout/edit_date_picker.xml b/res/layout/edit_date_picker.xml
index 5122bbe..1d0d0b6 100644
--- a/res/layout/edit_date_picker.xml
+++ b/res/layout/edit_date_picker.xml
@@ -21,9 +21,10 @@
android:id="@+id/date_view"
style="?android:attr/spinnerStyle"
android:layout_width="0dip"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/editor_min_line_item_height"
android:layout_weight="1"
+ android:gravity="center_vertical"
android:layout_marginLeft="@dimen/editor_field_left_padding"
android:layout_marginRight="@dimen/editor_field_right_padding"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:paddingLeft="16dip" />
\ No newline at end of file
+ android:paddingLeft="12dip" />
\ No newline at end of file
diff --git a/res/layout/edit_delete_button.xml b/res/layout/edit_delete_button.xml
index ed3f4d6..32b0580 100644
--- a/res/layout/edit_delete_button.xml
+++ b/res/layout/edit_delete_button.xml
@@ -20,6 +20,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="@dimen/editor_min_line_item_height"
+ android:layout_marginRight="2dip"
android:layout_gravity="top">
<ImageView
android:id="@+id/delete_button"
diff --git a/res/layout/edit_expansion_view.xml b/res/layout/edit_expansion_view.xml
index 267593d..06d809c 100644
--- a/res/layout/edit_expansion_view.xml
+++ b/res/layout/edit_expansion_view.xml
@@ -19,12 +19,13 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
- android:layout_height="match_parent">
+ android:layout_height="@dimen/editor_min_line_item_height"
+ android:layout_gravity="top">
<ImageView
android:id="@+id/expansion_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="top"
+ android:layout_gravity="center"
android:duplicateParentState="true"
android:background="?android:attr/selectableItemBackground"
android:paddingLeft="@dimen/editor_round_button_padding_left"
diff --git a/res/layout/edit_kind_title.xml b/res/layout/edit_kind_title.xml
index 8901d5b..f178876 100644
--- a/res/layout/edit_kind_title.xml
+++ b/res/layout/edit_kind_title.xml
@@ -17,34 +17,23 @@
*/
-->
-<LinearLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="24dip"
+ android:layout_height="32dip"
android:paddingLeft="8dip"
android:paddingRight="8dip"
- android:paddingBottom="4dip"
- android:orientation="vertical">
+ android:focusable="false">
<TextView
android:id="@+id/kind_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/editor_kind_title_left_padding"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ style="?android:attr/listSeparatorTextViewStyle"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:background="@drawable/list_section_divider_holo_custom"
android:textColor="@color/people_app_theme_color"
- android:textStyle="bold"
android:textAllCaps="true"
android:singleLine="true"
- android:ellipsize="end"
- android:layout_gravity="center_vertical" />
+ android:ellipsize="end" />
- <ImageView
- android:id="@+id/divider"
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:scaleType="fitXY"
- android:src="@color/people_app_theme_color"/>
-
-</LinearLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/edit_spinner.xml b/res/layout/edit_spinner.xml
index 0f3ed23..b986913 100644
--- a/res/layout/edit_spinner.xml
+++ b/res/layout/edit_spinner.xml
@@ -23,5 +23,5 @@
android:layout_gravity="top"
android:layout_width="@dimen/editor_type_label_width"
android:layout_height="@dimen/editor_min_line_item_height"
- android:paddingLeft="8dip"
- android:paddingRight="20dip"/>
\ No newline at end of file
+ android:paddingLeft="0dip"
+ android:paddingRight="10dip"/>
\ No newline at end of file
diff --git a/res/layout/editor_account_header.xml b/res/layout/editor_account_header.xml
index dd4bc30..b6b19db 100644
--- a/res/layout/editor_account_header.xml
+++ b/res/layout/editor_account_header.xml
@@ -25,7 +25,7 @@
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:paddingLeft="@dimen/account_container_left_padding"
- android:paddingRight="16dip">
+ android:paddingRight="32dip">
<LinearLayout
android:id="@+id/account"
diff --git a/res/layout/editor_account_header_with_dropdown.xml b/res/layout/editor_account_header_with_dropdown.xml
new file mode 100644
index 0000000..74abee9
--- /dev/null
+++ b/res/layout/editor_account_header_with_dropdown.xml
@@ -0,0 +1,71 @@
+<?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:id="@+id/account_container"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:minHeight="48dip"
+ android:background="#EEEEEE"
+ android:orientation="horizontal"
+ android:paddingLeft="@dimen/account_container_left_padding"
+ android:paddingRight="32dip">
+
+ <LinearLayout
+ android:id="@+id/account"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:orientation="vertical"
+ style="?android:attr/spinnerStyle">
+
+ <TextView
+ android:id="@+id/account_type"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:singleLine="true" />
+
+ <TextView
+ android:id="@+id/account_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="8dip"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorTertiary"
+ android:singleLine="true" />
+
+ </LinearLayout>
+
+ <!-- Spacer between the account type / name dropdown and the account icon -->
+ <View
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="1"/>
+
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/account_icon"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:layout_gravity="center_vertical" />
+
+ </FrameLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/event_field_editor_view.xml b/res/layout/event_field_editor_view.xml
index 6903772..560b9e1 100644
--- a/res/layout/event_field_editor_view.xml
+++ b/res/layout/event_field_editor_view.xml
@@ -19,7 +19,7 @@
<com.android.contacts.editor.EventFieldEditorView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/editor_min_line_item_height"
android:orientation="vertical">
<LinearLayout
@@ -38,10 +38,10 @@
<Spinner
android:id="@+id/spinner"
android:layout_width="@dimen/editor_type_label_width"
- android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="20dip"
+ android:layout_height="match_parent"
android:layout_gravity="bottom"
+ android:paddingLeft="0dip"
+ android:paddingRight="10dip"
android:visibility="gone"/>
<include
diff --git a/res/layout/external_raw_contact_editor_view.xml b/res/layout/external_raw_contact_editor_view.xml
index 24e8322..a1e0754 100644
--- a/res/layout/external_raw_contact_editor_view.xml
+++ b/res/layout/external_raw_contact_editor_view.xml
@@ -43,17 +43,24 @@
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"/>
- <FrameLayout
+ <LinearLayout
android:id="@+id/stub_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginRight="8dip">
+ android:layout_marginRight="8dip"
+ android:orientation="horizontal">
<include
android:id="@+id/edit_photo"
layout="@layout/item_photo_editor" />
- </FrameLayout>
+ <ImageView
+ android:src="@drawable/account_spinner_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/group_browse_list_item.xml b/res/layout/group_browse_list_item.xml
index 88ff575..cc388f7 100644
--- a/res/layout/group_browse_list_item.xml
+++ b/res/layout/group_browse_list_item.xml
@@ -51,6 +51,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dip"
+ android:paddingLeft="8dip"
android:paddingBottom="8dip"
android:duplicateParentState="true"
android:background="@drawable/group_list_item_background"
diff --git a/res/layout/item_group_membership.xml b/res/layout/item_group_membership.xml
index b6d11f2..57eda71 100644
--- a/res/layout/item_group_membership.xml
+++ b/res/layout/item_group_membership.xml
@@ -27,13 +27,13 @@
style="?android:attr/spinnerStyle"
android:id="@+id/group_list"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/editor_min_line_item_height"
android:layout_marginLeft="@dimen/editor_field_left_padding"
android:layout_marginRight="@dimen/editor_field_left_padding"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="left|center_vertical"
android:ellipsize="end"
android:focusable="true"
- android:paddingLeft="16dip" />
+ android:paddingLeft="12dip" />
</com.android.contacts.editor.GroupMembershipView>
diff --git a/res/layout/item_photo_editor.xml b/res/layout/item_photo_editor.xml
index a41b007..7cfb35d 100644
--- a/res/layout/item_photo_editor.xml
+++ b/res/layout/item_photo_editor.xml
@@ -17,8 +17,8 @@
<view
class="com.android.contacts.editor.PhotoEditorView"
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="42dip"
- android:layout_height="42dip"
+ android:layout_width="48dip"
+ android:layout_height="48dip"
>
<ImageView
android:id="@+id/photo"
diff --git a/res/layout/list_separator.xml b/res/layout/list_separator.xml
index 39de1da..2aeb1ba 100644
--- a/res/layout/list_separator.xml
+++ b/res/layout/list_separator.xml
@@ -14,31 +14,23 @@
limitations under the License.
-->
-<!-- Layout used for list separators. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:orientation="vertical"
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
android:layout_height="32dip"
- android:divider="?android:attr/dividerVertical"
android:paddingLeft="16dip"
- android:paddingRight="16dip">
+ android:paddingRight="16dip"
+ android:focusable="false">
<TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="8dip"
+ android:id="@+id/title"
+ style="?android:attr/listSeparatorTextViewStyle"
android:paddingLeft="8dip"
- android:textStyle="bold"
+ android:paddingRight="8dip"
+ android:background="@drawable/list_section_divider_holo_custom"
+ android:textColor="@color/people_app_theme_color"
android:textAllCaps="true"
android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/people_app_theme_color"
- android:gravity="left|center_vertical"
- android:id="@+id/header_text" />
+ android:ellipsize="end" />
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="@color/people_app_theme_color" />
-
-</LinearLayout>
\ No newline at end of file
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/raw_contact_editor_view.xml b/res/layout/raw_contact_editor_view.xml
index 66feb27..5180557 100644
--- a/res/layout/raw_contact_editor_view.xml
+++ b/res/layout/raw_contact_editor_view.xml
@@ -22,7 +22,7 @@
android:paddingTop="@dimen/editor_padding_top">
<include
- layout="@layout/editor_account_header" />
+ layout="@layout/editor_account_header_with_dropdown" />
<LinearLayout
android:id="@+id/body"
@@ -52,17 +52,24 @@
</LinearLayout>
- <FrameLayout
+ <LinearLayout
android:id="@+id/stub_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginRight="16dip">
+ android:layout_marginRight="8dip"
+ android:orientation="horizontal">
<include
android:id="@+id/edit_photo"
layout="@layout/item_photo_editor" />
- </FrameLayout>
+ <ImageView
+ android:src="@drawable/account_spinner_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/stream_item_container.xml b/res/layout/stream_item_container.xml
index 6a65357..308c5f5 100644
--- a/res/layout/stream_item_container.xml
+++ b/res/layout/stream_item_container.xml
@@ -25,17 +25,19 @@
android:id="@+id/stream_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/detail_update_section_item_vertical_padding"
- android:paddingBottom="@dimen/detail_update_section_item_vertical_padding"
android:paddingLeft="@dimen/detail_update_section_item_horizontal_padding"
android:paddingRight="@dimen/detail_update_section_item_horizontal_padding"
+ android:paddingTop="@dimen/detail_update_section_item_vertical_padding"
+ android:paddingBottom="@dimen/detail_update_section_item_vertical_padding"
android:background="?android:attr/selectableItemBackground"
+ android:layout_gravity="center_vertical"
/>
<View
android:id="@+id/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="1px"
- android:background="?android:attr/dividerHorizontal" />
+ android:background="?android:attr/dividerHorizontal"
+ android:layout_gravity="bottom" />
</LinearLayout>
diff --git a/res/layout/stream_item_row_image_and_text.xml b/res/layout/stream_item_row_image_and_text.xml
index ea87ff0..3642592 100644
--- a/res/layout/stream_item_row_image_and_text.xml
+++ b/res/layout/stream_item_row_image_and_text.xml
@@ -16,9 +16,7 @@
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:paddingBottom="@dimen/detail_update_section_between_items_vertical_padding"
- android:paddingTop="@dimen/detail_update_section_between_items_vertical_padding">
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts">
<view
class="com.android.contacts.widget.ProportionalLayout"
diff --git a/res/layout/stream_item_row_text_only.xml b/res/layout/stream_item_row_text_only.xml
index d1d0efd..7b1f255 100644
--- a/res/layout/stream_item_row_text_only.xml
+++ b/res/layout/stream_item_row_text_only.xml
@@ -17,8 +17,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingBottom="@dimen/detail_update_section_between_items_vertical_padding">
+ android:orientation="vertical">
<TextView android:id="@+id/stream_item_html"
android:layout_width="match_parent"
diff --git a/res/layout/stream_item_row_two_images.xml b/res/layout/stream_item_row_two_images.xml
index f127129..f10b7d8 100644
--- a/res/layout/stream_item_row_two_images.xml
+++ b/res/layout/stream_item_row_two_images.xml
@@ -16,8 +16,7 @@
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:paddingBottom="@dimen/detail_update_section_between_items_vertical_padding">
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts">
<view
class="com.android.contacts.widget.ProportionalLayout"
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index e187a9e..f446c24 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -18,7 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="-2dip"
android:orientation="vertical">
<LinearLayout
diff --git a/res/layout/updates_title.xml b/res/layout/updates_title.xml
deleted file mode 100644
index 995a3b9..0000000
--- a/res/layout/updates_title.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:text="@string/recent_updates"
- android:textColor="@color/detail_kind_title_color"
- android:textStyle="bold"
- android:textAllCaps="true"
- android:singleLine="true"
- android:ellipsize="end"
- style="@style/UpdatesTitleStyle"/>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="@color/detail_kind_title_color"/>
-
-</LinearLayout>
diff --git a/res/layout/dialpad_activity.xml b/res/values-sw580dp-w1000dp-port/dimens.xml
similarity index 63%
rename from res/layout/dialpad_activity.xml
rename to res/values-sw580dp-w1000dp-port/dimens.xml
index 93e9523..767fda4 100644
--- a/res/layout/dialpad_activity.xml
+++ b/res/values-sw580dp-w1000dp-port/dimens.xml
@@ -13,13 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
->
- <fragment class="com.android.contacts.dialpad.DialpadFragment"
- android:id="@+id/dialpad_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-</FrameLayout>
+<resources>
+ <dimen name="contact_detail_list_top_padding">8dip</dimen>
+</resources>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index ef0e04f..551a930 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -21,7 +21,7 @@
<dimen name="editor_round_button_padding_right">16dip</dimen>
<dimen name="editor_kind_title_left_padding">16dip</dimen>
<dimen name="editor_add_field_label_left_padding">24dip</dimen>
- <dimen name="detail_item_side_margin">16dip</dimen>
+ <dimen name="detail_item_side_margin">0dip</dimen>
<dimen name="detail_item_vertical_margin">16dip</dimen>
<dimen name="detail_item_icon_margin">8dip</dimen>
<dimen name="contact_name_text_size">26sp</dimen>
@@ -32,7 +32,7 @@
<dimen name="shortcut_icon_size">64dip</dimen>
<dimen name="list_section_height">37dip</dimen>
<dimen name="group_detail_border_padding">16dip</dimen>
- <dimen name="detail_update_section_side_padding">16dip</dimen>
+ <dimen name="detail_update_section_side_padding">0dip</dimen>
<dimen name="detail_update_section_item_horizontal_padding">8dip</dimen>
<dimen name="detail_update_section_item_vertical_padding">16dip</dimen>
<dimen name="detail_update_section_between_items_vertical_padding">16dip</dimen>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index 8e56bac..33bb632 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -123,7 +123,7 @@
<item name="android:layout_height">200dip</item>
</style>
- <style name="BackgroundOnly" parent="@android:Theme.Holo.Light">
+ <style name="BackgroundOnlyTheme" parent="@android:Theme.Holo.Light">
<item name="android:windowBackground">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@null</item>
@@ -132,10 +132,4 @@
<item name="android:windowIsFloating">true</item>
</style>
- <style name="UpdatesTitleStyle">
- <item name="android:paddingLeft">8dip</item>
- <item name="android:layout_height">16dip</item>
- <item name="android:layout_gravity">center_vertical</item>
- <item name="android:gravity">center_vertical</item>
- </style>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 419e9ce..13bb791 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -33,10 +33,10 @@
<dimen name="editor_padding_top">0dip</dimen>
<!-- Padding of the rounded plus/minus/expand/collapse buttons in the editor -->
- <dimen name="editor_round_button_padding_left">2dip</dimen>
- <dimen name="editor_round_button_padding_right">2dip</dimen>
- <dimen name="editor_round_button_padding_top">4dip</dimen>
- <dimen name="editor_round_button_padding_bottom">4dip</dimen>
+ <dimen name="editor_round_button_padding_left">8dip</dimen>
+ <dimen name="editor_round_button_padding_right">8dip</dimen>
+ <dimen name="editor_round_button_padding_top">8dip</dimen>
+ <dimen name="editor_round_button_padding_bottom">8dip</dimen>
<!-- Left padding of the kind title in the contact editor -->
<dimen name="editor_kind_title_left_padding">8dip</dimen>
@@ -81,7 +81,7 @@
<dimen name="detail_header_view_margin">8dip</dimen>
<!-- Height of the tab text label in the tab carousel on the contact detail page -->
- <dimen name="detail_tab_carousel_tab_label_height">48dip</dimen>
+ <dimen name="detail_tab_carousel_tab_label_height">45dip</dimen>
<!-- Height of the tab text label in the tab carousel on the contact detail page -->
<dimen name="detail_tab_carousel_tab_label_indent">24dip</dimen>
@@ -114,7 +114,7 @@
<dimen name="detail_update_section_item_last_row_extra_vertical_padding">0dip</dimen>
<!-- Horizontal padding for individual stream items -->
- <dimen name="detail_update_section_item_horizontal_padding">24dip</dimen>
+ <dimen name="detail_update_section_item_horizontal_padding">8dip</dimen>
<!-- Horizontal padding between columns images and/or text in a single stream item -->
<dimen name="detail_update_section_between_items_horizontal_padding">16dip</dimen>
@@ -125,7 +125,6 @@
<!-- Horizontal padding between attribution and comments -->
<dimen name="detail_update_section_attribution_comments_padding">4dip</dimen>
-
<!-- Margin around the contact's photo on the contact card -->
<dimen name="detail_contact_photo_margin">16dip</dimen>
@@ -139,7 +138,7 @@
<dimen name="detail_item_side_margin">16dip</dimen>
<!-- Top and bottom padding for a contact detail item -->
- <dimen name="detail_item_vertical_margin">12dip</dimen>
+ <dimen name="detail_item_vertical_margin">8dip</dimen>
<!-- Minimum height of a row in the contact detail -->
<dimen name="detail_min_line_item_height">48dip</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 51b2c0c..dc209c5 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -92,7 +92,7 @@
<item name="android:textColorSecondary">@color/secondary_text_color</item>
</style>
- <style name="BackgroundOnly">
+ <style name="BackgroundOnlyTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:windowBackground">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@null</item>
@@ -279,10 +279,4 @@
<item name="android:displayOptions"></item>
</style>
- <style name="UpdatesTitleStyle">
- <item name="android:paddingLeft">8dip</item>
- <item name="android:paddingTop">5dip</item>
- <item name="android:paddingBottom">2dip</item>
- </style>
-
</resources>
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java
index a28b1db..0addb07 100644
--- a/src/com/android/contacts/ContactLoader.java
+++ b/src/com/android/contacts/ContactLoader.java
@@ -74,6 +74,7 @@
private static final String TAG = "ContactLoader";
private Uri mLookupUri;
+ private final Uri mRequestedUri;
private boolean mLoadGroupMetaData;
private boolean mLoadStreamItems;
private final boolean mLoadInvitableAccountTypes;
@@ -95,6 +96,7 @@
*/
public static final Result NOT_FOUND = new Result((Exception) null);
+ private final Uri mRequestedUri;
private final Uri mLookupUri;
private final Uri mUri;
private final long mDirectoryId;
@@ -134,6 +136,7 @@
* Constructor for special results, namely "no contact found" and "error".
*/
private Result(Exception exception) {
+ mRequestedUri = null;
mLookupUri = null;
mUri = null;
mDirectoryId = -1;
@@ -165,12 +168,13 @@
/**
* Constructor to call when contact was found
*/
- private Result(Uri uri, Uri lookupUri, long directoryId, String lookupKey, long id,
- long nameRawContactId, int displayNameSource, long photoId, String photoUri,
- String displayName, String altDisplayName, String phoneticName, boolean starred,
- Integer presence, boolean sendToVoicemail, String customRingtone,
+ private Result(Uri requestedUri, Uri uri, Uri lookupUri, long directoryId, String lookupKey,
+ long id, long nameRawContactId, int displayNameSource, long photoId,
+ String photoUri, String displayName, String altDisplayName, String phoneticName,
+ boolean starred, Integer presence, boolean sendToVoicemail, String customRingtone,
boolean isUserProfile) {
mException = null;
+ mRequestedUri = requestedUri;
mLookupUri = lookupUri;
mUri = uri;
mDirectoryId = directoryId;
@@ -196,6 +200,7 @@
private Result(Result from) {
mException = from.mException;
+ mRequestedUri = from.mRequestedUri;
mLookupUri = from.mLookupUri;
mUri = from.mUri;
mDirectoryId = from.mDirectoryId;
@@ -250,6 +255,11 @@
mPhotoBinaryData = photoBinaryData;
}
+ /**
+ * Returns the URI for the contact that contains both the lookup key and the ID. This is
+ * the best URI to reference a contact.
+ * For directory contacts, this is the same a the URI as returned by {@link #getUri()}
+ */
public Uri getLookupUri() {
return mLookupUri;
}
@@ -258,10 +268,23 @@
return mLookupKey;
}
+ /**
+ * Returns the contact Uri that was passed to the provider to make the query. This is
+ * the same as the requested Uri, unless the requested Uri doesn't specify a Contact:
+ * If it either references a Raw-Contact or a Person (a pre-Eclair style Uri), this Uri will
+ * always reference the full aggregate contact.
+ */
public Uri getUri() {
return mUri;
}
+ /**
+ * Returns the URI for which this {@link ContactLoader) was initially requested.
+ */
+ public Uri getRequestedUri() {
+ return mRequestedUri;
+ }
+
@VisibleForTesting
/*package*/ long getId() {
return mId;
@@ -850,8 +873,8 @@
lookupUri = contactUri;
}
- return new Result(contactUri, lookupUri, directoryId, lookupKey, contactId,
- nameRawContactId, displayNameSource, photoId, photoUri, displayName,
+ return new Result(mRequestedUri, contactUri, lookupUri, directoryId, lookupKey,
+ contactId, nameRawContactId, displayNameSource, photoId, photoUri, displayName,
altDisplayName, phoneticName, starred, presence, sendToVoicemail,
customRingtone, isUserProfile);
}
@@ -1217,6 +1240,7 @@
boolean loadStreamItems, boolean loadInvitableAccountTypes) {
super(context);
mLookupUri = lookupUri;
+ mRequestedUri = lookupUri;
mLoadGroupMetaData = loadGroupMetaData;
mLoadStreamItems = loadStreamItems;
mLoadInvitableAccountTypes = loadInvitableAccountTypes;
@@ -1240,7 +1264,7 @@
@Override
protected void onForceLoad() {
final LoadContactTask task = new LoadContactTask();
- task.execute((Void[])null);
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[])null);
}
@Override
diff --git a/src/com/android/contacts/calllog/CallLogAdapter.java b/src/com/android/contacts/calllog/CallLogAdapter.java
index 94daf06..604d528 100644
--- a/src/com/android/contacts/calllog/CallLogAdapter.java
+++ b/src/com/android/contacts/calllog/CallLogAdapter.java
@@ -541,6 +541,7 @@
if (section == CallLogQuery.SECTION_NEW_HEADER
|| section == CallLogQuery.SECTION_OLD_HEADER) {
views.listItemView.setVisibility(View.GONE);
+ views.bottomDivider.setVisibility(View.GONE);
views.listHeaderView.setVisibility(View.VISIBLE);
views.listHeaderTextView.setText(
section == CallLogQuery.SECTION_NEW_HEADER
@@ -551,6 +552,7 @@
}
// Default case: an item in the call log.
views.listItemView.setVisibility(View.VISIBLE);
+ views.bottomDivider.setVisibility(isLastOfSection(c) ? View.GONE : View.VISIBLE);
views.listHeaderView.setVisibility(View.GONE);
final String number = c.getString(CallLogQuery.NUMBER);
@@ -654,6 +656,16 @@
}
}
+ /** Returns true if this is the last item of a section. */
+ private boolean isLastOfSection(Cursor c) {
+ if (c.isLast()) return true;
+ final int section = c.getInt(CallLogQuery.SECTION);
+ if (!c.moveToNext()) return true;
+ final int nextSection = c.getInt(CallLogQuery.SECTION);
+ c.moveToPrevious();
+ return section != nextSection;
+ }
+
/** Checks whether the contact info from the call log matches the one from the contacts db. */
private boolean callLogInfoMatches(ContactInfo callLogInfo, ContactInfo info) {
// The call log only contains a subset of the fields in the contacts db.
diff --git a/src/com/android/contacts/calllog/CallLogFragment.java b/src/com/android/contacts/calllog/CallLogFragment.java
index 83f44d0..59deff4 100644
--- a/src/com/android/contacts/calllog/CallLogFragment.java
+++ b/src/com/android/contacts/calllog/CallLogFragment.java
@@ -16,6 +16,7 @@
package com.android.contacts.calllog;
+import com.android.common.io.MoreCloseables;
import com.android.contacts.ContactsUtils;
import com.android.contacts.R;
import com.android.contacts.activities.DialtactsActivity.ViewPagerVisibilityListener;
@@ -26,6 +27,7 @@
import com.android.internal.telephony.CallerInfo;
import com.android.internal.telephony.ITelephony;
+import android.app.Activity;
import android.app.KeyguardManager;
import android.app.ListFragment;
import android.content.Context;
@@ -64,6 +66,8 @@
private boolean mScrollToTop;
private boolean mShowOptionsMenu;
+ /** Whether there is at least one voicemail source installed. */
+ private boolean mVoicemailSourcesAvailable = false;
/** Whether we are currently filtering over voicemail. */
private boolean mShowingVoicemailOnly = false;
@@ -112,6 +116,23 @@
return;
}
updateVoicemailStatusMessage(statusCursor);
+
+ int activeSources = mVoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor);
+ Log.d(TAG, "Num active sources: " + activeSources);
+ setVoicemailSourcesAvailable(activeSources != 0);
+ MoreCloseables.closeQuietly(statusCursor);
+ }
+
+ /** Sets whether there are any voicemail sources available in the platform. */
+ private void setVoicemailSourcesAvailable(boolean voicemailSourcesAvailable) {
+ if (mVoicemailSourcesAvailable == voicemailSourcesAvailable) return;
+ mVoicemailSourcesAvailable = voicemailSourcesAvailable;
+
+ Activity activity = getActivity();
+ if (activity != null) {
+ // This is so that the options menu content is updated.
+ activity.invalidateOptionsMenu();
+ }
}
@Override
@@ -219,8 +240,10 @@
@Override
public void onPrepareOptionsMenu(Menu menu) {
if (mShowOptionsMenu) {
- menu.findItem(R.id.show_voicemails_only).setVisible(!mShowingVoicemailOnly);
- menu.findItem(R.id.show_all_calls).setVisible(mShowingVoicemailOnly);
+ menu.findItem(R.id.show_voicemails_only).setVisible(
+ mVoicemailSourcesAvailable && !mShowingVoicemailOnly);
+ menu.findItem(R.id.show_all_calls).setVisible(
+ mVoicemailSourcesAvailable && mShowingVoicemailOnly);
}
}
diff --git a/src/com/android/contacts/calllog/CallLogListItemViews.java b/src/com/android/contacts/calllog/CallLogListItemViews.java
index 847e354..938b2e3 100644
--- a/src/com/android/contacts/calllog/CallLogListItemViews.java
+++ b/src/com/android/contacts/calllog/CallLogListItemViews.java
@@ -47,11 +47,13 @@
public final View listHeaderView;
/** The text of the header of a section. */
public final TextView listHeaderTextView;
+ /** The divider to be shown below items. */
+ public final View bottomDivider;
private CallLogListItemViews(QuickContactBadge quickContactView, View primaryActionView,
ImageView secondaryActionView, View unheardView, View dividerView,
PhoneCallDetailsViews phoneCallDetailsViews, View listItemView,
- View listHeaderView, TextView listHeaderTextView) {
+ View listHeaderView, TextView listHeaderTextView, View bottomDivider) {
this.quickContactView = quickContactView;
this.primaryActionView = primaryActionView;
this.secondaryActionView = secondaryActionView;
@@ -61,6 +63,7 @@
this.listItemView = listItemView;
this.listHeaderView = listHeaderView;
this.listHeaderTextView = listHeaderTextView;
+ this.bottomDivider = bottomDivider;
}
public static CallLogListItemViews fromView(View view) {
@@ -73,7 +76,8 @@
PhoneCallDetailsViews.fromView(view),
view.findViewById(R.id.call_log_item),
view.findViewById(R.id.call_log_header),
- (TextView) view.findViewById(R.id.call_log_header_text));
+ (TextView) view.findViewById(R.id.call_log_header_text),
+ view.findViewById(R.id.call_log_divider));
}
public static CallLogListItemViews createForTest(Context context) {
@@ -86,6 +90,7 @@
PhoneCallDetailsViews.createForTest(context),
new View(context),
new View(context),
- new TextView(context));
+ new TextView(context),
+ new View(context));
}
}
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 0e3f100..a87f886 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -1401,7 +1401,6 @@
* {@link DetailViewEntry}
*/
private static class DetailViewCache {
- public final TextView kind;
public final TextView type;
public final TextView data;
public final TextView footer;
@@ -1415,7 +1414,6 @@
public DetailViewCache(View view,
OnClickListener primaryActionClickListener,
OnClickListener secondaryActionClickListener) {
- kind = (TextView) view.findViewById(R.id.kind);
type = (TextView) view.findViewById(R.id.type);
data = (TextView) view.findViewById(R.id.data);
footer = (TextView) view.findViewById(R.id.footer);
@@ -1535,8 +1533,8 @@
final KindTitleViewEntry entry = (KindTitleViewEntry) getItem(position);
final View result = (convertView != null) ? convertView :
- mInflater.inflate(R.layout.contact_detail_kind_title_entry_view, parent, false);
- final TextView titleTextView = (TextView) result.findViewById(R.id.kind);
+ mInflater.inflate(R.layout.list_separator, parent, false);
+ final TextView titleTextView = (TextView) result.findViewById(R.id.title);
titleTextView.setText(entry.getTitle());
return result;
diff --git a/src/com/android/contacts/detail/ContactLoaderFragment.java b/src/com/android/contacts/detail/ContactLoaderFragment.java
index ac22677..9417ee7 100644
--- a/src/com/android/contacts/detail/ContactLoaderFragment.java
+++ b/src/com/android/contacts/detail/ContactLoaderFragment.java
@@ -183,7 +183,7 @@
@Override
public void onLoadFinished(Loader<ContactLoader.Result> loader, ContactLoader.Result data) {
- if (!mLookupUri.equals(data.getUri())) {
+ if (!mLookupUri.equals(data.getRequestedUri())) {
return;
}
diff --git a/src/com/android/contacts/detail/StreamItemAdapter.java b/src/com/android/contacts/detail/StreamItemAdapter.java
index 6586b23..c923cf8 100644
--- a/src/com/android/contacts/detail/StreamItemAdapter.java
+++ b/src/com/android/contacts/detail/StreamItemAdapter.java
@@ -27,6 +27,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
+import android.widget.TextView;
import java.util.List;
@@ -101,7 +102,10 @@
return mInflater.inflate(R.layout.updates_header_contact, null);
}
if (position == 1) {
- return mInflater.inflate(R.layout.updates_title, null);
+ final View titleView = mInflater.inflate(R.layout.list_separator, null);
+ TextView titleTextView = (TextView) titleView.findViewById(R.id.title);
+ titleTextView.setText(mContext.getString(R.string.recent_updates));
+ return titleView;
}
final StreamItemEntry streamItem = (StreamItemEntry) getItem(position);
final AccountTypeManager manager = AccountTypeManager.getInstance(mContext);
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 87fcfe0..9abcef1 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -670,6 +670,8 @@
} else {
disableAccountSwitcher(editor);
}
+ } else {
+ disableAccountSwitcher(editor);
}
editor.setEnabled(mEnabled);
@@ -1658,6 +1660,15 @@
@Override
public void onSplitContactConfirmed() {
+ if (mState == null) {
+ // This may happen when this Fragment is recreated by the system during users
+ // confirming the split action (and thus this method is called just before onCreate()),
+ // for example.
+ Log.e(TAG, "mState became null during the user's confirming split action. " +
+ "Cannot perform the save action.");
+ return;
+ }
+
mState.markRawContactsForSplitting();
save(SaveMode.SPLIT);
}
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index 1bea060..ff0af6f 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -35,6 +35,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
+import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -515,6 +516,7 @@
textView.setGravity(Gravity.RIGHT | Gravity.CENTER_VERTICAL);
textView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
textView.setTextColor(mTextColor);
+ textView.setEllipsize(TruncateAt.MIDDLE);
} else {
textView = (TextView) convertView;
}
diff --git a/src/com/android/contacts/list/ContactTileAdapter.java b/src/com/android/contacts/list/ContactTileAdapter.java
index 0755376..304b109 100644
--- a/src/com/android/contacts/list/ContactTileAdapter.java
+++ b/src/com/android/contacts/list/ContactTileAdapter.java
@@ -404,13 +404,11 @@
*/
private View getDivider() {
View dividerView = View.inflate(mContext, R.layout.list_separator, null);
- dividerView.setFocusable(false);
- TextView text = (TextView) dividerView.findViewById(R.id.header_text);
+ TextView text = (TextView) dividerView.findViewById(R.id.title);
text.setText(mDisplayType == DisplayType.STREQUENT_PHONE_ONLY ?
mContext.getString(R.string.favoritesFrequentCalled) :
mContext.getString(R.string.favoritesFrequentContacted));
-
return dividerView;
}
diff --git a/src/com/android/contacts/model/BaseAccountType.java b/src/com/android/contacts/model/BaseAccountType.java
index aafa3ea..eee7241 100644
--- a/src/com/android/contacts/model/BaseAccountType.java
+++ b/src/com/android/contacts/model/BaseAccountType.java
@@ -65,7 +65,7 @@
public BaseAccountType() {
this.accountType = null;
this.dataSet = null;
- this.titleRes = R.string.account_phone;
+ this.titleRes = R.string.local_profile_title;
this.iconRes = R.mipmap.ic_launcher_contacts;
}
@@ -344,7 +344,7 @@
protected DataKind addDataKindNote(Context context) {
DataKind kind = addKind(new DataKind(Note.CONTENT_ITEM_TYPE,
R.string.label_notes, -1, 110, true,
- R.layout.text_fields_editor_view, android.R.style.TextAppearance_Medium));
+ R.layout.text_fields_editor_view, android.R.style.TextAppearance_Small));
kind.isList = false;
kind.actionHeader = new SimpleInflater(R.string.label_notes);
kind.actionBody = new SimpleInflater(Note.NOTE);
diff --git a/src/com/android/contacts/model/FallbackAccountType.java b/src/com/android/contacts/model/FallbackAccountType.java
index 8bb3992..a40828e 100644
--- a/src/com/android/contacts/model/FallbackAccountType.java
+++ b/src/com/android/contacts/model/FallbackAccountType.java
@@ -25,7 +25,7 @@
public FallbackAccountType(Context context) {
this.accountType = null;
this.dataSet = null;
- this.titleRes = R.string.account_phone;
+ this.titleRes = R.string.local_profile_title;
this.iconRes = R.mipmap.ic_launcher_contacts;
this.resPackageName = null;
diff --git a/src/com/android/contacts/quickcontact/DataAction.java b/src/com/android/contacts/quickcontact/DataAction.java
index 109e8b0..2066997 100644
--- a/src/com/android/contacts/quickcontact/DataAction.java
+++ b/src/com/android/contacts/quickcontact/DataAction.java
@@ -3,7 +3,6 @@
import com.android.contacts.ContactsUtils;
import com.android.contacts.R;
import com.android.contacts.model.AccountType.EditType;
-import com.android.contacts.model.AccountTypeManager;
import com.android.contacts.model.DataKind;
import com.android.contacts.util.Constants;
import com.android.contacts.util.PhoneCapabilityTester;
@@ -179,14 +178,11 @@
final boolean isAudioChatCapable =
(chatCapability & Im.CAPABILITY_HAS_VOICE) != 0;
if (isVideoChatCapable || isAudioChatCapable) {
- final AccountTypeManager accountTypes = AccountTypeManager.getInstance(
- context.getApplicationContext());
mAlternateIntent = new Intent(
Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?call"));
- // Use Holo dark theme since the background is darker than usual.
mAlternateIconRes = (isVideoChatCapable
- ? R.drawable.sym_action_videochat_holo_dark
- : R.drawable.sym_action_audiochat_holo_dark);
+ ? R.drawable.sym_action_videochat_holo_light
+ : R.drawable.sym_action_audiochat_holo_light);
}
}
}
@@ -297,16 +293,13 @@
Log.e(TAG, "t must be DataAction");
return false;
}
- DataAction other = (DataAction)t;
- if (!ContactsUtils.areObjectsEqual(mKind, other.mKind)) {
+ DataAction that = (DataAction)t;
+ if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, that.mMimeType,
+ that.mBody)) {
return false;
}
- if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, other.mMimeType,
- other.mBody)) {
- return false;
- }
- if (!TextUtils.equals(mMimeType, other.mMimeType)
- || !ContactsUtils.areIntentActionEqual(mIntent, other.mIntent)) {
+ if (!TextUtils.equals(mMimeType, that.mMimeType)
+ || !ContactsUtils.areIntentActionEqual(mIntent, that.mIntent)) {
return false;
}
return true;
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index f22369f..472f701 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -432,7 +432,7 @@
if (result == null) return;
photoView.setImageBitmap(result);
}
- }.execute();
+ }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
}
final int photoColumnIndex = cursor.getColumnIndex(Photo.PHOTO);
final byte[] photoBlob = cursor.getBlob(photoColumnIndex);
diff --git a/src/com/android/contacts/voicemail/VoicemailStatusHelper.java b/src/com/android/contacts/voicemail/VoicemailStatusHelper.java
index 1eab749..6664b88 100644
--- a/src/com/android/contacts/voicemail/VoicemailStatusHelper.java
+++ b/src/com/android/contacts/voicemail/VoicemailStatusHelper.java
@@ -74,8 +74,13 @@
* empty list is returned if no message needs to be shown.
* @param cursor The cursor pointing to the query on {@link Status#CONTENT_URI}. The projection
* to be used is defined by the implementation class of this interface.
- * The class takes over the ownership of the cursor and closes it after processing the
- * request.
*/
public List<StatusMessage> getStatusMessages(Cursor cursor);
+
+ /**
+ * Returns the number of active voicemail sources installed.
+ * <p>
+ * The number of sources is counted by querying the voicemail status table.
+ */
+ public int getNumberActivityVoicemailSources(Cursor cursor);
}
diff --git a/src/com/android/contacts/voicemail/VoicemailStatusHelperImpl.java b/src/com/android/contacts/voicemail/VoicemailStatusHelperImpl.java
index 7332e89..9e481f8 100644
--- a/src/com/android/contacts/voicemail/VoicemailStatusHelperImpl.java
+++ b/src/com/android/contacts/voicemail/VoicemailStatusHelperImpl.java
@@ -24,8 +24,8 @@
import static android.provider.VoicemailContract.Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION;
import static android.provider.VoicemailContract.Status.NOTIFICATION_CHANNEL_STATE_OK;
-import com.android.common.io.MoreCloseables;
import com.android.contacts.R;
+import com.android.contacts.util.UriUtils;
import android.database.Cursor;
import android.net.Uri;
@@ -154,20 +154,35 @@
@Override
public List<StatusMessage> getStatusMessages(Cursor cursor) {
- try {
- List<MessageStatusWithPriority> messages =
- new ArrayList<VoicemailStatusHelperImpl.MessageStatusWithPriority>();
- while(cursor.moveToNext()) {
- MessageStatusWithPriority message = getMessageForStatusEntry(cursor);
- if (message != null) {
- messages.add(message);
- }
+ List<MessageStatusWithPriority> messages =
+ new ArrayList<VoicemailStatusHelperImpl.MessageStatusWithPriority>();
+ cursor.moveToPosition(-1);
+ while(cursor.moveToNext()) {
+ MessageStatusWithPriority message = getMessageForStatusEntry(cursor);
+ if (message != null) {
+ messages.add(message);
}
- // Finally reorder the messages by their priority.
- return reorderMessages(messages);
- } finally {
- MoreCloseables.closeQuietly(cursor);
}
+ // Finally reorder the messages by their priority.
+ return reorderMessages(messages);
+ }
+
+ @Override
+ public int getNumberActivityVoicemailSources(Cursor cursor) {
+ int count = 0;
+ cursor.moveToPosition(-1);
+ while(cursor.moveToNext()) {
+ if (isVoicemailSourceActive(cursor)) {
+ ++count;
+ }
+ }
+ return count;
+ }
+
+ /** Returns whether the source status in the cursor corresponds to an active source. */
+ private boolean isVoicemailSourceActive(Cursor cursor) {
+ return cursor.getString(SOURCE_PACKAGE_INDEX) != null
+ && cursor.getInt(CONFIGURATION_STATE_INDEX) == Status.CONFIGURATION_STATE_OK;
}
private List<StatusMessage> reorderMessages(List<MessageStatusWithPriority> messageWrappers) {
@@ -205,9 +220,9 @@
Uri actionUri = null;
if (action == Action.CALL_VOICEMAIL) {
- actionUri = Uri.parse(cursor.getString(VOICEMAIL_ACCESS_URI_INDEX));
+ actionUri = UriUtils.parseUriOrNull(cursor.getString(VOICEMAIL_ACCESS_URI_INDEX));
} else if (action == Action.CONFIGURE_VOICEMAIL) {
- actionUri = Uri.parse(cursor.getString(SETTINGS_URI_INDEX));
+ actionUri = UriUtils.parseUriOrNull(cursor.getString(SETTINGS_URI_INDEX));
}
return new MessageStatusWithPriority(
new StatusMessage(sourcePackage, overallState.getCallLogMessageId(),