Merge "Ignore focus event for digits field"
diff --git a/res/drawable-hdpi/ic_menu_contacts_holo_light.png b/res/drawable-hdpi/ic_menu_contacts_holo_light.png
index 8a7358c..6327545 100644
--- a/res/drawable-hdpi/ic_menu_contacts_holo_light.png
+++ b/res/drawable-hdpi/ic_menu_contacts_holo_light.png
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
index 5ef1184..4a15754 100644
--- a/res/drawable-mdpi/ic_menu_contacts_holo_light.png
+++ b/res/drawable-mdpi/ic_menu_contacts_holo_light.png
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
index ac9cf65..c054505 100644
--- a/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
+++ b/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
Binary files differ
diff --git a/res/layout/quickcontact_photo_container.xml b/res/layout/quickcontact_photo_container.xml
index 7df54d9..ffaf12f 100644
--- a/res/layout/quickcontact_photo_container.xml
+++ b/res/layout/quickcontact_photo_container.xml
@@ -84,6 +84,7 @@
android:id="@+id/open_details_push_layer"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:contentDescription="@string/viewContactDesription"
android:background="?android:attr/selectableItemBackground" />
</RelativeLayout>
</merge>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 57ed7c5..06a461d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -724,6 +724,14 @@
-->
<string name="description_plus_button">plus</string>
+ <!-- String describing a contact picture that introduces users to the contact detail screen.
+
+ Used by AccessibilityService to announce the purpose of the button.
+
+ [CHAR LIMIT=NONE]
+ -->
+ <string name="description_view_contact_detail" msgid="2795575601596468581">View contact</string>
+
<!-- Dialog title shown when (USB) storage does not exist [CHAR LIMIT=25] -->
<string name="no_sdcard_title" product="nosdcard">Storage unavailable</string>
<!-- Dialog title shown when SD Card does not exist -->
diff --git a/src/com/android/contacts/ContactsUtils.java b/src/com/android/contacts/ContactsUtils.java
index d3d8f34..f1f73ed 100644
--- a/src/com/android/contacts/ContactsUtils.java
+++ b/src/com/android/contacts/ContactsUtils.java
@@ -18,6 +18,7 @@
import com.android.contacts.model.AccountTypeManager;
import com.android.contacts.model.AccountWithDataSet;
+import com.android.contacts.test.NeededForTesting;
import com.android.i18n.phonenumbers.PhoneNumberUtil;
import android.content.Context;
@@ -91,6 +92,7 @@
/**
* Returns true if two objects are considered equal. Two null references are equal here.
*/
+ @NeededForTesting
public static boolean areObjectsEqual(Object a, Object b) {
return a == b || (a != null && a.equals(b));
}
diff --git a/src/com/android/contacts/format/DisplayNameFormatter.java b/src/com/android/contacts/format/DisplayNameFormatter.java
index e525217..2099c53 100644
--- a/src/com/android/contacts/format/DisplayNameFormatter.java
+++ b/src/com/android/contacts/format/DisplayNameFormatter.java
@@ -20,9 +20,6 @@
import com.android.contacts.widget.TextWithHighlightingFactory;
import android.database.CharArrayBuffer;
-import android.graphics.Typeface;
-import android.provider.ContactsContract;
-import android.text.Spannable;
import android.widget.TextView;
/**
@@ -50,10 +47,6 @@
return mAlternateNameBuffer;
}
- public void setTextWithHighlightingFactory(TextWithHighlightingFactory factory) {
- mTextWithHighlightingFactory = factory;
- }
-
public void setUnknownNameText(CharSequence unknownNameText) {
mUnknownNameText = unknownNameText;
}
diff --git a/src/com/android/contacts/list/ContactListItemView.java b/src/com/android/contacts/list/ContactListItemView.java
index c8778c2..a6e241f 100644
--- a/src/com/android/contacts/list/ContactListItemView.java
+++ b/src/com/android/contacts/list/ContactListItemView.java
@@ -21,7 +21,6 @@
import com.android.contacts.R;
import com.android.contacts.format.DisplayNameFormatter;
import com.android.contacts.format.PrefixHighlighter;
-import com.android.contacts.widget.TextWithHighlightingFactory;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -279,10 +278,6 @@
mCallButtonClickListener = callButtonClickListener;
}
- public void setTextWithHighlightingFactory(TextWithHighlightingFactory factory) {
- mDisplayNameFormatter.setTextWithHighlightingFactory(factory);
- }
-
public void setUnknownNameText(CharSequence unknownNameText) {
mDisplayNameFormatter.setUnknownNameText(unknownNameText);
}
diff --git a/tests/src/com/android/contacts/format/DisplayNameFormatterTest.java b/tests/src/com/android/contacts/format/DisplayNameFormatterTest.java
index 24714cd..4dc932b 100644
--- a/tests/src/com/android/contacts/format/DisplayNameFormatterTest.java
+++ b/tests/src/com/android/contacts/format/DisplayNameFormatterTest.java
@@ -125,20 +125,6 @@
SpannedTestUtils.checkHtmlText("unknown", mView);
}
- public void testSetDisplayName_Highlighting() {
- mDisplayNameFormatter.setTextWithHighlightingFactory(new TestTextWithHighlightingFactory());
- setNames("John Doe", "Sue Anne");
- setDisplayNameWithHighlighting();
- SpannedTestUtils.checkHtmlText("<i>John Doe</i> <i>Sue Anne</i>", mView);
- }
-
- public void testSetDisplayName_HighlightingAndBoldFirstName() {
- mDisplayNameFormatter.setTextWithHighlightingFactory(new TestTextWithHighlightingFactory());
- setNames("John Doe", "Doe John");
- setDisplayNameWithHighlighting();
- SpannedTestUtils.checkHtmlText("<i>John Doe</i> <i>Doe John</i>", mView);
- }
-
/**
* Sets the name and alternate name on the formatter.
*
diff --git a/tests/src/com/android/contacts/list/ContactListItemViewTest.java b/tests/src/com/android/contacts/list/ContactListItemViewTest.java
index 8372f96..aaf7521 100644
--- a/tests/src/com/android/contacts/list/ContactListItemViewTest.java
+++ b/tests/src/com/android/contacts/list/ContactListItemViewTest.java
@@ -18,7 +18,6 @@
import com.android.contacts.activities.PeopleActivity;
import com.android.contacts.format.SpannedTestUtils;
-import com.android.contacts.format.TestTextWithHighlightingFactory;
import com.android.contacts.util.IntegrationTestUtils;
import android.database.Cursor;
@@ -37,7 +36,7 @@
@LargeTest
public class ContactListItemViewTest extends ActivityInstrumentationTestCase2<PeopleActivity> {
/** The HTML code used to mark the start of the highlighted part. */
- private static final String START = "<font color =\"#729a27\">";
+ private static final String START = "<font color =\"#99cc00\">";
/** The HTML code used to mark the end of the highlighted part. */
private static final String END = "</font>";
@@ -106,18 +105,6 @@
view.getNameTextView());
}
- public void testShowDisplayName_WithHighlight() {
- Cursor cursor = createCursor("John Doe", "Doe John");
- ContactListItemView view = createView();
-
- view.setTextWithHighlightingFactory(new TestTextWithHighlightingFactory());
- view.showDisplayName(cursor, 0, 1, true,
- ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY);
-
- SpannedTestUtils.checkHtmlText("<i>John Doe</i> <i>Doe John</i>",
- view.getNameTextView());
- }
-
public void testSetSnippet_Prefix() {
ContactListItemView view = createView();
view.setHighlightedPrefix("TEST".toCharArray());