Merge "Updates fragment dejunk"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 43fd693..e604de1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -614,7 +614,8 @@
android:resource="@xml/social_widget_info" />
</receiver>
- <receiver android:name=".calllog.CallLogReceiver">
+ <receiver android:name=".calllog.CallLogReceiver"
+ android:enabled="@*android:bool/config_voice_capable">
<intent-filter>
<action android:name="android.intent.action.NEW_VOICEMAIL" />
<data
diff --git a/res/drawable-hdpi/ab_bottom_opaque_dark_holo.9.png b/res/drawable-hdpi/ab_bottom_opaque_dark_holo.9.png
deleted file mode 100644
index 4991dff..0000000
--- a/res/drawable-hdpi/ab_bottom_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/bg_blk_search_contact.9.png b/res/drawable-hdpi/bg_blk_search_contact.9.png
deleted file mode 100644
index db83477..0000000
--- a/res/drawable-hdpi/bg_blk_search_contact.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_contacts.png b/res/drawable-hdpi/ic_launcher_contacts.png
deleted file mode 100644
index f2657dc..0000000
--- a/res/drawable-hdpi/ic_launcher_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_phone.png b/res/drawable-hdpi/ic_launcher_phone.png
deleted file mode 100644
index 37ffb9c..0000000
--- a/res/drawable-hdpi/ic_launcher_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_contact.png b/res/drawable-hdpi/ic_launcher_shortcut_contact.png
deleted file mode 100644
index 2dc1014..0000000
--- a/res/drawable-hdpi/ic_launcher_shortcut_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_directdial.png b/res/drawable-hdpi/ic_launcher_shortcut_directdial.png
deleted file mode 100644
index b5c0dd9..0000000
--- a/res/drawable-hdpi/ic_launcher_shortcut_directdial.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png
deleted file mode 100644
index 10720e4..0000000
--- a/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_contact_holo_light.png b/res/drawable-hdpi/ic_menu_add_contact_holo_light.png
deleted file mode 100644
index 616dd2a..0000000
--- a/res/drawable-hdpi/ic_menu_add_contact_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_contacts_holo_light.png b/res/drawable-hdpi/ic_menu_contacts_holo_light.png
deleted file mode 100644
index 6327545..0000000
--- a/res/drawable-hdpi/ic_menu_contacts_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_item_divider.9.png b/res/drawable-hdpi/list_item_divider.9.png
deleted file mode 100644
index 60e2cb2..0000000
--- a/res/drawable-hdpi/list_item_divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_pressed_holo.9.png b/res/drawable-hdpi/list_pressed_holo.9.png
deleted file mode 100644
index dd183c0..0000000
--- a/res/drawable-hdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/magnifying_glass.png b/res/drawable-hdpi/magnifying_glass.png
deleted file mode 100755
index ac88fb4..0000000
--- a/res/drawable-hdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_focused.9.png b/res/drawable-hdpi/tab_focused.9.png
deleted file mode 100644
index a65b8f5..0000000
--- a/res/drawable-hdpi/tab_focused.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_left_arrow.png b/res/drawable-hdpi/tab_left_arrow.png
deleted file mode 100644
index c2274f1..0000000
--- a/res/drawable-hdpi/tab_left_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_pressed.9.png b/res/drawable-hdpi/tab_pressed.9.png
deleted file mode 100644
index 0f90065..0000000
--- a/res/drawable-hdpi/tab_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_right_arrow.png b/res/drawable-hdpi/tab_right_arrow.png
deleted file mode 100644
index 8a847e0..0000000
--- a/res/drawable-hdpi/tab_right_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_selected.9.png b/res/drawable-hdpi/tab_selected.9.png
deleted file mode 100644
index 08a39ff..0000000
--- a/res/drawable-hdpi/tab_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_unselected.9.png b/res/drawable-hdpi/tab_unselected.9.png
deleted file mode 100644
index 6150b5b..0000000
--- a/res/drawable-hdpi/tab_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ab_bottom_opaque_dark_holo.9.png b/res/drawable-mdpi/ab_bottom_opaque_dark_holo.9.png
deleted file mode 100644
index 15bef5d..0000000
--- a/res/drawable-mdpi/ab_bottom_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_blk_search_contact.9.png b/res/drawable-mdpi/bg_blk_search_contact.9.png
deleted file mode 100644
index 2694b5c..0000000
--- a/res/drawable-mdpi/bg_blk_search_contact.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_contacts.png b/res/drawable-mdpi/ic_launcher_contacts.png
deleted file mode 100644
index 6b06cac..0000000
--- a/res/drawable-mdpi/ic_launcher_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_phone.png b/res/drawable-mdpi/ic_launcher_phone.png
deleted file mode 100644
index 5ef8c40..0000000
--- a/res/drawable-mdpi/ic_launcher_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_contact.png b/res/drawable-mdpi/ic_launcher_shortcut_contact.png
deleted file mode 100644
index bce245c..0000000
--- a/res/drawable-mdpi/ic_launcher_shortcut_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_directdial.png b/res/drawable-mdpi/ic_launcher_shortcut_directdial.png
deleted file mode 100644
index e4649cf..0000000
--- a/res/drawable-mdpi/ic_launcher_shortcut_directdial.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png
deleted file mode 100644
index 4be34e5..0000000
--- a/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_contact_holo_light.png b/res/drawable-mdpi/ic_menu_add_contact_holo_light.png
deleted file mode 100644
index 0cfb71b..0000000
--- a/res/drawable-mdpi/ic_menu_add_contact_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_contacts_holo_light.png b/res/drawable-mdpi/ic_menu_contacts_holo_light.png
deleted file mode 100644
index 4a15754..0000000
--- a/res/drawable-mdpi/ic_menu_contacts_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_item_divider.9.png b/res/drawable-mdpi/list_item_divider.9.png
deleted file mode 100644
index 60e2cb2..0000000
--- a/res/drawable-mdpi/list_item_divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_pressed_holo.9.png b/res/drawable-mdpi/list_pressed_holo.9.png
deleted file mode 100644
index 9358dd8..0000000
--- a/res/drawable-mdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/magnifying_glass.png b/res/drawable-mdpi/magnifying_glass.png
deleted file mode 100755
index 2592ae0..0000000
--- a/res/drawable-mdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_focused.9.png b/res/drawable-mdpi/tab_focused.9.png
deleted file mode 100644
index 6190694..0000000
--- a/res/drawable-mdpi/tab_focused.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_left_arrow.png b/res/drawable-mdpi/tab_left_arrow.png
deleted file mode 100644
index e35d58d..0000000
--- a/res/drawable-mdpi/tab_left_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_pressed.9.png b/res/drawable-mdpi/tab_pressed.9.png
deleted file mode 100644
index dbada51..0000000
--- a/res/drawable-mdpi/tab_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_right_arrow.png b/res/drawable-mdpi/tab_right_arrow.png
deleted file mode 100644
index 8acbba0..0000000
--- a/res/drawable-mdpi/tab_right_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_selected.9.png b/res/drawable-mdpi/tab_selected.9.png
deleted file mode 100644
index b3c9fb1..0000000
--- a/res/drawable-mdpi/tab_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_unselected.9.png b/res/drawable-mdpi/tab_unselected.9.png
deleted file mode 100644
index a79fa2a..0000000
--- a/res/drawable-mdpi/tab_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ab_bottom_opaque_dark_holo.9.png b/res/drawable-xhdpi/ab_bottom_opaque_dark_holo.9.png
deleted file mode 100644
index 454e8b4..0000000
--- a/res/drawable-xhdpi/ab_bottom_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/bg_blk_search_contact.9.png b/res/drawable-xhdpi/bg_blk_search_contact.9.png
deleted file mode 100644
index fc3a05e..0000000
--- a/res/drawable-xhdpi/bg_blk_search_contact.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_contacts.png b/res/drawable-xhdpi/ic_launcher_contacts.png
deleted file mode 100644
index a2ba3bc..0000000
--- a/res/drawable-xhdpi/ic_launcher_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_phone.png b/res/drawable-xhdpi/ic_launcher_phone.png
deleted file mode 100644
index 2226b7b..0000000
--- a/res/drawable-xhdpi/ic_launcher_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_contact.png b/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
deleted file mode 100644
index a5a71fa..0000000
--- a/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png b/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
deleted file mode 100644
index b839084..0000000
--- a/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
deleted file mode 100644
index 35e1467..0000000
--- a/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png b/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png
deleted file mode 100644
index f018afd..0000000
--- a/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_contacts_holo_light.png b/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
deleted file mode 100644
index c054505..0000000
--- a/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_item_divider.9.png b/res/drawable-xhdpi/list_item_divider.9.png
deleted file mode 100644
index fd799ef..0000000
--- a/res/drawable-xhdpi/list_item_divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_pressed_holo.9.png b/res/drawable-xhdpi/list_pressed_holo.9.png
deleted file mode 100644
index d0fc7e0..0000000
--- a/res/drawable-xhdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/magnifying_glass.png b/res/drawable-xhdpi/magnifying_glass.png
deleted file mode 100644
index 9066772..0000000
--- a/res/drawable-xhdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_focused.9.png b/res/drawable-xhdpi/tab_focused.9.png
deleted file mode 100644
index b9aba3e..0000000
--- a/res/drawable-xhdpi/tab_focused.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_left_arrow.png b/res/drawable-xhdpi/tab_left_arrow.png
deleted file mode 100644
index 9a2eef2..0000000
--- a/res/drawable-xhdpi/tab_left_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_pressed.9.png b/res/drawable-xhdpi/tab_pressed.9.png
deleted file mode 100644
index 4a26f77..0000000
--- a/res/drawable-xhdpi/tab_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_right_arrow.png b/res/drawable-xhdpi/tab_right_arrow.png
deleted file mode 100644
index 64a20ff..0000000
--- a/res/drawable-xhdpi/tab_right_arrow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected.9.png b/res/drawable-xhdpi/tab_selected.9.png
deleted file mode 100644
index 045a9c7..0000000
--- a/res/drawable-xhdpi/tab_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected.9.png b/res/drawable-xhdpi/tab_unselected.9.png
deleted file mode 100644
index c11a765..0000000
--- a/res/drawable-xhdpi/tab_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/btn_star_holo_dark.xml b/res/drawable/btn_star_holo_dark.xml
deleted file mode 100644
index 2949de9..0000000
--- a/res/drawable/btn_star_holo_dark.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_checked="true" android:drawable="@drawable/btn_star_on_normal_holo_dark"/>
- <item android:drawable="@drawable/btn_star_off_normal_holo_dark"/>
-</selector>
\ No newline at end of file
diff --git a/res/drawable/tab_indicator_bg.xml b/res/drawable/tab_indicator_bg.xml
deleted file mode 100644
index fb54954..0000000
--- a/res/drawable/tab_indicator_bg.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- Non focused states -->
- <item
- android:state_focused="false"
- android:state_selected="false"
- android:state_pressed="false"
- android:drawable="@drawable/tab_unselected" />
- <item
- android:state_focused="false"
- android:state_selected="true"
- android:state_pressed="false"
- android:drawable="@drawable/tab_selected" />
-
- <!-- Focused states -->
- <item
- android:state_focused="true"
- android:state_selected="true"
- android:state_pressed="false"
- android:drawable="@drawable/tab_focused" />
-
- <!-- Pressed -->
- <item
- android:state_pressed="true"
- android:drawable="@drawable/tab_pressed" />
-
-</selector>
\ No newline at end of file
diff --git a/res/layout-sw580dp/contact_detail_container.xml b/res/layout-sw580dp/contact_detail_container.xml
index cdb789f..6ddc98d 100644
--- a/res/layout-sw580dp/contact_detail_container.xml
+++ b/res/layout-sw580dp/contact_detail_container.xml
@@ -17,7 +17,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical">
+ android:paddingLeft="16dip"
+ android:paddingTop="16dip"
+ android:paddingRight="16dip">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index 9cf695d..80ede2d 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -72,10 +72,7 @@
android:id="@+id/contact_detail_container"
layout="@layout/contact_detail_container"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="16dip"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"/>
+ android:layout_height="match_parent" />
<!-- This invisible worker fragment loads the contact's details -->
<fragment
@@ -94,54 +91,41 @@
android:visibility="gone" />
</view>
- <view
- class="com.android.contacts.widget.TransitionAnimationView"
+ <LinearLayout
android:id="@+id/favorites_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- ex:clipMarginLeft="0dip"
- ex:clipMarginTop="3dip"
- ex:clipMarginRight="3dip"
- ex:clipMarginBottom="9dip"
- ex:enterAnimation="@android:animator/fade_in"
- ex:exitAnimation="@android:animator/fade_out"
- ex:animationDuration="200">
+ android:background="@drawable/list_background_holo"
+ android:baselineAligned="false">
- <LinearLayout
- android:layout_width="match_parent"
+ <!-- Starred -->
+ <FrameLayout
+ android:layout_width="0dip"
android:layout_height="match_parent"
- android:background="@drawable/list_background_holo"
- android:baselineAligned="false">
+ android:layout_weight="10"
+ android:background="@drawable/panel_favorites_holo_light">
- <!-- Starred -->
- <FrameLayout
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="10"
- android:background="@drawable/panel_favorites_holo_light">
-
- <fragment
- android:id="@+id/favorites_fragment"
- class="com.android.contacts.list.ContactTileListFragment"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:layout_marginRight="16dip"
- android:layout_marginLeft="16dip"/>
-
- </FrameLayout>
-
- <!-- Most Frequent -->
<fragment
- android:id="@+id/frequent_fragment"
- class="com.android.contacts.list.ContactTileFrequentFragment"
- android:layout_width="0dip"
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
android:layout_height="match_parent"
- android:layout_weight="8"
- android:layout_marginTop="16dip"
- android:layout_marginRight="16dip"/>
+ android:layout_width="match_parent"
+ android:layout_marginRight="16dip"
+ android:layout_marginLeft="16dip"/>
- </LinearLayout>
- </view>
+ </FrameLayout>
+
+ <!-- Most Frequent -->
+ <fragment
+ android:id="@+id/frequent_fragment"
+ class="com.android.contacts.list.ContactTileFrequentFragment"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="8"
+ android:layout_marginTop="16dip"
+ android:layout_marginRight="16dip"/>
+
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout-sw680dp-w1000dp/people_activity.xml b/res/layout-sw680dp-w1000dp/people_activity.xml
index e34ec21..f45324e 100644
--- a/res/layout-sw680dp-w1000dp/people_activity.xml
+++ b/res/layout-sw680dp-w1000dp/people_activity.xml
@@ -97,54 +97,41 @@
android:visibility="gone" />
</view>
- <view
- class="com.android.contacts.widget.TransitionAnimationView"
+ <LinearLayout
android:id="@+id/favorites_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- ex:clipMarginLeft="0dip"
- ex:clipMarginTop="3dip"
- ex:clipMarginRight="3dip"
- ex:clipMarginBottom="9dip"
- ex:enterAnimation="@android:animator/fade_in"
- ex:exitAnimation="@android:animator/fade_out"
- ex:animationDuration="200">
+ android:background="@drawable/list_background_holo"
+ android:baselineAligned="false">
- <LinearLayout
- android:layout_width="match_parent"
+ <!-- Starred -->
+ <FrameLayout
+ android:layout_width="0dip"
android:layout_height="match_parent"
- android:background="@drawable/list_background_holo"
- android:baselineAligned="false">
+ android:layout_weight="7"
+ android:background="@drawable/panel_favorites_holo_light">
- <!-- Starred -->
- <FrameLayout
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="7"
- android:background="@drawable/panel_favorites_holo_light">
-
- <fragment
- android:id="@+id/favorites_fragment"
- class="com.android.contacts.list.ContactTileListFragment"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:layout_marginRight="32dip"
- android:layout_marginLeft="32dip"/>
-
- </FrameLayout>
-
- <!-- Most Frequent -->
<fragment
- android:id="@+id/frequent_fragment"
- class="com.android.contacts.list.ContactTileFrequentFragment"
- android:layout_width="0dip"
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
android:layout_height="match_parent"
- android:layout_weight="3"
- android:layout_marginTop="32dip"
- android:layout_marginRight="16dip"/>
+ android:layout_width="match_parent"
+ android:layout_marginRight="32dip"
+ android:layout_marginLeft="32dip"/>
- </LinearLayout>
- </view>
+ </FrameLayout>
+
+ <!-- Most Frequent -->
+ <fragment
+ android:id="@+id/frequent_fragment"
+ class="com.android.contacts.list.ContactTileFrequentFragment"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="3"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="16dip"/>
+
+ </LinearLayout>
</com.android.contacts.widget.InterpolatingLayout>
diff --git a/res/layout-w470dp/contact_detail_container.xml b/res/layout-w470dp/contact_detail_container.xml
index a8ee0a5..fc401b7 100644
--- a/res/layout-w470dp/contact_detail_container.xml
+++ b/res/layout-w470dp/contact_detail_container.xml
@@ -16,8 +16,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="match_parent">
<com.android.contacts.detail.ContactDetailFragmentCarousel
android:id="@+id/fragment_carousel"
diff --git a/res/layout/call_log_incoming_call_icon.xml b/res/layout/call_log_incoming_call_icon.xml
deleted file mode 100644
index 8361655..0000000
--- a/res/layout/call_log_incoming_call_icon.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/call_log_incoming_call_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/call_log_icon_margin"
- android:src="@drawable/ic_call_incoming_holo_dark"
- android:contentDescription="@string/description_call_log_incoming_call"
-/>
diff --git a/res/layout/call_log_missed_call_icon.xml b/res/layout/call_log_missed_call_icon.xml
deleted file mode 100644
index 49177cd..0000000
--- a/res/layout/call_log_missed_call_icon.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/call_log_missed_call_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/call_log_icon_margin"
- android:src="@drawable/ic_call_missed_holo_dark"
- android:contentDescription="@string/description_call_log_missed_call"
-/>
diff --git a/res/layout/call_log_outgoing_call_icon.xml b/res/layout/call_log_outgoing_call_icon.xml
deleted file mode 100644
index f109eb4..0000000
--- a/res/layout/call_log_outgoing_call_icon.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/call_log_outgoing_call_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/call_log_icon_margin"
- android:src="@drawable/ic_call_outgoing_holo_dark"
- android:contentDescription="@string/description_call_log_outgoing_call"
-/>
diff --git a/res/layout/call_log_voicemail_icon.xml b/res/layout/call_log_voicemail_icon.xml
deleted file mode 100644
index 4fddcf0..0000000
--- a/res/layout/call_log_voicemail_icon.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/call_log_voicemail_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/call_log_icon_margin"
- android:src="@drawable/ic_call_voicemail_holo_dark"
- android:contentDescription="@string/description_call_log_voicemail"
-/>
diff --git a/res/layout/contact_detail_container.xml b/res/layout/contact_detail_container.xml
index ff2eab1..a59ada4 100644
--- a/res/layout/contact_detail_container.xml
+++ b/res/layout/contact_detail_container.xml
@@ -25,8 +25,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index d1af632..7bcddc1 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -20,7 +20,7 @@
android:layout_marginTop="?android:attr/actionBarSize"
android:id="@+id/dialtacts_frame"
>
- <com.android.contacts.activities.DialtactsViewPager
+ <android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
diff --git a/res/layout/empty.xml b/res/layout/empty.xml
deleted file mode 100644
index 8e70c24..0000000
--- a/res/layout/empty.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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.
--->
-
-<View xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/empty"
- android:layout_width="0dip"
- android:layout_height="0dip" />
diff --git a/res/layout/search_bar.xml b/res/layout/search_bar.xml
deleted file mode 100644
index 7dfd8ec..0000000
--- a/res/layout/search_bar.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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/search_bar"
- android:layout_width="match_parent"
- android:layout_height="64dip"
- android:orientation="vertical"
- android:focusable="true"
- android:descendantFocusability="afterDescendants"
- android:background="@drawable/bg_blk_search_contact">
-
- <!-- Outer layout defines the entire search bar at the top of the screen -->
- <LinearLayout
- android:id="@+id/search_plate"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="4dip"
- android:paddingRight="10dip"
- android:paddingTop="6dip"
- android:paddingBottom="0dip"
- >
-
- <!-- Inner layout contains the app icon, button(s) and EditText -->
- <LinearLayout
- android:id="@+id/search_edit_frame"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@mipmap/ic_launcher_contacts"
- android:layout_marginRight="7dip"
- android:layout_gravity="center_vertical"
- android:scaleType="centerInside" />
-
- <view
- class="com.android.contacts.widget.SearchEditText"
- android:id="@+id/search_src_text"
- android:layout_height="wrap_content"
- android:layout_width="0dip"
- android:layout_weight="1.0"
- android:layout_marginLeft="4dip"
- android:layout_marginBottom="0dip"
- android:singleLine="true"
- android:ellipsize="end"
- android:inputType="textNoSuggestions"
- android:imeOptions="flagNoExtractUi"
- android:hint="@string/search_bar_hint"
- android:drawableRight="@drawable/magnifying_glass"
- android:freezesText="true"
- />
- </LinearLayout>
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/tab_left_arrow.xml b/res/layout/tab_left_arrow.xml
deleted file mode 100644
index 0ed2e57..0000000
--- a/res/layout/tab_left_arrow.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/arrow"
- android:layout_width="32dip"
- android:layout_height="37dip"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_weight="1"
- android:background="@drawable/tab_indicator_bg"
- android:scaleType="centerInside"
- android:src="@drawable/tab_left_arrow"
- />
diff --git a/res/layout/tab_right_arrow.xml b/res/layout/tab_right_arrow.xml
deleted file mode 100644
index de69d8e..0000000
--- a/res/layout/tab_right_arrow.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/arrow"
- android:layout_width="32dip"
- android:layout_height="37dip"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_weight="1"
- android:background="@drawable/tab_indicator_bg"
- android:scaleType="centerInside"
- android:src="@drawable/tab_right_arrow"
- />
diff --git a/res/menu/list.xml b/res/menu/list.xml
deleted file mode 100644
index f4a8751..0000000
--- a/res/menu/list.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
--->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:id="@+id/menu_search"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/menu_search" />
-
- <item
- android:id="@+id/menu_add"
- android:icon="@drawable/ic_menu_add_contact_holo_light"
- android:title="@string/menu_newContact"
- android:alphabeticShortcut="n" />
-
- <item
- android:id="@+id/menu_settings"
- android:title="@string/menu_settings" />
-
- <item
- android:id="@+id/menu_accounts"
- android:title="@string/menu_accounts" />
-
- <item
- android:id="@+id/menu_import_export"
- android:title="@string/menu_import_export" />
-
-</menu>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 841eb75..350693a 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -16,6 +16,5 @@
<resources>
<dimen name="dialpad_digits_height">66dip</dimen>
<dimen name="dialpad_digits_text_size">28sp</dimen>
- <dimen name="dialpad_digits_margin_top">1dip</dimen>
<dimen name="dialpad_digits_margin_bottom">50dip</dimen>
</resources>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index 264565f..d074324 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -33,7 +33,6 @@
<!-- Center vertically -->
<dimen name="quick_contact_top_position">-1px</dimen>
<!-- Contact list (vertical scroll bar comes left) -->
- <dimen name="directory_header_height">24dip</dimen>
<dimen name="contact_browser_list_top_margin">16dip</dimen>
<dimen name="contact_browser_list_header_left_margin">@dimen/list_visible_scrollbar_padding</dimen>
<dimen name="contact_browser_list_header_right_margin">24dip</dimen>
@@ -47,12 +46,6 @@
<dimen name="join_header_top_margin">16dip</dimen>
<dimen name="join_header_bottom_margin">16dip</dimen>
- <!-- Margins and padding for text in widget -->
- <dimen name="widget_snippet_top_margin">5dip</dimen>
- <dimen name="widget_snippet_bottom_margin">6dip</dimen>
- <dimen name="widget_snippet_top_padding">6dip</dimen>
- <dimen name="widget_snippet_bottom_padding">3dip</dimen>
-
<!-- Left padding for a group member list item -->
<dimen name="group_member_item_left_padding">12dip</dimen>
<!-- Left margin for the group member list to match the built in margin in the autocomplete asset -->
diff --git a/res/values-sw680dp-w1000dp/dimens.xml b/res/values-sw680dp-w1000dp/dimens.xml
index e492e5b..680bcee 100644
--- a/res/values-sw680dp-w1000dp/dimens.xml
+++ b/res/values-sw680dp-w1000dp/dimens.xml
@@ -15,7 +15,6 @@
-->
<resources>
<dimen name="group_detail_border_padding">32dip</dimen>
- <dimen name="group_detail_side_margin">32dip</dimen>
<dimen name="group_editor_side_padding">64dip</dimen>
<dimen name="detail_contact_photo_margin">16dip</dimen>
<dimen name="contact_detail_list_top_padding">32dip</dimen>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index bc70cbf..48e63e5 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -49,9 +49,6 @@
<!-- Colour of voicemail progress bar to the left of position indicator. -->
<color name="voicemail_playback_seek_bar_already_played">#ccffffff</color>
- <!-- Colour of text that appears on the voicemail ui. -->
- <color name="voicemail_playback_ui_text">#cc696969</color>
-
<!-- Color of the theme of the People app -->
<color name="people_app_theme_color">#33B5E5</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index db81fed..b6620f5 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -149,9 +149,6 @@
<!-- Border padding for the group detail fragment -->
<dimen name="group_detail_border_padding">0dip</dimen>
- <!-- Left and right margin for the divider in the group detail fragment -->
- <dimen name="group_detail_side_margin">0dip</dimen>
-
<!-- Height of the quick contact photo container (for screens that are too large to use the screen width/height as a constraint)-->
<dimen name="quick_contact_photo_container_height">200dip</dimen>
@@ -161,9 +158,7 @@
<dimen name="dialpad_digits_text_size">35sp</dimen>
<!-- Just used in landscape mode -->
- <dimen name="dialpad_button_height">0px</dimen>
<dimen name="dialpad_digits_height">0px</dimen>
- <dimen name="dialpad_digits_margin_top">0px</dimen>
<dimen name="dialpad_digits_margin_bottom">0px</dimen>
<!-- Width of search view in action bar. Use 0dip for MATCH_PARENT -->
@@ -198,7 +193,6 @@
<!-- Call Log -->
<dimen name="call_log_call_action_size">32dip</dimen>
<dimen name="call_log_call_action_width">48dip</dimen>
- <dimen name="call_log_call_action_height">64dip</dimen>
<dimen name="call_log_icon_margin">4dip</dimen>
<dimen name="call_log_inner_margin">8dip</dimen>
<dimen name="call_log_outer_margin">16dip</dimen>
@@ -219,9 +213,6 @@
<dimen name="contact_filter_icon_size">32dip</dimen>
<dimen name="contact_filter_header_min_height">24dip</dimen>
- <!-- Height for directory headers in contact lists -->
- <dimen name="directory_header_height">24dip</dimen>
-
<!-- Vertical and horizontal padding in between contact tiles -->
<dimen name="contact_tile_divider_padding">1dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a88e6a8..936f844 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1280,9 +1280,6 @@
<!-- An allowable value for the "view names as" contact display option -->
<string name="display_options_view_family_name_first">Family name first</string>
- <!-- Gray hint displayed in the search field in Contacts when empty -->
- <string name="search_bar_hint">Search contacts</string>
-
<!-- An option in the 'Contact photo' dialog, if there is no photo yet [CHAR LIMIT=50] -->
<string name="take_photo">Take photo</string>
diff --git a/src/com/android/contacts/activities/ContactDetailActivity.java b/src/com/android/contacts/activities/ContactDetailActivity.java
index dd3b03b..ea9e116 100644
--- a/src/com/android/contacts/activities/ContactDetailActivity.java
+++ b/src/com/android/contacts/activities/ContactDetailActivity.java
@@ -100,7 +100,7 @@
setContentView(R.layout.contact_detail_activity);
mContactDetailLayoutController = new ContactDetailLayoutController(this, savedState,
- getFragmentManager(), findViewById(R.id.contact_detail_container),
+ getFragmentManager(), null, findViewById(R.id.contact_detail_container),
mContactDetailFragmentListener);
// We want the UP affordance but no app icon.
diff --git a/src/com/android/contacts/activities/DialtactsViewPager.java b/src/com/android/contacts/activities/DialtactsViewPager.java
deleted file mode 100644
index fb869a9..0000000
--- a/src/com/android/contacts/activities/DialtactsViewPager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.contacts.activities;
-
-import android.content.Context;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-
-public class DialtactsViewPager extends ViewPager {
- public DialtactsViewPager(Context context) {
- super(context);
- }
-
- public DialtactsViewPager(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- /**
- * ViewPager inherits ViewGroup's default behavior of delayed clicks
- * on its children, but in order to make the dialpad more responsive we
- * disable that here. The Call Log and Favorites tabs are both
- * ListViews which delay their children anyway, as desired to prevent
- * seeing pressed states flashing while scrolling lists
- */
- public boolean shouldDelayChildPressedState() {
- return false;
- }
-}
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index de08c4c..e41adad 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -60,6 +60,7 @@
import com.android.contacts.util.Constants;
import com.android.contacts.util.DialogManager;
import com.android.contacts.util.PhoneCapabilityTester;
+import com.android.contacts.widget.TransitionAnimationView;
import android.app.Fragment;
import android.app.FragmentManager;
@@ -129,7 +130,6 @@
private ActionBarAdapter mActionBarAdapter;
private ContactDetailFragment mContactDetailFragment;
- private ContactDetailUpdatesFragment mContactDetailUpdatesFragment;
private ContactLoaderFragment mContactDetailLoaderFragment;
private final ContactDetailLoaderFragmentListener mContactDetailLoaderFragmentListener =
@@ -160,7 +160,7 @@
private View mFavoritesView;
private View mBrowserView;
- private View mDetailsView;
+ private TransitionAnimationView mDetailsView;
private View mAddGroupImageView;
@@ -240,8 +240,6 @@
public void onAttachFragment(Fragment fragment) {
if (fragment instanceof ContactDetailFragment) {
mContactDetailFragment = (ContactDetailFragment) fragment;
- } else if (fragment instanceof ContactDetailUpdatesFragment) {
- mContactDetailUpdatesFragment = (ContactDetailUpdatesFragment) fragment;
} else if (fragment instanceof ContactsUnavailableFragment) {
mContactsUnavailableFragment = (ContactsUnavailableFragment)fragment;
mContactsUnavailableFragment.setProviderStatusLoader(mProviderStatusLoader);
@@ -418,7 +416,7 @@
// Configure contact details
mContactDetailLayoutController = new ContactDetailLayoutController(this, savedState,
- getFragmentManager(), findViewById(R.id.contact_detail_container),
+ getFragmentManager(), mDetailsView, findViewById(R.id.contact_detail_container),
new ContactDetailFragmentListener());
}
transaction.commitAllowingStateLoss();
diff --git a/src/com/android/contacts/calllog/CallLogAdapter.java b/src/com/android/contacts/calllog/CallLogAdapter.java
index 99ba8e8..6105b03 100644
--- a/src/com/android/contacts/calllog/CallLogAdapter.java
+++ b/src/com/android/contacts/calllog/CallLogAdapter.java
@@ -352,7 +352,8 @@
// view.
NumberWithCountryIso numberCountryIso = new NumberWithCountryIso(number, countryIso);
ContactInfo existingInfo = mContactInfoCache.getPossiblyExpired(numberCountryIso);
- boolean updated = !info.equals(existingInfo);
+ boolean updated = (existingInfo != ContactInfo.EMPTY) && !info.equals(existingInfo);
+
// Store the data in the cache so that the UI thread can use to display it. Store it
// even if it has not changed so that it is marked as not expired.
mContactInfoCache.put(numberCountryIso, info);
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index b0050c0..d8e5a1d 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -104,7 +104,6 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
-import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListPopupWindow;
@@ -222,8 +221,6 @@
private ArrayList<ViewEntry> mAllEntries = new ArrayList<ViewEntry>();
private LayoutInflater mInflater;
- private boolean mTransitionAnimationRequested;
-
private boolean mIsUniqueNumber;
private boolean mIsUniqueEmail;
@@ -418,11 +415,6 @@
getActivity().invalidateOptionsMenu();
}
- if (mTransitionAnimationRequested) {
- TransitionAnimationView.startAnimation(mView, mContactData == null);
- mTransitionAnimationRequested = false;
- }
-
if (mContactData == null) {
mView.setVisibility(View.INVISIBLE);
mAllEntries.clear();
diff --git a/src/com/android/contacts/detail/ContactDetailLayoutController.java b/src/com/android/contacts/detail/ContactDetailLayoutController.java
index cd479ca..b79ccc0 100644
--- a/src/com/android/contacts/detail/ContactDetailLayoutController.java
+++ b/src/com/android/contacts/detail/ContactDetailLayoutController.java
@@ -20,7 +20,9 @@
import com.android.contacts.NfcHandler;
import com.android.contacts.R;
import com.android.contacts.activities.ContactDetailActivity.FragmentKeyListener;
+import com.android.contacts.util.PhoneCapabilityTester;
import com.android.contacts.util.UriUtils;
+import com.android.contacts.widget.TransitionAnimationView;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
@@ -35,6 +37,7 @@
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewPropertyAnimator;
import android.view.animation.AnimationUtils;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
@@ -51,6 +54,8 @@
private static final int TAB_INDEX_DETAIL = 0;
private static final int TAB_INDEX_UPDATES = 1;
+ private final int SINGLE_PANE_FADE_IN_DURATION = 275;
+
/**
* There are 3 possible layouts for the contact detail screen:
* 1. TWO_COLUMN - Tall and wide screen so the 2 pages can be shown side-by-side
@@ -65,7 +70,8 @@
private final LayoutInflater mLayoutInflater;
private final FragmentManager mFragmentManager;
- private View mViewContainer;
+ private final View mViewContainer;
+ private final TransitionAnimationView mTransitionAnimationView;
private ContactDetailFragment mDetailFragment;
private ContactDetailUpdatesFragment mUpdatesFragment;
@@ -79,7 +85,7 @@
private final ContactDetailTabCarousel mTabCarousel;
private final ContactDetailFragmentCarousel mFragmentCarousel;
- private ContactDetailFragment.Listener mContactDetailFragmentListener;
+ private final ContactDetailFragment.Listener mContactDetailFragmentListener;
private ContactLoader.Result mContactData;
private Uri mContactUri;
@@ -91,8 +97,8 @@
private LayoutMode mLayoutMode;
public ContactDetailLayoutController(Activity activity, Bundle savedState,
- FragmentManager fragmentManager, View viewContainer, ContactDetailFragment.Listener
- contactDetailFragmentListener) {
+ FragmentManager fragmentManager, TransitionAnimationView animationView,
+ View viewContainer, ContactDetailFragment.Listener contactDetailFragmentListener) {
if (fragmentManager == null) {
throw new IllegalStateException("Cannot initialize a ContactDetailLayoutController "
@@ -105,8 +111,11 @@
mFragmentManager = fragmentManager;
mContactDetailFragmentListener = contactDetailFragmentListener;
+ mTransitionAnimationView = animationView;
+
// Retrieve views in case this is view pager and carousel mode
mViewContainer = viewContainer;
+
mViewPager = (ViewPager) viewContainer.findViewById(R.id.pager);
mTabCarousel = (ContactDetailTabCarousel) viewContainer.findViewById(R.id.tab_carousel);
@@ -239,17 +248,36 @@
}
public void setContactData(ContactLoader.Result data) {
- final Boolean contactHadUpdates;
+ final boolean contactWasLoaded;
+ final boolean contactHadUpdates;
if (mContactData == null) {
- contactHadUpdates = null;
+ contactHadUpdates = false;
+ contactWasLoaded = false;
} else {
contactHadUpdates = mContactHasUpdates;
+ contactWasLoaded = true;
}
mContactData = data;
mContactHasUpdates = !data.getStreamItems().isEmpty();
+
+ if (PhoneCapabilityTester.isUsingTwoPanes(mActivity)) {
+ // Tablet: If we already showed data before, we want to cross-fade from screen to screen
+ if (contactWasLoaded && mTransitionAnimationView != null) {
+ mTransitionAnimationView.startTransition(mViewContainer, mContactData == null);
+ }
+ } else {
+ // Small screen: We are on our own screen. Fade the data in, but only the first time
+ if (!contactWasLoaded) {
+ mViewContainer.setAlpha(0.0f);
+ final ViewPropertyAnimator animator = mViewContainer.animate();
+ animator.alpha(1.0f);
+ animator.setDuration(SINGLE_PANE_FADE_IN_DURATION);
+ }
+ }
+
if (mContactHasUpdates) {
showContactWithUpdates(
- contactHadUpdates != null && contactHadUpdates.booleanValue() == false);
+ contactWasLoaded && contactHadUpdates == false);
} else {
showContactWithoutUpdates();
}
diff --git a/src/com/android/contacts/detail/ContactLoaderFragment.java b/src/com/android/contacts/detail/ContactLoaderFragment.java
index ddccfe6..fd1f458 100644
--- a/src/com/android/contacts/detail/ContactLoaderFragment.java
+++ b/src/com/android/contacts/detail/ContactLoaderFragment.java
@@ -33,7 +33,6 @@
import android.content.Loader;
import android.media.RingtoneManager;
import android.net.Uri;
-import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
diff --git a/src/com/android/contacts/dialpad/DialpadFragment.java b/src/com/android/contacts/dialpad/DialpadFragment.java
index 02aa2dc..10e59fc 100644
--- a/src/com/android/contacts/dialpad/DialpadFragment.java
+++ b/src/com/android/contacts/dialpad/DialpadFragment.java
@@ -16,7 +16,6 @@
package com.android.contacts.dialpad;
-
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -52,12 +51,12 @@
import android.text.style.RelativeSizeSpan;
import android.util.DisplayMetrics;
import android.util.Log;
+import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
@@ -87,7 +86,7 @@
View.OnLongClickListener, View.OnKeyListener,
AdapterView.OnItemClickListener, TextWatcher,
PopupMenu.OnMenuItemClickListener,
- View.OnTouchListener {
+ DialpadImageButton.OnPressedListener {
private static final String TAG = DialpadFragment.class.getSimpleName();
private static final boolean DEBUG = false;
@@ -96,6 +95,7 @@
/** The length of DTMF tones in milliseconds */
private static final int TONE_LENGTH_MS = 150;
+ private static final int TONE_LENGTH_INFINITE = -1;
/** The DTMF tone volume relative to other sounds in the stream */
private static final int TONE_RELATIVE_VOLUME = 80;
@@ -213,6 +213,9 @@
@Override
public void afterTextChanged(Editable input) {
+ // When DTMF dialpad buttons are being pressed, we delay SpecialCharSequencMgr sequence,
+ // since some of SpecialCharSequenceMgr's behavior is too abrupt for the "touch-down"
+ // behavior.
if (SpecialCharSequenceMgr.handleChars(getActivity(), input.toString(), mDigits)) {
// A special sequence was entered, clear the digits
mDigits.getText().clear();
@@ -465,23 +468,11 @@
}
private void setupKeypad(View fragmentView) {
- // For numeric buttons, we rely on onTouchListener instead of onClickListener
- // for faster event handling, while some other buttons since basically
- // onTouch event conflicts with horizontal swipes.
- fragmentView.findViewById(R.id.one).setOnTouchListener(this);
- fragmentView.findViewById(R.id.two).setOnTouchListener(this);
- fragmentView.findViewById(R.id.three).setOnTouchListener(this);
- fragmentView.findViewById(R.id.four).setOnTouchListener(this);
- fragmentView.findViewById(R.id.five).setOnTouchListener(this);
- fragmentView.findViewById(R.id.six).setOnTouchListener(this);
- fragmentView.findViewById(R.id.seven).setOnTouchListener(this);
- fragmentView.findViewById(R.id.eight).setOnTouchListener(this);
- fragmentView.findViewById(R.id.nine).setOnTouchListener(this);
- fragmentView.findViewById(R.id.zero).setOnTouchListener(this);
-
- // Buttons other than numeric ones should use onClick as usual.
- fragmentView.findViewById(R.id.star).setOnClickListener(this);
- fragmentView.findViewById(R.id.pound).setOnClickListener(this);
+ int[] buttonIds = new int[] { R.id.one, R.id.two, R.id.three, R.id.four, R.id.five,
+ R.id.six, R.id.seven, R.id.eight, R.id.nine, R.id.zero, R.id.star, R.id.pound};
+ for (int id : buttonIds) {
+ ((DialpadImageButton) fragmentView.findViewById(id)).setOnPressedListener(this);
+ }
// Long-pressing one button will initiate Voicemail.
fragmentView.findViewById(R.id.one).setOnLongClickListener(this);
@@ -572,6 +563,8 @@
(TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+ // Make sure we don't leave this activity with a tone still playing.
+ stopTone();
synchronized (mToneGeneratorLock) {
if (mToneGenerator != null) {
mToneGenerator.release();
@@ -690,6 +683,47 @@
}
private void keyPressed(int keyCode) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_1:
+ playTone(ToneGenerator.TONE_DTMF_1, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_2:
+ playTone(ToneGenerator.TONE_DTMF_2, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_3:
+ playTone(ToneGenerator.TONE_DTMF_3, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_4:
+ playTone(ToneGenerator.TONE_DTMF_4, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_5:
+ playTone(ToneGenerator.TONE_DTMF_5, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_6:
+ playTone(ToneGenerator.TONE_DTMF_6, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_7:
+ playTone(ToneGenerator.TONE_DTMF_7, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_8:
+ playTone(ToneGenerator.TONE_DTMF_8, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_9:
+ playTone(ToneGenerator.TONE_DTMF_9, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_0:
+ playTone(ToneGenerator.TONE_DTMF_0, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_POUND:
+ playTone(ToneGenerator.TONE_DTMF_P, TONE_LENGTH_INFINITE);
+ break;
+ case KeyEvent.KEYCODE_STAR:
+ playTone(ToneGenerator.TONE_DTMF_S, TONE_LENGTH_INFINITE);
+ break;
+ default:
+ break;
+ }
+
mHaptic.vibrate();
KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
mDigits.onKeyDown(keyCode, event);
@@ -715,12 +749,15 @@
}
/**
- * We handle the key based on the DOWN event, but we wait till the UP event to play the local
- * DTMF tone (to avoid playing a spurious tone if the user is actually doing a swipe...)
+ * When a key is pressed, we start playing DTMF tone, do vibration, and enter the digit
+ * immediately. When a key is released, we stop the tone. Note that the "key press" event will
+ * be delivered by the system with certain amount of delay, it won't be synced with user's
+ * actual "touch-down" behavior.
*/
@Override
- public boolean onTouch(View view, MotionEvent event) {
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
+ public void onPressed(View view, boolean pressed) {
+ if (DEBUG) Log.d(TAG, "onPressed(). view: " + view + ", pressed: " + pressed);
+ if (pressed) {
switch (view.getId()) {
case R.id.one: {
keyPressed(KeyEvent.KEYCODE_1);
@@ -762,82 +799,28 @@
keyPressed(KeyEvent.KEYCODE_0);
break;
}
+ case R.id.pound: {
+ keyPressed(KeyEvent.KEYCODE_POUND);
+ break;
+ }
+ case R.id.star: {
+ keyPressed(KeyEvent.KEYCODE_STAR);
+ break;
+ }
default: {
Log.wtf(TAG, "Unexpected onTouch(ACTION_DOWN) event from: " + view);
break;
}
}
- } else if (event.getAction() == MotionEvent.ACTION_UP) {
- switch (view.getId()) {
- case R.id.one: {
- playTone(ToneGenerator.TONE_DTMF_1);
- break;
- }
- case R.id.two: {
- playTone(ToneGenerator.TONE_DTMF_2);
- break;
- }
- case R.id.three: {
- playTone(ToneGenerator.TONE_DTMF_3);
- break;
- }
- case R.id.four: {
- playTone(ToneGenerator.TONE_DTMF_4);
- break;
- }
- case R.id.five: {
- playTone(ToneGenerator.TONE_DTMF_5);
- break;
- }
- case R.id.six: {
- playTone(ToneGenerator.TONE_DTMF_6);
- break;
- }
- case R.id.seven: {
- playTone(ToneGenerator.TONE_DTMF_7);
- break;
- }
- case R.id.eight: {
- playTone(ToneGenerator.TONE_DTMF_8);
- break;
- }
- case R.id.nine: {
- playTone(ToneGenerator.TONE_DTMF_9);
- break;
- }
- case R.id.zero: {
- playTone(ToneGenerator.TONE_DTMF_0);
- break;
- }
- default: {
- Log.wtf(TAG, "Unexpected onTouch(ACTION_UP) event from: " + view);
- break;
- }
- }
- } else if (event.getAction() == MotionEvent.ACTION_CANCEL) {
- // This event will be thrown when a user starts dragging the dialpad screen,
- // intending horizontal swipe. The system will see the event after ACTION_DOWN while
- // it won't see relevant ACTION_UP event anymore.
- //
- // Here, remove the last digit already entered in the last ACTION_DOWN event.
- removeLastOneDigitIfPossible();
+ } else {
+ view.jumpDrawablesToCurrentState();
+ stopTone();
}
- return false;
}
@Override
public void onClick(View view) {
switch (view.getId()) {
- case R.id.pound: {
- playTone(ToneGenerator.TONE_DTMF_P);
- keyPressed(KeyEvent.KEYCODE_POUND);
- return;
- }
- case R.id.star: {
- playTone(ToneGenerator.TONE_DTMF_S);
- keyPressed(KeyEvent.KEYCODE_STAR);
- return;
- }
case R.id.deleteButton: {
keyPressed(KeyEvent.KEYCODE_DEL);
return;
@@ -1090,14 +1073,25 @@
/**
* Plays the specified tone for TONE_LENGTH_MS milliseconds.
+ */
+ private void playTone(int tone) {
+ playTone(tone, TONE_LENGTH_MS);
+ }
+
+ /**
+ * Play the specified tone for the specified milliseconds
*
* The tone is played locally, using the audio stream for phone calls.
* Tones are played only if the "Audible touch tones" user preference
* is checked, and are NOT played if the device is in silent mode.
*
+ * The tone length can be -1, meaning "keep playing the tone." If the caller does so, it should
+ * call stopTone() afterward.
+ *
* @param tone a tone code from {@link ToneGenerator}
+ * @param durationMs tone length.
*/
- void playTone(int tone) {
+ private void playTone(int tone, int durationMs) {
// if local tone playback is disabled, just return.
if (!mDTMFToneEnabled) {
return;
@@ -1123,7 +1117,24 @@
}
// Start the new tone (will stop any playing tone)
- mToneGenerator.startTone(tone, TONE_LENGTH_MS);
+ mToneGenerator.startTone(tone, durationMs);
+ }
+ }
+
+ /**
+ * Stop the tone if it is played.
+ */
+ private void stopTone() {
+ // if local tone playback is disabled, just return.
+ if (!mDTMFToneEnabled) {
+ return;
+ }
+ synchronized (mToneGeneratorLock) {
+ if (mToneGenerator == null) {
+ Log.w(TAG, "stopTone: mToneGenerator == null");
+ return;
+ }
+ mToneGenerator.stopTone();
}
}
diff --git a/src/com/android/contacts/dialpad/DialpadImageButton.java b/src/com/android/contacts/dialpad/DialpadImageButton.java
index 6e01379..a18cbb8 100644
--- a/src/com/android/contacts/dialpad/DialpadImageButton.java
+++ b/src/com/android/contacts/dialpad/DialpadImageButton.java
@@ -19,6 +19,7 @@
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
+import android.view.View;
import android.widget.ImageButton;
/**
@@ -29,6 +30,15 @@
* the behavior.
*/
public class DialpadImageButton extends ImageButton {
+ public interface OnPressedListener {
+ public void onPressed(View view, boolean pressed);
+ }
+
+ private OnPressedListener mOnPressedListener;
+
+ public void setOnPressedListener(OnPressedListener onPressedListener) {
+ mOnPressedListener = onPressedListener;
+ }
public DialpadImageButton(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -39,11 +49,10 @@
}
@Override
- public boolean onTouchEvent(MotionEvent event) {
- final boolean ret = super.onTouchEvent(event);
- if (event.getAction() == MotionEvent.ACTION_CANCEL) {
- jumpDrawablesToCurrentState();
+ public void setPressed(boolean pressed) {
+ super.setPressed(pressed);
+ if (mOnPressedListener != null) {
+ mOnPressedListener.onPressed(this, pressed);
}
- return ret;
}
}
diff --git a/src/com/android/contacts/editor/Editor.java b/src/com/android/contacts/editor/Editor.java
index 423ca94..1151afd 100644
--- a/src/com/android/contacts/editor/Editor.java
+++ b/src/com/android/contacts/editor/Editor.java
@@ -85,4 +85,13 @@
* Clears all fields in this {@link Editor}.
*/
public void clearAllFields();
+
+ /**
+ * Called internally when the user has added a new field. This
+ * allows the appropriate editor UI to be presented immediately.
+ * For example, if a new "event" is added, a date-picker will
+ * immediately pop up.
+ */
+ public void editNewlyAddedField();
+
}
diff --git a/src/com/android/contacts/editor/EventFieldEditorView.java b/src/com/android/contacts/editor/EventFieldEditorView.java
index 475e172..08cbaef 100644
--- a/src/com/android/contacts/editor/EventFieldEditorView.java
+++ b/src/com/android/contacts/editor/EventFieldEditorView.java
@@ -92,6 +92,11 @@
}
@Override
+ public void editNewlyAddedField() {
+ showDialog(R.id.dialog_event_date_picker);
+ }
+
+ @Override
protected void requestFocusForFirstEditField() {
mDateView.requestFocus();
}
diff --git a/src/com/android/contacts/editor/KindSectionView.java b/src/com/android/contacts/editor/KindSectionView.java
index eb8a0a7..8a01490 100644
--- a/src/com/android/contacts/editor/KindSectionView.java
+++ b/src/com/android/contacts/editor/KindSectionView.java
@@ -56,6 +56,8 @@
private LayoutInflater mInflater;
+ private final ArrayList<Runnable> mRunWhenWindowFocused = new ArrayList<Runnable>(1);
+
public KindSectionView(Context context) {
this(context, null);
}
@@ -291,6 +293,46 @@
return true;
}
+ /**
+ * Extends superclass implementation to also run tasks
+ * enqueued by {@link #runWhenWindowFocused}.
+ */
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+ if (hasWindowFocus) {
+ for (Runnable r: mRunWhenWindowFocused) {
+ r.run();
+ }
+ mRunWhenWindowFocused.clear();
+ }
+ }
+
+ /**
+ * Depending on whether we are in the currently-focused window, either run
+ * the argument immediately, or stash it until our window becomes focused.
+ */
+ private void runWhenWindowFocused(Runnable r) {
+ if (hasWindowFocus()) {
+ r.run();
+ } else {
+ mRunWhenWindowFocused.add(r);
+ }
+ }
+
+ /**
+ * Simple wrapper around {@link #runWhenWindowFocused}
+ * to ensure that it runs in the UI thread.
+ */
+ private void postWhenWindowFocused(final Runnable r) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ runWhenWindowFocused(r);
+ }
+ });
+ }
+
public void addItem() {
ValuesDelta values = null;
// If this is a list, we can freely add. If not, only allow adding the first.
@@ -312,13 +354,15 @@
}
final View newField = createEditorView(values);
- post(new Runnable() {
-
- @Override
- public void run() {
- newField.requestFocus();
- }
- });
+ if (newField instanceof Editor) {
+ postWhenWindowFocused(new Runnable() {
+ @Override
+ public void run() {
+ newField.requestFocus();
+ ((Editor)newField).editNewlyAddedField();
+ }
+ });
+ }
// Hide the "add field" footer because there is now a blank field.
mAddFieldFooter.setVisibility(View.GONE);
diff --git a/src/com/android/contacts/editor/PhotoEditorView.java b/src/com/android/contacts/editor/PhotoEditorView.java
index db29544..d2e4340 100644
--- a/src/com/android/contacts/editor/PhotoEditorView.java
+++ b/src/com/android/contacts/editor/PhotoEditorView.java
@@ -63,6 +63,12 @@
mFrameView.setEnabled(enabled);
}
+ @Override
+ public void editNewlyAddedField() {
+ // Never called, since the user never adds a new photo-editor;
+ // you can only change the picture in an existing editor.
+ }
+
/** {@inheritDoc} */
@Override
protected void onFinishInflate() {
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 0919006..5b1dd5f 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -40,10 +40,12 @@
import android.text.TextWatcher;
import android.text.style.StyleSpan;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -56,6 +58,8 @@
* and to correctly write any changes values.
*/
public class TextFieldsEditorView extends LabeledEditorView {
+ private static final String TAG = TextFieldsEditorView.class.getSimpleName();
+
private EditText[] mFieldEditTexts = null;
private ViewGroup mFields = null;
private View mExpansionViewContainer;
@@ -113,6 +117,22 @@
}
@Override
+ public void editNewlyAddedField() {
+ // Some editors may have multiple fields (eg: first-name/last-name), but since the user
+ // has not selected a particular one, it is reasonable to simply pick the first.
+ final View editor = mFields.getChildAt(0);
+
+ // Show the soft-keyboard.
+ InputMethodManager imm =
+ (InputMethodManager)getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (imm != null) {
+ if (!imm.showSoftInput(editor, InputMethodManager.SHOW_IMPLICIT)) {
+ Log.w(TAG, "Failed to show soft input method.");
+ }
+ }
+ }
+
+ @Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
diff --git a/src/com/android/contacts/interactions/PhoneNumberInteraction.java b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
index 401cbb1..3c3c347 100644
--- a/src/com/android/contacts/interactions/PhoneNumberInteraction.java
+++ b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
@@ -108,6 +108,7 @@
this.mimeType = in.readString();
}
+ @Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(id);
dest.writeString(phoneNumber);
@@ -118,10 +119,12 @@
dest.writeString(mimeType);
}
+ @Override
public int describeContents() {
return 0;
}
+ @Override
public boolean collapseWith(PhoneItem phoneItem) {
if (!shouldCollapseWith(phoneItem)) {
return false;
@@ -130,6 +133,7 @@
return true;
}
+ @Override
public boolean shouldCollapseWith(PhoneItem phoneItem) {
return ContactsUtils.shouldCollapse(Phone.CONTENT_ITEM_TYPE, phoneNumber,
Phone.CONTENT_ITEM_TYPE, phoneItem.phoneNumber);
@@ -142,10 +146,12 @@
public static final Parcelable.Creator<PhoneItem> CREATOR
= new Parcelable.Creator<PhoneItem>() {
+ @Override
public PhoneItem createFromParcel(Parcel in) {
return new PhoneItem(in);
}
+ @Override
public PhoneItem[] newArray(int size) {
return new PhoneItem[size];
}
@@ -243,7 +249,10 @@
.create();
}
+ @Override
public void onClick(DialogInterface dialog, int which) {
+ final Activity activity = getActivity();
+ if (activity == null) return;
final AlertDialog alertDialog = (AlertDialog)dialog;
if (mPhoneList.size() > which && which >= 0) {
final PhoneItem phoneItem = mPhoneList.get(which);
@@ -251,11 +260,11 @@
if (checkBox.isChecked()) {
// Request to mark the data as primary in the background.
final Intent serviceIntent = ContactSaveService.createSetSuperPrimaryIntent(
- getActivity(), phoneItem.id);
- getActivity().startService(serviceIntent);
+ activity, phoneItem.id);
+ activity.startService(serviceIntent);
}
- PhoneNumberInteraction.performAction(getActivity(), phoneItem.phoneNumber,
+ PhoneNumberInteraction.performAction(activity, phoneItem.phoneNumber,
mInteractionType, mCallOrigin);
} else {
dialog.dismiss();
diff --git a/src/com/android/contacts/widget/TransitionAnimationView.java b/src/com/android/contacts/widget/TransitionAnimationView.java
index e2f8a87..c70ca25 100644
--- a/src/com/android/contacts/widget/TransitionAnimationView.java
+++ b/src/com/android/contacts/widget/TransitionAnimationView.java
@@ -25,12 +25,10 @@
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
-import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.util.AttributeSet;
import android.view.View;
-import android.view.ViewParent;
import android.widget.FrameLayout;
/**
@@ -99,7 +97,7 @@
if (mExitAnimation == null) {
throw new IllegalArgumentException("Invalid exit animation: " + mExitAnimationId);
}
-
+ mExitAnimation.setDuration(mAnimationDuration);
}
@Override
@@ -136,23 +134,7 @@
}
}
- public static void startAnimation(View view, boolean closing) {
- TransitionAnimationView container = null;
- ViewParent parent = view.getParent();
- while (parent instanceof View) {
- if (parent instanceof TransitionAnimationView) {
- container = (TransitionAnimationView) parent;
- break;
- }
- parent = parent.getParent();
- }
-
- if (container != null) {
- container.start(view, closing);
- }
- }
-
- private void start(View view, boolean closing) {
+ public void startTransition(View view, boolean closing) {
if (mEnterAnimation.isRunning()) {
mEnterAnimation.end();
}
@@ -172,11 +154,8 @@
return;
}
+ mPreviousStateBitmap.eraseColor(Color.TRANSPARENT);
Canvas canvas = new Canvas(mPreviousStateBitmap);
- Paint paint = new Paint();
- paint.setColor(Color.TRANSPARENT);
- canvas.drawRect(0, 0, mPreviousStateBitmap.getWidth(), mPreviousStateBitmap.getHeight(),
- paint);
canvas.clipRect(mClipRect);
view.draw(canvas);
canvas.setBitmap(null);