summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-03-19 18:37:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-19 18:38:09 +0000
commit1e825d81a5c468cc754921e518538be55caa78fe (patch)
treed1b5d8cb6234b85ac6e4837a140cd960dfc6aa98 /src
parent60b93e7322833f7336651fce1471d7aff6e2b3ce (diff)
parent0247a9b7e357c05155081bd4e4bee3333c5179b5 (diff)
Merge "Change add contact shortcut to be for "existing"."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/DialerPhoneNumberListAdapter.java8
-rw-r--r--src/com/android/dialer/list/RegularSearchListAdapter.java5
-rw-r--r--src/com/android/dialer/list/SearchFragment.java2
-rw-r--r--src/com/android/dialer/list/SmartDialNumberListAdapter.java2
4 files changed, 7 insertions, 10 deletions
diff --git a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
index 86e852846..089937259 100644
--- a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
+++ b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
@@ -27,7 +27,7 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
public final static int SHORTCUT_INVALID = -1;
public final static int SHORTCUT_DIRECT_CALL = 0;
- public final static int SHORTCUT_ADD_NUMBER_TO_CONTACTS = 1;
+ public final static int SHORTCUT_ADD_TO_EXISTING_CONTACT = 1;
public final static int SHORTCUT_SEND_SMS_MESSAGE = 2;
public final static int SHORTCUT_MAKE_VIDEO_CALL = 3;
@@ -143,9 +143,9 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
text = resources.getString(R.string.search_shortcut_call_number, number);
drawableId = R.drawable.ic_search_phone;
break;
- case SHORTCUT_ADD_NUMBER_TO_CONTACTS:
- text = resources.getString(R.string.search_shortcut_add_to_contacts);
- drawableId = R.drawable.ic_search_add_contact;
+ case SHORTCUT_ADD_TO_EXISTING_CONTACT:
+ text = resources.getString(R.string.search_shortcut_add_to_existing_contact);
+ drawableId = R.drawable.ic_person_24dp;
break;
case SHORTCUT_SEND_SMS_MESSAGE:
text = resources.getString(R.string.search_shortcut_send_sms_message);
diff --git a/src/com/android/dialer/list/RegularSearchListAdapter.java b/src/com/android/dialer/list/RegularSearchListAdapter.java
index 9d6694a7f..87d4fd2c8 100644
--- a/src/com/android/dialer/list/RegularSearchListAdapter.java
+++ b/src/com/android/dialer/list/RegularSearchListAdapter.java
@@ -69,10 +69,7 @@ public class RegularSearchListAdapter extends DialerPhoneNumberListAdapter {
final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString());
boolean changed = false;
changed |= setShortcutEnabled(SHORTCUT_DIRECT_CALL, showNumberShortcuts);
- // Either one of the add contacts options should be enabled. If the user entered
- // a dialable number, then clicking add to contact should add it as a number.
- // Otherwise, it should add it to a new contact as a name.
- changed |= setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
+ changed |= setShortcutEnabled(SHORTCUT_ADD_TO_EXISTING_CONTACT, showNumberShortcuts);
changed |= setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
showNumberShortcuts && CallUtil.isVideoEnabled(getContext()));
if (changed) {
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java
index ba014380c..e60936234 100644
--- a/src/com/android/dialer/list/SearchFragment.java
+++ b/src/com/android/dialer/list/SearchFragment.java
@@ -163,7 +163,7 @@ public class SearchFragment extends PhoneNumberPickerFragment {
listener.onCallNumberDirectly(getQueryString());
}
break;
- case DialerPhoneNumberListAdapter.SHORTCUT_ADD_NUMBER_TO_CONTACTS:
+ case DialerPhoneNumberListAdapter.SHORTCUT_ADD_TO_EXISTING_CONTACT:
final String number = TextUtils.isEmpty(mAddToContactNumber) ?
adapter.getFormattedQueryString() : mAddToContactNumber;
final Intent intent = DialtactsActivity.getAddNumberToContactIntent(number);
diff --git a/src/com/android/dialer/list/SmartDialNumberListAdapter.java b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
index 3696fb900..ed01baf2f 100644
--- a/src/com/android/dialer/list/SmartDialNumberListAdapter.java
+++ b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
@@ -116,7 +116,7 @@ public class SmartDialNumberListAdapter extends DialerPhoneNumberListAdapter {
public void setQueryString(String queryString) {
final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString());
boolean changed = false;
- changed |= setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
+ changed |= setShortcutEnabled(SHORTCUT_ADD_TO_EXISTING_CONTACT, showNumberShortcuts);
changed |= setShortcutEnabled(SHORTCUT_SEND_SMS_MESSAGE, showNumberShortcuts);
changed |= setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
showNumberShortcuts && CallUtil.isVideoEnabled(getContext()));