[
https://issues.apache.org/jira/browse/CB-7131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095547#comment-14095547
]
ASF GitHub Bot commented on CB-7131:
------------------------------------
Github user jsoref commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-contacts/pull/39#discussion_r16179768
--- Diff: src/android/ContactAccessorSdk5.java ---
@@ -902,6 +905,17 @@ private JSONObject photoQuery(Cursor cursor, String
contactId) {
Uri person =
ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,
(Long.valueOf(contactId)));
Uri photoUri = Uri.withAppendedPath(person,
ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
photo.put("value", photoUri.toString());
+
+ // Query photo existance
+ Cursor photoCursor =
mApp.getActivity().getContentResolver().query(photoUri, new String[]
{ContactsContract.Contacts.Photo.PHOTO}, null, null, null);
+ if (photoCursor == null) {
+ return null;
--- End diff --
this is probably under indented (2 space instead of 4 space)
> Contact picker returns photo url even if a contact doesn't have one. (Android
> 4.4.4, 4.3)
> -----------------------------------------------------------------------------------------
>
> Key: CB-7131
> URL: https://issues.apache.org/jira/browse/CB-7131
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin Contacts
> Affects Versions: 3.5.0
> Reporter: Meshkov Alex
> Assignee: Sergey Grebnov
> Priority: Minor
>
> When I pick contact that doesn't have any avatar with
> {code}navigator.contacts.pickContact{code} I get contact object with photo
> url which is broken. Contact without avatar should not contain any photo
> urls, but somehow it does...
--
This message was sent by Atlassian JIRA
(v6.2#6252)