summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/strings.xml5
-rw-r--r--src/com/android/providers/contacts/ContactsProvider.java29
2 files changed, 21 insertions, 13 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e13de46..45637dd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -19,9 +19,4 @@
<!-- This is the label for the application that stores contacts data -->
<string name="app_label">Contacts Storage</string>
- <!-- This string appears (on two lines) when you type a number into contacts search, to let you dial the phone number you typed. The first line will be in bigger type than the second. -->
- <string name="dial_number_using">Dial number\nusing <xliff:g id="number" example="555">%s</xliff:g></string>
-
- <!-- This string appears (on two lines) when you type a number into contacts search, to let you create a contact whose phone number is the number you typed. The first line will be in bigger type than the second. -->
- <string name="create_contact_using">Create contact\nusing <xliff:g id="number" example="555">%s</xliff:g></string>
</resources>
diff --git a/src/com/android/providers/contacts/ContactsProvider.java b/src/com/android/providers/contacts/ContactsProvider.java
index 0aece84..fc9073c 100644
--- a/src/com/android/providers/contacts/ContactsProvider.java
+++ b/src/com/android/providers/contacts/ContactsProvider.java
@@ -1299,19 +1299,32 @@ public class ContactsProvider extends AbstractSyncableContentProvider {
};
Resources r = getContext().getResources();
+ String s;
+ int i;
ArrayList dialNumber = new ArrayList();
- dialNumber.add(r.getString(com.android.internal.R.string.dialNumber));
- dialNumber.add(r.getString(com.android.internal.R.string.usingNumber,
- searchClause));
+ s = r.getString(com.android.internal.R.string.dial_number_using, searchClause);
+ i = s.indexOf('\n');
+ if (i < 0) {
+ dialNumber.add(s);
+ dialNumber.add("");
+ } else {
+ dialNumber.add(s.substring(0, i));
+ dialNumber.add(s.substring(i + 1));
+ }
dialNumber.add("tel:" + searchClause);
- dialNumber.add(Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED);
+ dialNumber.add(Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED);
ArrayList createContact = new ArrayList();
- createContact.add(r.getString(
- com.android.internal.R.string.createNewContact));
- createContact.add(r.getString(com.android.internal.R.string.usingNumber,
- searchClause));
+ s = r.getString(com.android.internal.R.string.create_contact_using, searchClause);
+ i = s.indexOf('\n');
+ if (i < 0) {
+ createContact.add(s);
+ createContact.add("");
+ } else {
+ createContact.add(s.substring(0, i));
+ createContact.add(s.substring(i + 1));
+ }
createContact.add("tel:" + searchClause);
createContact.add(Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED);