diff options
Diffstat (limited to 'src/com/android/dialer/list/SmartDialNumberListAdapter.java')
-rw-r--r-- | src/com/android/dialer/list/SmartDialNumberListAdapter.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/SmartDialNumberListAdapter.java b/src/com/android/dialer/list/SmartDialNumberListAdapter.java index 25d442e0c..d9aa84674 100644 --- a/src/com/android/dialer/list/SmartDialNumberListAdapter.java +++ b/src/com/android/dialer/list/SmartDialNumberListAdapter.java @@ -22,6 +22,7 @@ import android.net.Uri; import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds.Callable; import android.telephony.PhoneNumberUtils; +import android.text.TextUtils; import android.util.Log; import com.android.contacts.common.list.ContactListItemView; @@ -112,4 +113,14 @@ public class SmartDialNumberListAdapter extends DialerPhoneNumberListAdapter { return null; } } + + @Override + public void setQueryString(String queryString) { + final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString()); + setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts); + // TODO: Write utility method to check subscriptions and settings, and use it to determine + // whether to enable or disable video call shortcut. + setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts); + super.setQueryString(queryString); + } } |