diff options
Diffstat (limited to 'src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java')
-rw-r--r-- | src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java b/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java index 118403bd4..3c6f38970 100644 --- a/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java +++ b/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java @@ -234,8 +234,14 @@ public class BluetoothPbapVcardManager { ArrayList<String> nameList = new ArrayList<String>(); Cursor contactCursor = null; - final Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, + Uri uri = null; + + if (phoneNumber != null && phoneNumber.length() == 0) { + uri = Contacts.CONTENT_URI; + } else { + uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber)); + } try { contactCursor = mResolver.query(uri, CONTACTS_PROJECTION, CLAUSE_ONLY_VISIBLE, |