diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2013-09-22 20:49:04 +0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-10-01 18:57:09 +0000 |
commit | dbb207ac9c1ef182a8b4c7874a7d273e305c9318 (patch) | |
tree | 54828d992a108ca0924bde9e03e7e4fbc8aadc74 | |
parent | dc281e19f2546796f9d4429d5974d7ab06b74f82 (diff) | |
download | packages_apps_Dialer-dbb207ac9c1ef182a8b4c7874a7d273e305c9318.tar.gz packages_apps_Dialer-dbb207ac9c1ef182a8b4c7874a7d273e305c9318.tar.bz2 packages_apps_Dialer-dbb207ac9c1ef182a8b4c7874a7d273e305c9318.zip |
SmartDialer: show quick contact on long press
Instead of displaying the disambiguation dialog, show quick contact
instead which also allows the user to decide which number to call as
well as perform other operations such as editing or messaging.
This is useful because it's easier to search for contacts via T9
compared to using the QWERTY keyboard.
Change-Id: I81c21e58fb1090157a062d79600287d7e1e7c8d6
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 5f70312ff..c913a7098 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -43,6 +43,7 @@ import android.provider.Contacts.Intents.Insert; import android.provider.Contacts.People; import android.provider.Contacts.Phones; import android.provider.Contacts.PhonesColumns; +import android.provider.ContactsContract; import android.provider.Settings; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; @@ -1745,10 +1746,12 @@ public class DialpadFragment extends Fragment final SmartDialEntry entry = (SmartDialEntry) view.getTag(); if (entry == null) return false; // just in case. mClearDigitsOnStop = true; - // Show the phone number disambiguation dialog without using the primary - // phone number so that the user can decide which number to call - PhoneNumberInteraction.startInteractionForPhoneCall( - (TransactionSafeActivity) getActivity(), entry.contactUri, false); + // Show quick contact dialog so the user can decide which number + // to call or perform other operations + Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent( + getActivity(), view, entry.contactUri, + ContactsContract.QuickContact.MODE_LARGE, null); + startActivity(intent); return true; } } |