1
0
mirror of https://github.com/etesync/android synced 2024-12-23 07:08:16 +00:00

Minor bug fixes

* work-around for crash when remote ETag is empty (shouldn't happen but happens sometimes)
* fetch multiple contact URLs (not only the first one) from contacts provider (fixes #150)
This commit is contained in:
rfc2822 2014-01-12 19:59:38 +01:00
parent 4f1488ece5
commit b3f145f6a8
2 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ public class LocalAddressBook extends LocalCollection<Contact> {
@Cleanup Cursor cursor = providerClient.query(dataURI(), new String[] { Website.URL },
Website.RAW_CONTACT_ID + "=? AND " + Data.MIMETYPE + "=?",
new String[] { String.valueOf(c.getLocalID()), Website.CONTENT_ITEM_TYPE }, null);
if (cursor != null && cursor.moveToNext())
while (cursor != null && cursor.moveToNext())
c.getURLs().add(cursor.getString(0));
}

View File

@ -71,7 +71,7 @@ public class SyncManager {
for (Resource remoteResource : remoteResources) {
try {
Resource localResource = local.findByRemoteName(remoteResource.getName(), false);
if (!remoteResource.getETag().equals(localResource.getETag()))
if (localResource.getETag() == null || localResource.getETag() != remoteResource.getETag())
remotelyUpdated.add(remoteResource);
} catch(RecordNotFoundException e) {
remotelyAdded.add(remoteResource);