Ver código fonte

Apex Mobile
修复contact 编辑后无法显示的问题

Ray Zhang 8 anos atrás
pai
commit
2e65ab70e0

+ 5 - 1
Apex Mobile/app/src/main/java/com/usai/Contacts/ContactsManager.java

@@ -112,10 +112,14 @@ public class ContactsManager {
 
     public String getContactID(String name) {
         String id = "0";
+
+
+//        ContactsContract.Contacts.DISPLAY_NAME_ALTERNATIVE
+
         Cursor cursor = contentResolver.query(
                 ContactsContract.Contacts.CONTENT_URI,
                 new String[]{ContactsContract.Contacts._ID},
-                ContactsContract.Contacts.DISPLAY_NAME +
+                ContactsContract.Contacts.DISPLAY_NAME_ALTERNATIVE +
                         "='" + name + "'", null, null);
         if(cursor.moveToNext()) {
             id = cursor.getString(cursor.getColumnIndex(