You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/02/09 03:42:30 UTC

git commit: CB-5994 Switch Contact ID lookup to use Raw contact id.

Updated Branches:
  refs/heads/dev c561ba515 -> e42602901


CB-5994 Switch Contact ID lookup to use Raw contact id.

When saving a contact it is the raw contact ID that is returned and so the check in ContactManager after the save needs to be using that.  This requires this change to work on 4.3/4.2.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/e4260290
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/e4260290
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/e4260290

Branch: refs/heads/dev
Commit: e42602901cd8b1a6c24b465ac725e4132f5c7a1e
Parents: c561ba5
Author: Lou Sacco <oc...@gmail.com>
Authored: Tue Dec 10 15:46:57 2013 -0800
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Sat Feb 8 21:39:47 2014 -0500

----------------------------------------------------------------------
 src/android/ContactAccessorSdk5.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/e4260290/src/android/ContactAccessorSdk5.java
----------------------------------------------------------------------
diff --git a/src/android/ContactAccessorSdk5.java b/src/android/ContactAccessorSdk5.java
index 486424f..d8b9592 100644
--- a/src/android/ContactAccessorSdk5.java
+++ b/src/android/ContactAccessorSdk5.java
@@ -284,9 +284,9 @@ public class ContactAccessorSdk5 extends ContactAccessor {
         // Do the id query
         Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
                 null,
-                ContactsContract.Data.CONTACT_ID + " = ? ",
+                ContactsContract.Data.RAW_CONTACT_ID + " = ? ",
                 new String[] { id },
-                ContactsContract.Data.CONTACT_ID + " ASC");
+                ContactsContract.Data.RAW_CONTACT_ID + " ASC");
 
         JSONArray fields = new JSONArray();
         fields.put("*");