Merge "Frequent contacts now display as a single list item per row."
diff --git a/res/drawable-hdpi/ic_dial_action_search.png b/res/drawable-hdpi/ic_dial_action_search.png
new file mode 100644
index 0000000..042eed0
--- /dev/null
+++ b/res/drawable-hdpi/ic_dial_action_search.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_dial_action_search.png b/res/drawable-mdpi/ic_dial_action_search.png
new file mode 100644
index 0000000..101eeae
--- /dev/null
+++ b/res/drawable-mdpi/ic_dial_action_search.png
Binary files differ
diff --git a/res/layout-land/dialpad_fragment.xml b/res/layout-land/dialpad_fragment.xml
index fe9fb28..4dc87cc 100644
--- a/res/layout-land/dialpad_fragment.xml
+++ b/res/layout-land/dialpad_fragment.xml
@@ -28,13 +28,13 @@
<!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="match_parent"
- android:layout_height="66dip"
- android:layout_marginBottom="50dip"
+ android:layout_height="@dimen/dialpad_digits_height"
+ android:layout_marginBottom="@dimen/dialpad_digits_margin_bottom"
android:layout_marginTop="1dip"
android:gravity="center"
android:maxLines="1"
android:scrollHorizontally="true"
- android:textSize="28sp"
+ android:textSize="@dimen/dialpad_digits_text_size"
android:freezesText="true"
android:background="@drawable/btn_dial_textfield"
android:textColor="@color/dialer_button_text"
@@ -42,7 +42,7 @@
/>
<!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
- <include layout="@layout/voicemail_dial_delete" />
+ <include layout="@layout/dialpad_additional_buttons" />
<!-- "Dialpad chooser" UI, shown only when the user brings up the
Dialer while a call is already in progress.
diff --git a/res/layout-long-land/dialpad_fragment.xml b/res/layout-long-land/dialpad_fragment.xml
deleted file mode 100644
index f287741..0000000
--- a/res/layout-long-land/dialpad_fragment.xml
+++ /dev/null
@@ -1,57 +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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
->
-
- <!-- Text field above the keypad where the digits are displayed.
- It's type is set to PHONE (to put the keyboard in the right
- config) in the java code.
- -->
- <!-- TODO: Use a textAppearance to control the display of the number -->
- <EditText android:id="@+id/digits"
- android:layout_width="match_parent"
- android:layout_height="74dip"
- android:layout_marginBottom="30dip"
- android:layout_marginTop="1dip"
- android:gravity="center"
- android:maxLines="1"
- android:scrollHorizontally="true"
- android:textSize="34sp"
- android:freezesText="true"
- android:background="@drawable/btn_dial_textfield"
- android:textColor="@color/dialer_button_text"
- android:hint="@string/dialerKeyboardHintText"
- />
-
- <!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
- <include layout="@layout/voicemail_dial_delete" />
-
- <!-- "Dialpad chooser" UI, shown only when the user brings up the
- Dialer while a call is already in progress.
- When this UI is visible, the other Dialer elements
- (the textfield and button) are hidden. -->
- <ListView android:id="@+id/dialpadChooser"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:footerDividersEnabled="true"
- />
-
-</LinearLayout>
diff --git a/res/layout-long/dialpad.xml b/res/layout-long/dialpad.xml
deleted file mode 100644
index 066392d..0000000
--- a/res/layout-long/dialpad.xml
+++ /dev/null
@@ -1,139 +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.
--->
-
-<!-- Dialpad in the Contact app.
- Tall screen version with taller buttons.
- -->
-
-<com.android.phone.ButtonGridLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/dialpad"
- android:paddingLeft="7dp"
- android:paddingRight="7dp"
- android:paddingTop="6dp"
- android:paddingBottom="6dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_weight="1"
->
- <ImageButton android:id="@+id/one"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_1_no_vm"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_one"
- />
-
- <ImageButton android:id="@+id/two"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_2"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_two"
- />
-
- <ImageButton android:id="@+id/three"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_3"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_three"
- />
-
- <ImageButton android:id="@+id/four"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_4"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_four"
- />
-
- <ImageButton android:id="@+id/five"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_5"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_five"
- />
-
- <ImageButton android:id="@+id/six"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_6"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_six"
- />
-
- <ImageButton android:id="@+id/seven"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_7"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_seven"
- />
-
- <ImageButton android:id="@+id/eight"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_8"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_eight"
- />
-
- <ImageButton android:id="@+id/nine"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_9"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_nine"
- />
-
- <ImageButton android:id="@+id/star"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_star"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_star"
- />
-
- <ImageButton android:id="@+id/zero"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_0"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_zero"
- />
-
- <ImageButton android:id="@+id/pound"
- android:layout_width="88dp"
- android:layout_height="58dp"
- android:src="@drawable/dial_num_pound"
- android:background="@drawable/btn_dial"
- android:soundEffectsEnabled="false"
- android:contentDescription="@string/description_image_button_pound"
- />
-</com.android.phone.ButtonGridLayout>
diff --git a/res/layout-long/dialpad_fragment.xml b/res/layout-long/dialpad_fragment.xml
deleted file mode 100644
index 85250e2..0000000
--- a/res/layout-long/dialpad_fragment.xml
+++ /dev/null
@@ -1,64 +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.
--->
-
-<!-- TODO (stopship) We don't want to specify a background color here. For now we just
-keep it because otherwise the dialer needs some imagination to use (white on white) -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:background="@android:color/black"
->
-
- <!-- Text field above the keypad where the digits are displayed.
- It's type is set to NULL (to disable the IME keyboard) in the
- java code.
- -->
- <!-- TODO: Use a textAppearance to control the display of the number -->
- <EditText android:id="@+id/digits"
- android:layout_width="match_parent"
- android:layout_height="74dip"
- android:gravity="center"
- android:maxLines="1"
- android:scrollHorizontally="true"
- android:textSize="34sp"
- android:freezesText="true"
- android:background="@drawable/btn_dial_textfield"
- android:textColor="@color/dialer_button_text"
- android:focusableInTouchMode="true"
- android:editable="true"
- android:cursorVisible="false"
- android:layout_weight="0"
- />
-
- <!-- Keypad section -->
- <include layout="@layout/dialpad" />
-
- <!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
- <include layout="@layout/voicemail_dial_delete" />
-
- <!-- "Dialpad chooser" UI, shown only when the user brings up the
- Dialer while a call is already in progress.
- When this UI is visible, the other Dialer elements
- (the textfield/button and the dialpad) are hidden. -->
- <ListView android:id="@+id/dialpadChooser"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_weight="1"
- />
-
-</LinearLayout>
diff --git a/res/layout-long/voicemail_dial_delete.xml b/res/layout-long/voicemail_dial_delete.xml
deleted file mode 100644
index 23ff289..0000000
--- a/res/layout-long/voicemail_dial_delete.xml
+++ /dev/null
@@ -1,66 +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.
--->
-
-<!-- Horizontal row of buttons (Voicemail + DialButton + Delete.)
- Tall screen version with taller buttons.
- -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/voicemailAndDialAndDelete"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_weight="2.5"
- android:orientation="horizontal">
-
- <!-- Onscreen "Voicemail" button.
- The width is 75 (from the mocks) + 12 of padding from the
- 9patch, total is 87.
- -->
- <ImageButton android:id="@+id/voicemailButton"
- android:layout_width="87dip"
- android:layout_height="58dip"
- android:layout_gravity="center_vertical"
- android:state_enabled="false"
- android:background="@drawable/btn_dial_voicemail"
- android:contentDescription="@string/description_voicemail_button"
- android:src="@drawable/ic_dial_action_voice_mail" />
-
- <!-- Onscreen "Dial" button, used on all platforms by
- default. Its usage can be disabled using resources (see
- config.xml.) -->
- <ImageButton android:id="@+id/dialButton"
- android:layout_width="116dip"
- android:layout_height="58dip"
- android:layout_gravity="center_vertical"
- android:state_enabled="false"
- android:background="@drawable/btn_dial_action"
- android:contentDescription="@string/description_dial_button"
- android:src="@drawable/ic_dial_action_call" />
-
- <!-- Onscreen "Backspace/Delete" button
- The width is 75 (from the mocks) + 12 of padding from the
- 9patch, total is 87.
- -->
- <ImageButton android:id="@+id/deleteButton"
- android:layout_width="87dip"
- android:layout_height="58dip"
- android:layout_gravity="center_vertical"
- android:state_enabled="false"
- android:background="@drawable/btn_dial_delete"
- android:contentDescription="@string/description_delete_button"
- android:src="@drawable/ic_dial_action_delete" />
-</LinearLayout>
-
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index 2c14877..50bc2a9 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -14,9 +14,7 @@
limitations under the License.
-->
-<!-- Dialpad in the Contact app.
- -->
-
+<!-- Dialpad in the Phone app. -->
<com.android.phone.ButtonGridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialpad"
android:paddingLeft="7dp"
@@ -26,11 +24,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_weight="1"
->
+ android:layout_weight="1">
+
<ImageButton android:id="@+id/one"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_1_no_vm"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -39,7 +37,7 @@
<ImageButton android:id="@+id/two"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_2"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -48,7 +46,7 @@
<ImageButton android:id="@+id/three"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_3"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -57,7 +55,7 @@
<ImageButton android:id="@+id/four"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_4"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -66,7 +64,7 @@
<ImageButton android:id="@+id/five"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_5"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -75,7 +73,7 @@
<ImageButton android:id="@+id/six"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_6"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -84,7 +82,7 @@
<ImageButton android:id="@+id/seven"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_7"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -93,7 +91,7 @@
<ImageButton android:id="@+id/eight"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_8"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -102,7 +100,7 @@
<ImageButton android:id="@+id/nine"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_9"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -111,7 +109,7 @@
<ImageButton android:id="@+id/star"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_star"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -120,7 +118,7 @@
<ImageButton android:id="@+id/zero"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_0"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
@@ -129,7 +127,7 @@
<ImageButton android:id="@+id/pound"
android:layout_width="88dp"
- android:layout_height="50dp"
+ android:layout_height="@dimen/dialpad_button_height"
android:src="@drawable/dial_num_pound"
android:background="@drawable/btn_dial"
android:soundEffectsEnabled="false"
diff --git a/res/layout/voicemail_dial_delete.xml b/res/layout/dialpad_additional_buttons.xml
similarity index 68%
rename from res/layout/voicemail_dial_delete.xml
rename to res/layout/dialpad_additional_buttons.xml
index 384981c..a35fae6 100644
--- a/res/layout/voicemail_dial_delete.xml
+++ b/res/layout/dialpad_additional_buttons.xml
@@ -16,46 +16,43 @@
<!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/voicemailAndDialAndDelete"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:id="@+id/dialpadAdditionalButtons"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dialpad_additional_buttons_height"
android:layout_gravity="center_horizontal"
android:layout_marginTop="6dip"
- android:layout_weight="1"
+ android:layout_weight="0.25"
android:orientation="horizontal">
- <!-- Onscreen "Voicemail" button.
- The width is 75 (from the mocks) + 12 of padding from the
- 9patch, total is 87.
- -->
- <ImageButton android:id="@+id/voicemailButton"
- android:layout_width="87dip"
- android:layout_height="50dip"
+ <!-- Onscreen "Search button -->
+ <ImageButton android:id="@+id/searchButton"
+ android:layout_width="0px"
+ android:layout_weight="0.25"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
android:background="@drawable/btn_dial_voicemail"
android:contentDescription="@string/description_voicemail_button"
- android:src="@drawable/ic_dial_action_voice_mail" />
+ android:src="@drawable/ic_dial_action_search" />
- <!-- Onscreen "Dial" button, used on all platforms by
+ <!-- Onscreen "Dial" button, diused on all platforms by
default. Its usage can be disabled using resources (see
config.xml.) -->
<ImageButton android:id="@+id/dialButton"
- android:layout_width="116dip"
- android:layout_height="50dip"
+ android:layout_width="0px"
+ android:layout_weight="0.50"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
android:background="@drawable/btn_dial_action"
android:contentDescription="@string/description_dial_button"
android:src="@drawable/ic_dial_action_call" />
- <!-- Onscreen "Backspace/Delete" button
- The width is 75 (from the mocks) + 12 of padding from the
- 9patch, total is 87.
- -->
+ <!-- Onscreen "Backspace/Delete" button -->
<ImageButton android:id="@+id/deleteButton"
- android:layout_width="87dip"
- android:layout_height="50dip"
+ android:layout_width="0px"
+ android:layout_weight="0.25"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
android:background="@drawable/btn_dial_delete"
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index c516bd8..7601dfe 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -14,8 +14,6 @@
limitations under the License.
-->
-<!-- TODO (stopship) We don't want to specify a background color here. For now we just
-keep it because otherwise the dialer needs some imagination to use (white on white) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/top"
android:layout_width="match_parent"
@@ -28,29 +26,17 @@
It's type is set to NULL (to disable the IME keyboard) in the
java code.
-->
- <!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="match_parent"
- android:layout_height="67dip"
+ android:layout_height="@dimen/dialpad_digits_height"
android:gravity="center"
- android:maxLines="1"
- android:scrollHorizontally="true"
- android:textSize="33sp"
- android:freezesText="true"
- android:background="@drawable/btn_dial_textfield"
- android:textColor="@color/dialer_button_text"
- android:focusableInTouchMode="true"
- android:editable="true"
- android:cursorVisible="false"
- android:layout_weight="0"
- android:contentDescription="@string/description_digits_edittext"
- />
+ android:textAppearance="@style/DialtactsDigitsTextAppearance" />
<!-- Keypad section -->
<include layout="@layout/dialpad" />
<!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
- <include layout="@layout/voicemail_dial_delete" />
+ <include layout="@layout/dialpad_additional_buttons" />
<!-- "Dialpad chooser" UI, shown only when the user brings up the
Dialer while a call is already in progress.
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 675dcdb..445a332 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -32,13 +32,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <!-- Contacts -->
- <fragment
- android:id="@+id/contacts_fragment"
- class="com.android.contacts.list.DefaultContactBrowseListFragment"
- android:layout_height="match_parent"
- android:layout_width="match_parent" />
-
<!-- Favorites -->
<fragment
android:id="@+id/favorites_fragment"
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
new file mode 100644
index 0000000..841eb75
--- /dev/null
+++ b/res/values-land/dimens.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+<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-long-land/dimens.xml b/res/values-long-land/dimens.xml
new file mode 100644
index 0000000..2046eb0
--- /dev/null
+++ b/res/values-long-land/dimens.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<resources>
+ <dimen name="dialpad_digits_margin_bottom">30dip</dimen>
+ <dimen name="dialpad_digits_text_size">34sp</dimen>
+</resources>
diff --git a/res/values-long/dimens.xml b/res/values-long/dimens.xml
new file mode 100644
index 0000000..9208e4b
--- /dev/null
+++ b/res/values-long/dimens.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+<resources>
+ <dimen name="dialpad_digits_height">74dip</dimen>
+ <dimen name="dialpad_additional_buttons_height">58dip</dimen>
+ <dimen name="dialpad_button_height">58dip</dimen>
+</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 3e5b554..a9be1bd 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -162,4 +162,14 @@
<!-- Height for directory headers in contact lists -->
<dimen name="directory_header_height">28dip</dimen>
+
+ <!-- Height of edit text in dialpad fragment -->
+ <dimen name="dialpad_digits_height">67dip</dimen>
+ <dimen name="dialpad_digits_text_size">33sp</dimen>
+ <dimen name="dialpad_additional_buttons_height">50dip</dimen>
+ <dimen name="dialpad_button_height">50dip</dimen>
+ <!-- Just used in landscape mode -->
+ <dimen name="dialpad_digits_margin_top">1dip</dimen>
+ <!-- Just used in landscape mode -->
+ <dimen name="dialpad_digits_margin_bottom">50dip</dimen>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 51d8a0d..6a79817 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -287,4 +287,19 @@
<style name="GroupBrowseListItem">
<item name="android:paddingRight">20dip</item>
</style>
+
+ <style name="DialtactsDigitsTextAppearance"
+ parent="@android:attr/textAppearanceMedium">
+ <item name="android:maxLines">1</item>
+ <item name="android:scrollHorizontally">true</item>
+ <item name="android:textSize">@dimen/dialpad_digits_text_size</item>
+ <item name="android:freezesText">true</item>
+ <item name="android:textColor">@color/dialer_button_text</item>
+ <item name="android:background">@drawable/btn_dial_textfield</item>
+ <item name="android:focusableInTouchMode">true</item>
+ <item name="android:editable">true</item>
+ <item name="android:cursorVisible">false</item>
+ <item name="android:layout_weight">0</item>
+ </style>
+
</resources>
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java
index 4b0bbaa..2ec1cbf 100644
--- a/src/com/android/contacts/ContactLoader.java
+++ b/src/com/android/contacts/ContactLoader.java
@@ -17,6 +17,7 @@
package com.android.contacts;
import com.android.contacts.util.DataStatus;
+import com.google.common.annotations.VisibleForTesting;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -238,7 +239,8 @@
return mUri;
}
- public long getId() {
+ @VisibleForTesting
+ /*package*/ long getId() {
return mId;
}
diff --git a/src/com/android/contacts/ContactsApplication.java b/src/com/android/contacts/ContactsApplication.java
index c925ec0..1c8c080 100644
--- a/src/com/android/contacts/ContactsApplication.java
+++ b/src/com/android/contacts/ContactsApplication.java
@@ -18,6 +18,7 @@
import com.android.contacts.model.AccountTypeManager;
import com.android.contacts.test.InjectedServices;
+import com.google.common.annotations.VisibleForTesting;
import android.app.Application;
import android.app.LoaderManager;
@@ -36,6 +37,7 @@
/**
* Overrides the system services with mocks for testing.
*/
+ @VisibleForTesting
public static void injectServices(InjectedServices services) {
sInjectedServices = services;
}
diff --git a/src/com/android/contacts/activities/CallLogActivity.java b/src/com/android/contacts/activities/CallLogActivity.java
index 13c3209..4ddf4d0 100644
--- a/src/com/android/contacts/activities/CallLogActivity.java
+++ b/src/com/android/contacts/activities/CallLogActivity.java
@@ -20,6 +20,7 @@
import com.android.contacts.R;
import com.android.contacts.calllog.CallLogFragment;
import com.android.internal.telephony.ITelephony;
+import com.google.common.annotations.VisibleForTesting;
import android.app.Activity;
import android.content.ActivityNotFoundException;
@@ -54,7 +55,8 @@
R.id.call_log_fragment);
}
- public CallLogFragment getFragment() {
+ @VisibleForTesting
+ /*package*/ CallLogFragment getFragment() {
return mFragment;
}
diff --git a/src/com/android/contacts/activities/DialtactsActivity.java b/src/com/android/contacts/activities/DialtactsActivity.java
index ab54960..d1b0c23 100644
--- a/src/com/android/contacts/activities/DialtactsActivity.java
+++ b/src/com/android/contacts/activities/DialtactsActivity.java
@@ -74,15 +74,14 @@
private static final int TAB_INDEX_DIALER = 0;
private static final int TAB_INDEX_CALL_LOG = 1;
- private static final int TAB_INDEX_CONTACTS = 2;
- private static final int TAB_INDEX_FAVORITES = 3;
+ private static final int TAB_INDEX_FAVORITES = 2;
+
+ private static final int TAB_INDEX_COUNT = 3;
public static final String EXTRA_IGNORE_STATE = "ignore-state";
/** Name of the dialtacts shared preferences */
static final String PREFS_DIALTACTS = "dialtacts";
- /** If true, when handling the contacts intent the favorites tab will be shown instead */
- static final String PREF_FAVORITES_AS_CONTACTS = "favorites_as_contacts";
static final boolean PREF_FAVORITES_AS_CONTACTS_DEFAULT = false;
/** Last manually selected tab index */
@@ -188,6 +187,12 @@
final FragmentManager fragmentManager = getFragmentManager();
mDialpadFragment = (DialpadFragment) fragmentManager
.findFragmentById(R.id.dialpad_fragment);
+ mDialpadFragment.setListener(new DialpadFragment.Listener() {
+ @Override
+ public void onSearchButtonPressed() {
+ enterSearchUi();
+ }
+ });
mCallLogFragment = (CallLogFragment) fragmentManager
.findFragmentById(R.id.call_log_fragment);
mContactsFragment = (DefaultContactBrowseListFragment) fragmentManager
@@ -203,7 +208,6 @@
final FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.hide(mDialpadFragment);
transaction.hide(mCallLogFragment);
- transaction.hide(mContactsFragment);
transaction.hide(mStrequentFragment);
transaction.hide(mPhoneNumberPickerFragment);
transaction.commit();
@@ -211,7 +215,6 @@
// Setup the ActionBar tabs (the order matches the tab-index contants TAB_INDEX_*)
setupDialer();
setupCallLog();
- setupContacts();
setupFavorites();
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
getActionBar().setDisplayShowTitleEnabled(false);
@@ -221,6 +224,10 @@
final SharedPreferences prefs = getSharedPreferences(PREFS_DIALTACTS, MODE_PRIVATE);
mLastManuallySelectedTab = prefs.getInt(PREF_LAST_MANUALLY_SELECTED_TAB,
PREF_LAST_MANUALLY_SELECTED_TAB_DEFAULT);
+ if (mLastManuallySelectedTab >= TAB_INDEX_COUNT) {
+ // Stored value may have exceeded the number of current tabs. Reset it.
+ mLastManuallySelectedTab = PREF_LAST_MANUALLY_SELECTED_TAB_DEFAULT;
+ }
setCurrentTab(intent);
@@ -236,15 +243,6 @@
final SharedPreferences.Editor editor =
getSharedPreferences(PREFS_DIALTACTS, MODE_PRIVATE).edit();
- // selectedTab becomes null in search UI.
- final Tab selectedTab = getActionBar().getSelectedTab();
- if (selectedTab != null) {
- final int currentTabIndex = selectedTab.getPosition();
- if (currentTabIndex == TAB_INDEX_CONTACTS || currentTabIndex == TAB_INDEX_FAVORITES) {
- editor.putBoolean(
- PREF_FAVORITES_AS_CONTACTS, currentTabIndex == TAB_INDEX_FAVORITES);
- }
- }
editor.putInt(PREF_LAST_MANUALLY_SELECTED_TAB, mLastManuallySelectedTab);
editor.apply();
@@ -589,7 +587,7 @@
final Tab tab = actionBar.getSelectedTab();
if (tab == null) return false;
final int tabIndex = tab.getPosition();
- if (tabIndex != TAB_INDEX_CONTACTS && tabIndex != TAB_INDEX_FAVORITES) return false;
+ if (tabIndex != TAB_INDEX_FAVORITES) return false;
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.list, menu);
@@ -680,7 +678,6 @@
transaction.show(mPhoneNumberPickerFragment);
transaction.hide(mDialpadFragment);
transaction.hide(mCallLogFragment);
- transaction.hide(mContactsFragment);
transaction.hide(mStrequentFragment);
transaction.commit();
diff --git a/src/com/android/contacts/calllog/CallLogFragment.java b/src/com/android/contacts/calllog/CallLogFragment.java
index b3043d4..bcffd1c 100644
--- a/src/com/android/contacts/calllog/CallLogFragment.java
+++ b/src/com/android/contacts/calllog/CallLogFragment.java
@@ -1111,10 +1111,12 @@
}
}
+ @VisibleForTesting
public CallLogAdapter getAdapter() {
return mAdapter;
}
+ @VisibleForTesting
public String getVoiceMailNumber() {
return mVoiceMailNumber;
}
diff --git a/src/com/android/contacts/dialpad/DialpadFragment.java b/src/com/android/contacts/dialpad/DialpadFragment.java
index 58ffb9e..778fe42 100644
--- a/src/com/android/contacts/dialpad/DialpadFragment.java
+++ b/src/com/android/contacts/dialpad/DialpadFragment.java
@@ -20,6 +20,7 @@
import com.android.contacts.R;
import com.android.contacts.SpecialCharSequenceMgr;
import com.android.contacts.activities.DialtactsActivity;
+import com.android.contacts.list.StrequentContactListFragment.Listener;
import com.android.internal.telephony.ITelephony;
import com.android.phone.CallLogAsync;
import com.android.phone.HapticFeedback;
@@ -87,6 +88,10 @@
/** Stream type used to play the DTMF tones off call, and mapped to the volume control keys */
private static final int DIAL_TONE_STREAM_TYPE = AudioManager.STREAM_MUSIC;
+ public interface Listener {
+ public void onSearchButtonPressed();
+ }
+
private EditText mDigits;
private View mDelete;
private MenuItem mAddToContactMenuItem;
@@ -95,8 +100,11 @@
private Drawable mDigitsBackground;
private Drawable mDigitsEmptyBackground;
private View mDialpad;
- private View mVoicemailDialAndDeleteRow;
- private View mVoicemailButton;
+ private View mAdditionalButtonsRow;
+
+ private View mSearchButton;
+ private Listener mListener;
+
private View mDialButton;
private ListView mDialpadChooser;
private DialpadChooserAdapter mDialpadChooserAdapter;
@@ -107,6 +115,8 @@
private static final int MENU_2S_PAUSE = 2;
private static final int MENU_WAIT = 3;
+ private boolean mHasVoicemail = false;
+
// Last number dialed, retrieved asynchronously from the call DB
// in onCreate. This number is displayed when the user hits the
// send key and cleared in onPause.
@@ -227,12 +237,17 @@
setupKeypad(fragmentView);
}
- mVoicemailDialAndDeleteRow = fragmentView.findViewById(R.id.voicemailAndDialAndDelete);
+ mAdditionalButtonsRow = fragmentView.findViewById(R.id.dialpadAdditionalButtons);
initVoicemailButton();
+ mSearchButton = mAdditionalButtonsRow.findViewById(R.id.searchButton);
+ if (mSearchButton != null) {
+ mSearchButton.setOnClickListener(this);
+ }
+
// Check whether we should show the onscreen "Dial" button.
- mDialButton = mVoicemailDialAndDeleteRow.findViewById(R.id.dialButton);
+ mDialButton = mAdditionalButtonsRow.findViewById(R.id.dialButton);
if (r.getBoolean(R.bool.config_show_onscreen_dial_button)) {
mDialButton.setOnClickListener(this);
@@ -241,7 +256,7 @@
mDialButton = null;
}
- mDelete = mVoicemailDialAndDeleteRow.findViewById(R.id.deleteButton);
+ mDelete = mAdditionalButtonsRow.findViewById(R.id.deleteButton);
mDelete.setOnClickListener(this);
mDelete.setOnLongClickListener(this);
@@ -666,9 +681,10 @@
dialButtonPressed();
return;
}
- case R.id.voicemailButton: {
- callVoicemail();
- mHaptic.vibrate();
+ case R.id.searchButton: {
+ if (mListener != null) {
+ mListener.onSearchButtonPressed();
+ }
return;
}
case R.id.digits: {
@@ -693,7 +709,7 @@
return true;
}
case R.id.one: {
- if (isDigitsEmpty()) {
+ if (mHasVoicemail && isDigitsEmpty()) {
callVoicemail();
return true;
}
@@ -821,7 +837,7 @@
// Log.i(TAG, "Showing dialpad chooser!");
mDigits.setVisibility(View.GONE);
if (mDialpad != null) mDialpad.setVisibility(View.GONE);
- mVoicemailDialAndDeleteRow.setVisibility(View.GONE);
+ mAdditionalButtonsRow.setVisibility(View.GONE);
mDialpadChooser.setVisibility(View.VISIBLE);
// Instantiate the DialpadChooserAdapter and hook it up to the
@@ -834,7 +850,7 @@
// Log.i(TAG, "Displaying normal Dialer UI.");
mDigits.setVisibility(View.VISIBLE);
if (mDialpad != null) mDialpad.setVisibility(View.VISIBLE);
- mVoicemailDialAndDeleteRow.setVisibility(View.VISIBLE);
+ mAdditionalButtonsRow.setVisibility(View.VISIBLE);
mDialpadChooser.setVisibility(View.GONE);
}
}
@@ -1122,19 +1138,11 @@
* Check if voicemail is enabled/accessible.
*/
private void initVoicemailButton() {
- boolean hasVoicemail = false;
try {
- hasVoicemail = TelephonyManager.getDefault().getVoiceMailNumber() != null;
+ mHasVoicemail = TelephonyManager.getDefault().getVoiceMailNumber() != null;
} catch (SecurityException se) {
// Possibly no READ_PHONE_STATE privilege.
}
-
- mVoicemailButton = mVoicemailDialAndDeleteRow.findViewById(R.id.voicemailButton);
- if (hasVoicemail) {
- mVoicemailButton.setOnClickListener(this);
- } else {
- mVoicemailButton.setEnabled(false);
- }
}
/**
@@ -1213,4 +1221,8 @@
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return intent;
}
+
+ public void setListener(Listener listener) {
+ mListener = listener;
+ }
}
diff --git a/src/com/android/contacts/format/FormatUtils.java b/src/com/android/contacts/format/FormatUtils.java
index c4f4930..771656b 100644
--- a/src/com/android/contacts/format/FormatUtils.java
+++ b/src/com/android/contacts/format/FormatUtils.java
@@ -15,6 +15,8 @@
*/
package com.android.contacts.format;
+import com.google.common.annotations.VisibleForTesting;
+
import android.database.CharArrayBuffer;
import android.graphics.Typeface;
import android.text.SpannableString;
@@ -106,7 +108,8 @@
return text;
}
- public static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) {
+ @VisibleForTesting
+ /*package*/ static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) {
if (text != null) {
char[] data = buffer.data;
if (data == null || data.length < text.length()) {
diff --git a/src/com/android/contacts/format/PrefixHighlighter.java b/src/com/android/contacts/format/PrefixHighlighter.java
index 943dcb4..0bc67a6 100644
--- a/src/com/android/contacts/format/PrefixHighlighter.java
+++ b/src/com/android/contacts/format/PrefixHighlighter.java
@@ -16,7 +16,6 @@
package com.android.contacts.format;
-import android.database.CharArrayBuffer;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;
@@ -45,17 +44,6 @@
}
/**
- * Sets the text on the given text view, highlighting the word that matches the given prefix.
- *
- * @param view the view on which to set the text
- * @param text the text to use as the text
- * @param prefix the prefix to look for
- */
- public void setText(TextView view, CharArrayBuffer text, char[] prefix) {
- setText(view, FormatUtils.charArrayBufferToString(text), prefix);
- }
-
- /**
* Returns a CharSequence which highlights the given prefix if found in the given text.
*
* @param text the text to which to apply the highlight
diff --git a/src/com/android/contacts/interactions/TestLoaderManager.java b/src/com/android/contacts/interactions/TestLoaderManager.java
index db975ed..6c2d9e8 100644
--- a/src/com/android/contacts/interactions/TestLoaderManager.java
+++ b/src/com/android/contacts/interactions/TestLoaderManager.java
@@ -16,6 +16,8 @@
package com.android.contacts.interactions;
+import com.google.common.annotations.VisibleForTesting;
+
import android.app.Activity;
import android.app.LoaderManager;
import android.content.AsyncTaskLoader;
@@ -123,7 +125,8 @@
* If one of the loaders has already completed since the last call to {@link #reset()}, it will
* not wait for it to complete again.
*/
- public synchronized void waitForLoaders(int... loaderIds) {
+ @VisibleForTesting
+ /*package*/ synchronized void waitForLoaders(int... loaderIds) {
List<Loader<?>> loaders = new ArrayList<Loader<?>>(loaderIds.length);
for (int loaderId : loaderIds) {
if (mFinishedLoaders.contains(loaderId)) {
diff --git a/src/com/android/contacts/list/ContactListAdapter.java b/src/com/android/contacts/list/ContactListAdapter.java
index cc4bea5..8af0af2 100644
--- a/src/com/android/contacts/list/ContactListAdapter.java
+++ b/src/com/android/contacts/list/ContactListAdapter.java
@@ -23,7 +23,6 @@
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.Directory;
-import android.provider.ContactsContract.Profile;
import android.provider.ContactsContract.SearchSnippetColumns;
import android.text.TextUtils;
import android.view.View;
@@ -162,7 +161,7 @@
protected static Uri includeProfileEntry(Uri uri) {
return uri.buildUpon()
- .appendQueryParameter(ContactsContract.INCLUDE_PROFILE, "true").build();
+ .appendQueryParameter(ContactsContract.ALLOW_PROFILE, "true").build();
}
public boolean getHasPhoneNumber(int position) {
diff --git a/src/com/android/contacts/list/ContactListFilterLoader.java b/src/com/android/contacts/list/ContactListFilterLoader.java
index 6bca4ad..07c11bc 100644
--- a/src/com/android/contacts/list/ContactListFilterLoader.java
+++ b/src/com/android/contacts/list/ContactListFilterLoader.java
@@ -56,7 +56,7 @@
public static final int SOURCE_ID = 5;
public static final int GROUP_IS_READ_ONLY = 6;
- private static final String SELECTION =
+ public static final String SELECTION =
Groups.DELETED + "=0" +
" AND " + Groups.FAVORITES + "=0" +
" AND " + Groups.ACCOUNT_TYPE + " NOT NULL" +
diff --git a/src/com/android/contacts/test/InjectedServices.java b/src/com/android/contacts/test/InjectedServices.java
index b74481c..49b88be 100644
--- a/src/com/android/contacts/test/InjectedServices.java
+++ b/src/com/android/contacts/test/InjectedServices.java
@@ -17,6 +17,7 @@
package com.android.contacts.test;
import com.google.android.collect.Maps;
+import com.google.common.annotations.VisibleForTesting;
import android.content.ContentResolver;
import android.content.SharedPreferences;
@@ -34,6 +35,7 @@
private SharedPreferences mSharedPreferences;
private HashMap<String, Object> mSystemServices;
+ @VisibleForTesting
public void setContentResolver(ContentResolver contentResolver) {
this.mContentResolver = contentResolver;
}
@@ -42,6 +44,7 @@
return mContentResolver;
}
+ @VisibleForTesting
public void setSharedPreferences(SharedPreferences sharedPreferences) {
this.mSharedPreferences = sharedPreferences;
}
@@ -50,6 +53,7 @@
return mSharedPreferences;
}
+ @VisibleForTesting
public void setSystemService(String name, Object service) {
if (mSystemServices == null) {
mSystemServices = Maps.newHashMap();
diff --git a/src/com/android/contacts/widget/CompositeListAdapter.java b/src/com/android/contacts/widget/CompositeListAdapter.java
index bd0c8d6..692e073 100644
--- a/src/com/android/contacts/widget/CompositeListAdapter.java
+++ b/src/com/android/contacts/widget/CompositeListAdapter.java
@@ -15,6 +15,8 @@
*/
package com.android.contacts.widget;
+import com.google.common.annotations.VisibleForTesting;
+
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
@@ -64,7 +66,8 @@
mViewTypeCounts = new int[INITIAL_CAPACITY];
}
- public void addAdapter(ListAdapter adapter) {
+ @VisibleForTesting
+ /*package*/ void addAdapter(ListAdapter adapter) {
if (mSize >= mAdapters.length) {
int newCapacity = mSize + 2;
ListAdapter[] newAdapters = new ListAdapter[newCapacity];
diff --git a/tests/src/com/android/contacts/format/PrefixHighligherTest.java b/tests/src/com/android/contacts/format/PrefixHighligherTest.java
index 5500abf..a0c0ff3 100644
--- a/tests/src/com/android/contacts/format/PrefixHighligherTest.java
+++ b/tests/src/com/android/contacts/format/PrefixHighligherTest.java
@@ -16,7 +16,6 @@
package com.android.contacts.format;
-import android.database.CharArrayBuffer;
import android.test.AndroidTestCase;
import android.widget.TextView;
@@ -88,20 +87,4 @@
mPrefixHighlighter.setText(mView, "atest test", "TE".toCharArray());
SpannedTestUtils.checkHtmlText("atest " + START + "te" + END + "st", mView);
}
-
- public void testSetText_CharArrayBuffer() {
- CharArrayBuffer buffer = new CharArrayBuffer(100);
-
- FormatUtils.copyToCharArrayBuffer("test", buffer);
- mPrefixHighlighter.setText(mView, buffer, new char[0]);
- SpannedTestUtils.checkHtmlText("test", mView);
-
- FormatUtils.copyToCharArrayBuffer("a test", buffer);
- mPrefixHighlighter.setText(mView, buffer, "TE".toCharArray());
- SpannedTestUtils.checkHtmlText("a " + START + "te" + END + "st", mView);
-
- FormatUtils.copyToCharArrayBuffer("test", buffer);
- mPrefixHighlighter.setText(mView, buffer, "TA".toCharArray());
- SpannedTestUtils.checkHtmlText("test", mView);
- }
}